freetype
[Top][All Lists]
Advanced

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

Re: [ft] Carbon-free fonts support for Mac OS X 10.5 (Leopard) compatibi


From: George Williams
Subject: Re: [ft] Carbon-free fonts support for Mac OS X 10.5 (Leopard) compatibility
Date: 06 Nov 2007 11:34:03 -0800

On Tue, 2007-11-06 at 02:48, Dipsy Po wrote:
> (a) The POSIX code in ftobjs.c only handles "data fork suitcase fonts"
> (.dfont), such as "Helvetica.dfont", but not the more important "resource
> fork suitcase fonts", like Arial, Times New Roman, Courier New, etc.. 
> 
> I am not sure if it is possible to read "resource fork" with POSIX API at
> all. It may need to use some lower level system calls to get the "resource
> fork" of a file. If this is possible, then implementing "resource fork"
> support can solve the problem.
You can read a resource fork easily through the standard C library given
a file name by appending "/rsrc" to it, so for:
       /Users/foobar/Library/Fonts/FrabNuts
   fopen("/Users/foobar/Library/Fonts/FrabNuts/rsrc","rb")
The format of a resource fork isn't hard to parse, there is code in
fontforge (in the file macbinary.c of the ff source distribution) to do
this (I may even have added it to freetype at one point).

I'm not volunteering for this at the moment, because I've got my own
work to do, but I can talk someone through it if that would be helpful
 
> 
> (b) The ftmac.c currently has a function to map the "logical font name" to a
> font file + face index. I believe there is no way to duplicate this feature
> without using Carbon, as it requires access to the Mac OS Font Manager. But
> I think giving up this feature is OK for forked applications, as this
> feature (mapping logical font name to font file) does not exist on Windows
> or any other OS as well.
This I don't know how to do.





reply via email to

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