freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] Proper way for working with PostScript fonts?


From: Ian Britten
Subject: Re: [Freetype] Proper way for working with PostScript fonts?
Date: Mon, 29 Apr 2002 10:09:43 -0300

On Sat, 27 Apr 2002 12:05:38 -0700
"Pedriana, Paul" <address@hidden> wrote:

> I want to use FreeType to draw some PostScript fonts. Unlike TrueType fonts,
> which usually come as a single .ttf file, these PostScript fonts come as
> four
> files: .afm, .inf, .pfb, .pfm. How do I use these four file types with
> FreeType? 
> 
> FreeType seems to want to open only the .pfb file. However, it seems that
> the 
> font's actual name is instead stored in the .pfm file. How do I read the
> name
> of the font from the .pfm file? Or is there something else I need to do?
> What
> else might I need to know about using PostScript fonts with FreeType?

What we do is:
- Call FT_New_Face() for the .pfa or .pfb file  (They are the same, except
  for ASCII vs binary)
- Then, call FT_Attach_File() to attach the .afm file to the FT_FAce.  (The
  .afm file contains kerning information, and the face can be used without
  this information (although the behaviour may not be 100% correct))

I'm unfamiliar with .inf and .pfm files, but I'd guess that if Freetype
supports them, you'd just FT_Attach_File() them as with the .afm file...

Ian



reply via email to

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