freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Apple's 'gvar' table and friends


From: George Williams
Subject: Re: [Devel] Apple's 'gvar' table and friends
Date: 25 Mar 2004 20:23:25 -0800

On Tue, 2004-03-23 at 23:20, Werner LEMBERG wrote:
> >    Is there any interest in adding support for apple's distortable
> > fonts to freetype?
> 
> Yes, definitely.  What kind of interface do you suggest?
I had initially assumed that I could just use the mm interface, but I
see that is not going to be as easy as I had anticipated.

The big problem is that Adobe's axes are measured in integers
(documented that they generally range from 1 to 999), while Apple's axes
are real numbers (documented that they generally range from .5 to 2).

So the FT_MM_Axis structure cannot be used as is, and the
FT_Set_MM_Design_Coordinates function can't be used either.

My first attempt at specifying a ui was to continue to use the mm
service idea but make some of the structures bigger. But that breaks
runtime compatibility and so is probably wrong.

Perhaps better would be to define two new functions in ftmm.h (and
extend the service in svmm.h) to include two new functions:
  FT_Get_Variation_Master( FT_Face           face,
                       FT_Variation_Master  *amaster );
which returns a structure very similar to FT_Multi_Master, but with some
additional fields and using FT_Fixed instead of FT_Long
  FT_Set_Var_Design_Coordinates( FT_Face   face,
                                FT_UInt   num_coords,
                                FT_Fixed*  coords );

Is there a better approach that I am missing? (Sorry to belabor all
this, I've not tried adding stuff at this level before and feel unsure
of the best way to go about things).




reply via email to

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