diff --git a/ChangeLog b/ChangeLog index 6bbe779d3..bcd15cf39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-02-13 Chia-I Wu + + 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 * src/sfnt/ttmtx.h, src/sfnt/ttmtx.c: Why are there two copies of diff --git a/include/freetype/internal/sfnt.h b/include/freetype/internal/sfnt.h index 4d54fb35d..e49e023b2 100644 --- a/include/freetype/internal/sfnt.h +++ b/include/freetype/internal/sfnt.h @@ -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; diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c index f45195072..8a8b3e8b8 100644 --- a/src/sfnt/sfdriver.c +++ b/src/sfnt/sfdriver.c @@ -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, diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c index e16cc9440..169fba281 100644 --- a/src/sfnt/sfobjs.c +++ b/src/sfnt/sfobjs.c @@ -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; diff --git a/src/sfnt/ttmtx.c b/src/sfnt/ttmtx.c index 86436ed36..43a195321 100644 --- a/src/sfnt/ttmtx.c +++ b/src/sfnt/ttmtx.c @@ -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; diff --git a/src/sfnt/ttmtx.h b/src/sfnt/ttmtx.h index 425a6166b..8b91a113d 100644 --- a/src/sfnt/ttmtx.h +++ b/src/sfnt/ttmtx.h @@ -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,