freetype-devel
[Top][All Lists]
Advanced

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

Re: Support Mac Fonts ?


From: Just van Rossum
Subject: Re: Support Mac Fonts ?
Date: Thu, 27 Jul 2000 21:20:20 +0100

At 8:23 PM +0200 27-07-2000, Boris Letocha wrote:
>As I understand from code of ftmac.h - it looks like it can be compiled only
>on Mac or with Mac headers???

Yep.

>But I want support of all "things" on all platforms. Or this is nonsense
>with FOND fonts?

Yep... The are basically two outline font formats supported under MacOS:
Type 1 and TrueType. Those funny FOND resources only contain metrics,
references to bitmap fonts, the PS name of the font, and optionally a
reference to an SFNT resource. An SFNT resource contains an sfnt structure
(duh!) and is 100% equivalent to a .TTF file. Type 1 fonts are stored as so
called LWFN files, which contain the Type 1 data as separate chunks in
separate reousces; this is not unlike the chunks in a .PFB file. So the
*only* thing that makes Mac fonts special is the way they are packaged. So
all the Mac supporting code does is present it to FT in an FT-friendly way
;-). It really makes very little sense to try to support this on other
platforms.

>Also why it is in base directory? I know I am not developer of FT, but think
>about it (if it is not base for all other things ...)

I wasn't sure about this myself; I asked David if it was ok to put it there
and he said yes... Maybe I can put the entire file in an #ifdef macintosh
switch to minimize confusion on other platforms? Or would an #error make
more sense?

At 8:31 PM +0200 27-07-2000, Joerg Pommnitz wrote:
>The Mac is different. Files in MacOS consist of two forks,
>one data fork that is the equivalent of data files in most
>operating systems and a ressource fork. The ressource fork
>is an odd thing. It's basically another file with a MacOS
>defined structure (a ressource directory with tags that
>points to ressources inside the ressource fork).
>Traditionally fonts are stored as ressources. I assume that
>the Mac font driver just contains code to access fonts
>ressources, otherwise the fonts should be identical to
>what you get on all other platforms.

Yep, except that I killed the FOND driver today: the functionality has been
replaced by a Mac-specific reimplementation of FT_New_Face() (in ftmac.c).
It checks whether the path points to a Mac file; if it doesn't, it'll just
act like the "real" FT_New_Face(). So basically it's an extended version.
This way of doing it is a lot cleaner than the driver approach, which was
rather hack-ish.

Just





reply via email to

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