freetype-devel
[Top][All Lists]
Advanced

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

[Devel] Re: Request about font name problem


From: Owen Taylor
Subject: [Devel] Re: Request about font name problem
Date: Wed, 27 Mar 2002 11:38:48 -0500 (EST)
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/21.1

KUSANO Takayuki <address@hidden> writes:

> Hi,
> 
> At Tue, 26 Mar 2002 11:51:46 -0500 (EST),
> > In, http://bugzilla.gnome.org/show_bug.cgi?id=68113, you write:
> *snip*
> > Since I don't have access to fonts that misdisplay, I'm wondering:
> > could you try getting the code from FreeType CVS, compiling
> > it, and see if it fixes your problem.
> *snip*
> > The expected behavior is that it should display an ASCII/English name
> > for the font. Making it display the Japanese name properly will
> > require API changes in FreeType, Xft, and Pango.
> 
>   I've just checked out FreeType CVS and compiled, installed, and
>   re-run xftcache. Invoke testgtk (in gtk+2.0/tests), and choose
>   'font selection'.
> 
>   Fontnames listed in the font selection dialog are all broken.  All
>   Kanji characters are replaced with '??' (2 question marks) (ASCII
>   characters in fontnames are displayed as-is)
> 
>   So I tested some version of FreeType against 'DFHsm7.ttc' font.
>   I bought this font from dynalab.co.jp some years ago. Below is
>   the result.

Thanks very much for doing the testing. I'm CC'ing this mail to
address@hidden so David Turner can look at your results.
 
>  ----------+------------------+-------------+----------------------
>   FreeType | Encoding of      | Language of | Example
>   version  | fontname         | fontname    | (output of ftdump)
>  ----------+------------------+-------------+----------------------
>   2.0.8    | Shift_JIS        | Japanese    | DF平成明朝体W7

This, despite looking OK, is actually a problem because 
the Shift_JIS results are returned for all locales without any
indication of the encoding.

>  ----------+------------------+-------------+----------------------
>   2.0.9    | ASCII            | English     | DFHSMincho-W7

This is probably working "by accident". FreeType-2.0.9 just uses
the last name in the font, and it happens that this is the English
name.

>  ----------+------------------+-------------+----------------------
>   CVS      | ASCII            | Japanese    | ???????W7
>            |(Broken Shift_JIS)|             |

This is strange; the CVS version should be favoring the English name
rather than the Japanese name. 

What I think is happening is that the "English" name is not tagged with 
a english language tag, but in some other fashion. And when that 
happens, the CVS code uses the first name in the font (the Japanese name)
instead of the last name in the font as 2.0.9 did.

The '?' characters are because FreeType is converting a name encoded
as Unicode into 

What would be needed to debug this is the complete list of names in
the font and how they are tagged. To do this, what you'd need to do is
modify Get_Name() in src/sfnt/sfobjs.c to print out, for each name
record matching nameid:

 rec->string
 rec->platformID
 rec->languageID
 rec->encodingID

Then run ftdump on the font and see what the debug output shows.
 
>   This table show that 2.0.9 is good. But some fonts kill ftdump
>   by segv.

That's most likely an unrelated problem. It would be good to get it
fixed, though. :-) Maybe you could provide a backtrace in gdb
of the segfault?

Regards,
                                        Owen



reply via email to

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