freetype-devel
[Top][All Lists]
Advanced

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

[Devel] Accessing the 'gasp' SFNT table


From: Vincent Caron
Subject: [Devel] Accessing the 'gasp' SFNT table
Date: 06 Apr 2002 22:46:00 +0200

Hello,

I would like to use the 'gasp' table info to turn on/off hinting and
anti-aliasing as wished by the font designer. However it is currently in
a private area, thus I can't reach it. My concerns in more details :

- FT_Get_Sfnt_Table() uses the FT_Sfnt_Tag enum which doesn't have a
'ft_sfnt_gasp' item

- the required structs to read the table contents (TT_GaspRec and
TT_GaspRangeRec) are currently defined in <internal/tttypes.h> (they
could move to <tttables.h>)

- src/sfnt/sfdriver.c:get_sfnt_table() does not dispatch the 'gasp'
table

What do you think about exposing this to the user ?

--

Another remark : since all SFNT table types are listed in <tttags.h>,
what about merging this with the FT_Sfnt_Tag enum ? I mean :

- the enum values are currently 0,1,... instead of the 'FT_MAKE_TAG'
values

- internal functions of type TT_Loader_GotoTableFunc currently uses a
'FT_ULong tag' parameter, while they could use a more meaningful
'FT_Sfnt_Tag tag'.

This way one also wouldn't have to maintain separate ft_sfnt_* and
TTAG_* values. The macro name space would be less crowded too :)
My proposition would read like this :

/* tttags.h */
enum FT_Sfnt_Tag
{
  ft_sfnt_cmap = FT_MAKE_TAG( 'c', 'm', 'a', 'p' ),
  ft_sfnt_cvt  = FT_MAKE_TAG( 'c', 'v', 't', ' ' ),
  /* ... */
};

Sorry if I completely missed a design issue here ...





reply via email to

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