freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freetype] Question about merged fonts...


From: Werner LEMBERG
Subject: Re: [Freetype] Question about merged fonts...
Date: Mon, 21 May 2001 09:34:21 +0200 (CEST)

> Three solutions come to mind:
>    - Have the code that draws the text have a list of 
>      multiple fonts to use, in order of preference. 
>      Thus, if the primary font doesn't have the character 
>      I need, try the secondary font. etc. This solution 
>      is not very clean but is possible. The problem with 
>      it is that application-level code shouldn't have to 
>      fuss with font selection itself.

It is always a good idea to give the user the possibility to set
preferences.

>    - Have the font code provide the above multiple font 
>      support internally. Thus, my C++ Font class isn't 
>      necessarily tied to a single font file but also allows 
>      the specification of alternative fonts to use if the 
>      primary font doesn't have the needed character. 
>      This solution is clean from the application level, 
>      but makes gives the C++ Font class implementation 
>      some problems.

I think you need this also.

Martin Dürst (now at the WWW consortium) has further developed this
idea for a display engine he had written while working in Switzerland
(he calls this `font cascading'): Especially for CJK fonts it does
matter whether a given text is displayed with the right font due to
the famous CJK unification in Unicode.  To do so, the engine looks at
the next 20 characters or so, doing some heuristics to guess the
language.  He has written an article about this a few years ago for
Unicode conference proceedings (if you are interested, I can try to
find this at home).

>    - Somehow provide a font file that has all the needed 
>      characters in it. The problem with this is that we are
>      using licensed font files from people like Monotype 
>      and I don't think we can go and alter fonts like that.

This is the worst solution for many scripts, only useful as a
last-resort font.  It works nicely for fonts where a single code point
can be mapped to a single glyph, but it will fail if this assumption
is incorrect (e.g. Indic scripts -- about 30 to 40 code points can map
up to 3000 glyphs).


    Werner


reply via email to

[Prev in Thread] Current Thread [Next in Thread]