Global config for fonts depending on language

Nicolas Mailhot nicolas.mailhot at laposte.net
Fri Oct 5 11:18:23 PDT 2007


Gerrit Sangel a écrit :
> Am Freitag 05 Oktober 2007 schrieb Nicolas Mailhot:
> 
>> This is not 100% true, the locl opentype feature allows you to define
>> several language-dependent versions of the same unicode point within a
>> font. It's supported by pango, and is the standard way every modern
>> font handles the difference between russian and blakanic cyrillic for
>> example.
> 
> I knew of the opentype features, but do they automatically select the language 
> according to what is specified in e.g. xhtml? 

The opentype feature does not select anything. It's up to the apps to 
pass text, language and preferred font to their text layouting lib 
(pango for gnome & firefox, a qt lib for qt apps, ICU for 
OpenOffice.org) and up to this lib to select the right glyph in the this 
font (using fontconfig to find font fallbacks), position it, and ask 
freetype to render it.

If the text-layouting lib understands locl tables and has been passed 
the right language by the app it will select the right glyph, if it does 
not understand locl it will select the default glyph variant in the 
font, and if the font does not have the glyph available at all 
fontconfig will be used to select a fallback font and the whole dance 
will restart.

-- 
Nicolas Mailhot




More information about the xorg mailing list