freetype
[Top][All Lists]
Advanced

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

Re: [ft] family_name of FT_FaceRec


From: Werner LEMBERG
Subject: Re: [ft] family_name of FT_FaceRec
Date: Wed, 14 May 2008 14:58:27 +0200 (CEST)

> > I'm looking at the DejaVu fonts, specifically the condensed
> > variant, like DejaVuSansCondensed-BoldOblique.ttf. When I load it
> > with FreeType I see that the family_name as available in the
> > FT_FaceRec structure is "DejaVu Sans". From where does FreeType
> > get this info? If I try harder, i.e. load the FT_SfntName
> > structure, I see that TT_NAME_ID_FONT_FAMILY does contain the full
> > name, "DejaVu Sans Condensed"...
>
> OK, so FT_Face->family_name is set to the preferred Windows family
> of the TrueType "name" structure.

Yes, this is the `newer' interface -- `DejaVu Sans' is the real family
name, while `condensed' is an attribute.

> But I'm on OS/2, so I think I want the normal font family as listed
> in the font family field of the "name" structure.  (I would imagine
> that Linux users would want the same but I didn't check my test
> program on Linux how FreeType reacts there.)

No, Linux users want the better interface as given with the
`preferred' fields :-)

> Can I change some #ifdef in the FreeType code (where?) or do I need
> to do that by hand using FT_SfntName etc.?

The relevant code is in sfobjs.c, in function sfnt_load_face, but
using FT_SfntName is of course the correct way to access those fields.
However, it's not clear to me why you prefer the inferior scheme.  Can
you elaborate on that?


    Werner




reply via email to

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