[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freetype] How do I tell if a PostScript (.pfb) file is bold or ital
From: |
Detlef Würkner |
Subject: |
Re: [Freetype] How do I tell if a PostScript (.pfb) file is bold or italic? |
Date: |
Fri, 13 Sep 2002 09:23:29 +0200 |
address@hidden (Pedriana, Paul) wrote:
> I load a certain .pfb file with FT_New_Face and it loads fine.
> The face->style_flags for the face is 0 (no bold, italic).
> The face->style_name for the face is "Bold".
> Why don't the style_flags reflect this boldness?
Because the font designer decided to name the font "XY Bold" but
to not set the /Weight field in the Postscript FontInfo dictionary
to "Bold" or "Black".
> After loading the face with FT_New_Face I am calling FT_Attach_File on
> the face with the associated .afm file and it has no effect on this. Neither
> does calling FT_Attach_File with the .pfm file for the font.
FT_Attach_File with a .pfm never has an effect. With an .afm it only
has an effect on the results of FT_Get_Kerning(). Seems you dont call
this function. Or its a fixed-width font.
> So is the only way to tell if a PostScript font is bold is to ignore the
> style_flags field and go with the style_name field?
Maybe the font is broken, maybe the parser in FreeType. Whats the /Weight
entry in your .pfb?
Ciao, Detlef
--
_ // address@hidden
\X/ Detlef Wuerkner, Langgoens/Germany