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 15:27:02 -0800

On Tue, 2007-11-06 at 12:06, Benjamin Reed wrote:
> On 06 Nov 2007 11:34:03 -0800, George Williams <address@hidden> wrote:
> 
> > 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 believe this was deprecated in 10.4 and removed in 10.5 unless I'm
> mistaken.  It doesn't work on my leopard system anyways.
I just spent several hours upgrading to leopard.

It works on my leopard system.

============================= foo.c =================================
#include <stdio.h>

main(int argc, char **argv) {
   FILE *foo = fopen("foo.c/rsrc","w");

   if ( foo == NULL )
      fprintf( stderr, "rsrc doesn't work\n" );
   else
      fprintf( stderr, "rsrc worked here\n" );
return( 0 );
}
======================================================================
Prints out "rsrc worked here".





reply via email to

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