Around 13 o'clock on Jul 13, Owen Taylor wrote:

> The msmincho.ttc (the version shipped with Windows XP) has the
> PlatformID/LangID pairs:
> 
>  Macintosh/English (1/0x0)
>  Windows/English   (3/0x409)
>  Windows/Japanese  (3/0x411)
> 
> Odd. Maybe there was a bug in older versions that they fixed.

That's pretty likely.  I realize I misinterpreted the Mac/
(windows-japanese) entries -- they were in SJIS, not UTF-16. The older
msmincho also includes Windows/Japanese entries for family and psname,
the psname was entirely Latin, so my new code nicely picks it up.  
FreeType provided no family name for this font file.

I've committed the code to locate reasonable names from the name table; it 
uses a simple priority scheme to select the "best" font.  The priority
has three elements, language, encoding and name; later elements have 
effect only if earlier elements match.

 1      language:       english, latin, other
 2      encoding:       unicode, other
 3      name:           family, PS, other

This generates exactly the same value as FreeType for nearly all of my 
fonts, except for msmincho where it pulls the PS name out instead of 
providing no name.

I'd be interested to hear whether other people will find this scheme 
usable, and whether people would also like to see the other localized 
names made available for presentation to the user.  I would extract those 
localized names and insert them into a separate element of the pattern 
tagged with an appropriate rfc-3066 style language name.

Keith Packard        XFree86 Core Team        HP Cambridge Research Lab


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

Reply via email to