freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] Question on MacOS X


From: Dave Williss
Subject: Re: [Freetype] Question on MacOS X
Date: Tue, 4 Dec 2001 12:35:15 -0600

Another Mac .dfont question:

How do you deal with the fact that a .dfont file can contain more than one
face?
You only get to pass a filename.

I have a hacked up version of FT 1.3 that will read a .dfont, and the way I
took care of it was to append a semicolon and the resource number to the end
of the filename, then parse it back out in the open call.  Ugly, but it
worked.

A decent function to convert Font Family, weight, style, etc settings into
filename sounds like a Plus.  I have such a function in my code that calls
FreeType, but it's not very fast.  I have to first search for all fonts that
I can use, then open them one at a time and read out the family and style
information.  I keep these cached in a private reference file in the
program's directory so it's fast enough the 2nd time, but the first time it
takes a while.  Most of the time goes into the Open_Face call.  If there was
a faster way to open a face and just read the names, that would really help.

If there was a FreeType function to do this lookup, it could be written with
OS-specific bits that took advantage of Windows and Mac API calls to find
the font file given a name.

I agree that it shouldn't be part of the main library, but could be an
optional module or extention or something.





reply via email to

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