Clean up the SFNT_Interface. In this final pass, `load_hmtx' is

splitted from `load_hhea'.

* include/freetype/internal/sfnt.h, src/sfnt/sfdriver.c,
src/sfnt/ttmtx.c, src/sfnt/ttmtx.h: Split `hmtx' from `hhea'.

* src/sfnt/sfobjs.c (sfnt_load_face): Update.
This commit is contained in:
Wu, Chia-I (吳佳一) 2006-02-14 07:25:57 +00:00
parent e0decd1e27
commit 35222ff7bb
6 changed files with 25 additions and 7 deletions

View File

@ -1,3 +1,13 @@
2006-02-13 Chia-I Wu <b90201047@ntu.edu.tw>
Clean up the SFNT_Interface. In this final pass, `load_hmtx' is
splitted from `load_hhea'.
* include/freetype/internal/sfnt.h, src/sfnt/sfdriver.c,
src/sfnt/ttmtx.c, src/sfnt/ttmtx.h: Split `hmtx' from `hhea'.
* src/sfnt/sfobjs.c (sfnt_load_face): Update.
2006-02-13 Chia-I Wu <b90201047@ntu.edu.tw>
* src/sfnt/ttmtx.h, src/sfnt/ttmtx.c: Why are there two copies of

View File

@ -512,6 +512,7 @@ FT_BEGIN_HEADER
/* be called from external modules, if there is a need to do so */
TT_Load_Table_Func load_head;
TT_Load_Metrics_Func load_hhea;
TT_Load_Metrics_Func load_hmtx;
TT_Load_Table_Func load_cmap;
TT_Load_Table_Func load_maxp;
TT_Load_Table_Func load_os2;

View File

@ -390,6 +390,7 @@
tt_face_load_head,
tt_face_load_hhea,
tt_face_load_hmtx,
tt_face_load_cmap,
tt_face_load_maxp,
tt_face_load_os2,

View File

@ -561,12 +561,14 @@
if ( !is_apple_sbit )
{
/* load the `hhea' and `hmtx' tables at once */
error = sfnt->load_hhea( face, stream, 0 );
error = sfnt->load_hhea( face, stream, 0 ) ||
sfnt->load_hmtx( face, stream, 0 );
if ( error )
goto Exit;
/* try to load the `vhea' and `vmtx' tables at once */
error = sfnt->load_hhea( face, stream, 1 );
error = sfnt->load_hhea( face, stream, 1 ) ||
sfnt->load_hmtx( face, stream, 1 );
if ( error )
goto Exit;

View File

@ -55,7 +55,7 @@
/* */
#ifdef FT_OPTIMIZE_MEMORY
static FT_Error
FT_LOCAL_DEF( FT_Error )
tt_face_load_hmtx( TT_Face face,
FT_Stream stream,
FT_Bool vertical )
@ -130,7 +130,7 @@
#else /* !OPTIMIZE_MEMORY */
static FT_Error
FT_LOCAL_DEF( FT_Error )
tt_face_load_hmtx( TT_Face face,
FT_Stream stream,
FT_Bool vertical )
@ -378,9 +378,7 @@
FT_TRACE2(( "loaded\n" ));
/* Now try to load the corresponding metrics */
error = tt_face_load_hmtx( face, stream, vertical );
return SFNT_Err_Ok;
Exit:
return error;

View File

@ -34,6 +34,12 @@ FT_BEGIN_HEADER
FT_Bool vertical );
FT_LOCAL( FT_Error )
tt_face_load_hmtx( TT_Face face,
FT_Stream stream,
FT_Bool vertical );
FT_LOCAL( FT_Error )
tt_face_get_metrics( TT_Face face,
FT_Bool vertical,