Keith Packard wrote:
> 
> First, a description of the problem, then some proposed solutions.
> 
> The problem:
> 
> 1)      An application wants a simplified chinese font and prefers
>         AR PL SuntiL GB, so it builds a font pattern:
> 
>                 AR PL SungTiL GB,serif:lang=simplifiedchinese
> 
> 2)      Fontconfig grubs through the configuration database and finds
>         the alias for 'serif' which expands this pattern to:
> 
>                 AR PL SungTiL GB,Times New Roman,Nimbus Roman No9 L,Luxi Serif,
>                 Times,Kochi Mincho,AR PL SungtiL GB,Baekmuk Batang,serif:
>                 lang=simplifiedchinese:
> 
>         (along with the other usual defaults)
> 
> 3)      AR PL SungTiL GB isn't installed, and Fontconfig gives precedence
>         to family name matches over lang matches, so this pattern matches
>         'Times New Roman'.  That's bad; 'Times New Roman' isn't know for
>         it's ability to present simplified chinese text.
> 
> The obvious fix here is to make 'lang' bind tighter than family name,
> and in fact, fontconfig used to do just that.  However, now an application
> which asks explicitly for 'Times New Roman:lang=simplifiedchinese' will
> never get Times New Roman unless no simplified chinese fonts are installed.
> That's also bad.

Even though "Times New Roman" is in the font list 
it won't have simplified Chinese characters. It would
be enough if all the chars were ASCII. CJK user might
want to specify the font used for ASCII char. Of course, as
you point out it won't help for simplified Chinese.

Is there an implicit assumption here that 'one' font 
is returned? This assumption is fine for ASCII because
by convention all fonts support ASCII (well, not
all fonts). This assumption breaks down for other
languages and really breaks done when the document is
Unicode.

Unicode apps such as Mozilla have the problem that
for any given font spec the document could have any
Unicode character. To address this Mozilla always 
creates a font list for each font specification.

The font list is filled is as need to satisfy the
characters but regardless of order of characters the
font list always has the fonts listed in the same
order for a given font spec.

The drawing routines of course need to understand
how to use the font list to display chars.

Mozilla fills the font list in approximately this
order:

  family + language-group
  family (any-language-group)
  language-group (any-family)
  any font that has the needed character

Is there some way to support a font list in Fontconfig?

Brian Stell
_______________________________________________
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts

Reply via email to