freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Freetype2 patch on Mac


From: Garrick Meeker
Subject: Re: [Devel] Freetype2 patch on Mac
Date: Tue, 3 Feb 2004 00:22:40 -0800
User-agent: KMail/1.6

Here is an updated version of this patch.  I had to change the face index 
counting to work with multiple styles on some LWFN Type1 fonts so that the 
counting works the same as the loading.  I'm fairly confident that this is 
now ready for a larger audience.

Contact me off list if you want the full non-diffed files.

On Thursday 22 January 2004 08:29, Garrick Meeker wrote:
> I've been playing with Steve's patch and it really is a thing of beauty. 
> All I added was my function to open a face with an FSSpec and some const
> keywords.  The benefits of Steve's code are that there are no dependencies
> on data types or extensions (a dfont doesn't have to end in .dfont) and it
> passes around resource file references instead of FSSpecs so there aren't a
> bunch of opens and closes.  I've been testing multiple styles on OS X with
> truetype, opentype, and LWFN fonts and I haven't yet run into problems.
>
> If it works for you too I definitely think it should be checked in.
>
> On Thursday 08 January 2004 16:01, Dan Williams wrote:
> > Go for it.  When you're done, post the patch and let us have a
> > look.  Maybe this means I can now reduce the number of freetype build
> > folders I have lying around since the patch has a standing chance of
> > getting merged this time ;)
> >
> > Cheers,
> > Dan
> >
> > On Thu, 8 Jan 2004, Garrick Meeker wrote:
> > > I guess that I usually saw suitcase fonts with one FOND but multiple
> > > faces in it.  Dan's changes to dfont loading (also in my patch) does
> > > something similar to your code below.
> > >
> > > I'd vote for having freetype support multiple faces on the Mac without
> > > patches.  Maybe we can use Steve's changes for suitcase and everything
> > > else from the patch I posted?  I can take a stab at merging them and
> > > cleaning up any duplicate code.
> > >
> > > On Thursday 08 January 2004 10:39 am, Steve Hartwell wrote:
> > > > On Jan 8, 2004, at 10:13 AM, Dan Williams wrote:
> > > > >  Are you sure there's always only one FOND resource for a Suitcase
> > > > > font?
> > > >
> > > > Suitcases often have more than one FOND.  Most of the Apple system
> > > > fonts (.dfont) have multiple FONDs.
> > > >
> > > > On Jan 8, 2004, at 1:31 AM, Garrick Meeker wrote:
> > > > > Support for multiple styles in FT_New_Face_From_Suitcase().  There
> > > > > is only one
> > > > > FOND resource (I think?) and the index should be used read reading
> > > > > the FOND,
> > > > > not when getting the resource.
> > > >
> > > > In my version of ftmac.c, the index represents the 'i'th face in the
> > > > suitcase, like this:
> > > >
> > > >      for (res_index = 1; ; ++res_index)
> > > >      {
> > > >                 fond = Get1IndResource( 'FOND', res_index );
> > > >                 if ( ResError() )
> > > >                 {
> > > >                 error = FT_Err_Cannot_Open_Resource;
> > > >                 goto Error;
> > > >                 }
> > > >                 if ( face_index < 0)
> > > >                 break;
> > > >
> > > >                 num_faces = count_faces( *fond );
> > > >                 if ( face_index < num_faces )
> > > >                 break;
> > > >
> > > >                 face_index -= num_faces;
> > > >      }
> > > >
> > > > I didn't think anyone else would be interested in access to multiple
> > > > faces so I didn't submit my changes.  If you'd like to see them,
> > > > please contact me off list and I'll send you a copy.
> > > >
> > > > Steve Hartwell
> > > >
> > > > http://stevehartwell.home.comcast.net/proj/fontinspector

Attachment: ftmac.diff.gz
Description: GNU Zip compressed data


reply via email to

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