Re: Font lookup ranges [was Re: Notes on Pango Xft backend]



Around 12 o'clock on May 30, Yao Zhang wrote:

> From your coverage map, it is easy to tell which category the font is in.
> But in my opinion, combining different Chinese fonts together to get
> a bigger coverage is generally not a good idea.

It's good to know we can intuit the language tag from the Unicode coverage,
that will make using Type1 fonts (and others without OS/2 tables) easier.

Unifying fonts together to present a document works well when the selection
of fonts match the selection of langauges; a document with english and
traditional chinese sections should typeset the english sections in a
western font and the chinese sections in an traditional chinese font.

One obvious trick is knowing which sections belong to which language, 
that's something which can only be solved at the document level.  

Another trick is to pick fonts which can cover the appropriate section with
the minimal number of different faces; a document tagged as traditional
chinese shouldn't use a face designed for simplified chinese for the
codepoints those have in common.  

By handing the complete set of codepoints used within the section to
fontconfig, that library will select fonts which cover the greatest
percentatge of the codepoints in the section in preference to those which
cover less.

However, doing this leads to rather complicated layout and reflow problems
as the fonts in use may change as the character data are modified.

Note that current CSS2 *requires* that the fonts be selected on a
per-codepoint basis, it doesn't permit global analysis.  The current draft
of the next version of CSS2 does permit more sophisticated selection 
mechanisms.  So, when you say Mozilla generates ransom-note output, you're 
getting precisely what is specified by the standard.

Keith Packard        XFree86 Core Team        HP Cambridge Research Lab





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