Keith Packard <[EMAIL PROTECTED]> writes:

> Around 16 o'clock on Jul 12, Yao Zhang wrote:
> 
> > These may not be fontconfig's problem but since FreeType 2 has APIs
> > to access any naming table in the font, it is not FreeType 2's problem
> > either.  The way I solve this problem is to change FreeType 2's convertion:
> > Instead convert non-ASCII Unicode name to '?', convert it to UTF-8.
> > At least it works for me.
> 
> I'd like to use UTF-8 if possible; is there a way to get the UTF-8 value 
> from FreeType without changing that library?  I'm sure they have a good 
> reason for hiding the non-ASCII characters.

See the thread starting from:

 http://www.freetype.org/pipermail/devel/2002-March/003101.html

(And the continuation later under "Re: Request about font name problem")

You need to distinguish:

 A) The programatic name suitable for storing in config files,
    coding into a web page, etc.

    This is what face->family_name is meant to be and 
    face->family_name is defined to be ASCII traditionally
    so it can't really be changed. (Plus, things are just
    going to work better generally if this is Roman/ASCII)

    A font that has ?'s in the output with the current FreeType 
    most likely has a TrueType name table with invalid contents ...
    e.g. Chinese in the English name field.

 B) The localized name for a particular locale that should
    be shown to the user; FT_Get_Sfnt_Name() can be used to get
    this from a font, but it isn't exposed in fontconfig currently.
    In the mail above, I said:

   > [
   > I think fontconfig should have some way of getting the name for a
   > font localized into a particular language... my best idea as to an API
   >  would be to have a call like:
   > 
   >   char *FcConfigGetLocalizedName (FcConfig *config, FcPattern *p, const char 
*langid);
   > 
   >  the FC_LANG_* constants are not appropriate for the langid here, so you'd
   >  need something different.
   > ]

> > 2.  I cann't find a way to list aliases.  FcFontList() lists physical
> >     font only.
> 
> That is by design.  The essential problem is that many family names are 
> registered trademarks, presenting these to the user when they are used 
> only as alias names would be a trademark violation -- essentially we'd be 
> advertising the presense of a trademarked font name which would then go 
> and match some other font.
> 
> We were allowed to make fontconfig aliases between the Lucidux and Luxi
> families because of this.
> 
> If you can think of a way to reconcile these two requirements, please 
> suggest it.

Well, if aliases were first-class objects in FreeType, there would
be an obvious solution ... tag the alias as to whether it should be
displayed or not. But that doesn't work with aliases just being
pattern matching expressions. So I don't have any ideas here.

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

Reply via email to