freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Getting a font foundry out of FreeType2


From: David Turner
Subject: Re: [Devel] Getting a font foundry out of FreeType2
Date: Mon, 30 Apr 2001 17:43:51 +0200

> 
> I'd like to add the font foundry name to the application-visible
> characteristics of fonts from Xft (the X<->freetype interface library).
> 
> This is to permit the selection of fonts with the same family name from
> different foundries (like Courier and Garamond) -- family names which
> are in the public domain.
> 
> Can I do this through the existing general FreeType2 API?  Or do I need
> format-specific hacks that go around the back of the library?
>
I think you'll need to access the font's "name" table. To do so, you
should use the API in FT_SFNT_NAMES_H. See the following web
addresses for details:

  http://www.freetype.org/freetype2/docs/reference/ft2-sfnt_names.html
  http://www.microsoft.com/typography/otspec/name.htm

I believe you'll need to look at name ID 8 for the Foundry name.

It would certainly be interesting to see how the current XFree86
FreeType backend works to replicate it, I wouldn't be certain if
a lot of special cases weren't hardcoded ?!

Also, you can test wether a face is in a format based on the SFNT storage
scheme using the FT_IS_SFNT(face) macro..

- David



reply via email to

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