[Top][All Lists]

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

Re: [Devel] Re: Problems with font naming and Xft

From: Owen Taylor
Subject: Re: [Devel] Re: Problems with font naming and Xft
Date: Wed, 27 Mar 2002 13:00:01 -0500 (EST)
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/21.1

Keith Packard <address@hidden> writes:

> Around 16 o'clock on Mar 25, Owen Taylor wrote:
> > From reading the code in FreeType, it looks like what it does is it
> > picks a (more or less) random Unicode name from the font, which could
> > be for any language, and then converts that from Unicode to "ASCII"
> > by assigning each character of the result to one byte of the Unicode
> > character. (If there is only an Apple Roman name, and no unicode names,
> > it similarly assumes that Apple Roman is ASCII.)
> Cool.  I had assumed it was picking the Unicode name and returning it in 
> UTF-8 encoding.  I think it should be possible to get the name in UTF-8, 
> but I agree that an ASCII name would also be nice.  It's OK if I have to 
> ask the API to return either one as long as what's in the structure is 
> consistent.

I think it's generally a bad idea to redefine something that is
documented to return ASCII to return UTF-8.

There are basically two different things here:

 * The "canonical name" of the font, suitable for use to specify
   a font by a program.

 * The appropriate name to display to a user of a particular language.

It would be nice to think that the first would always be in ASCII; 
I don't know if this is true in practice. This is presumably what
the family_name field of the FT_Face object is supposed to be.

The second is definitely not always in ASCII, and definitely not always
the same for all languages. Using UTF-8 for this would definitely
be a good idea.


reply via email to

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