[sfnt] Make `tt_face_get_name' member of the SFNT interface.

* include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
prototype.
(SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.

* src/sfnt/sfdriver.c (sfnt_interface): Updated.

* src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
* src/sfnt/sfobjs.h: Add prototype for it.
This commit is contained in:
Werner Lemberg 2015-07-07 14:04:44 +02:00
parent 6f91896980
commit 1cdac10d3a
5 changed files with 59 additions and 24 deletions

View File

@ -1,3 +1,16 @@
2015-07-07 Werner Lemberg <wl@gnu.org>
[sfnt] Make `tt_face_get_name' member of the SFNT interface.
* include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
prototype.
(SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
* src/sfnt/sfdriver.c (sfnt_interface): Updated.
* src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
* src/sfnt/sfobjs.h: Add prototype for it.
2015-06-30 Werner Lemberg <wl@gnu.org>
Fix some clang compiler warnings.

View File

@ -424,6 +424,33 @@ FT_BEGIN_HEADER
FT_UShort* aadvance );
/*************************************************************************/
/* */
/* <FuncType> */
/* TT_Get_Name_Func */
/* */
/* <Description> */
/* From the `name' table, return a given ENGLISH name record in */
/* ASCII. */
/* */
/* <Input> */
/* face :: A handle to the source face object. */
/* */
/* nameid :: The name id of the name record to return. */
/* */
/* <InOut> */
/* name :: The address of an allocated string pointer. NULL if */
/* no name is present. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
typedef FT_Error
(*TT_Get_Name_Func)( TT_Face face,
FT_UShort nameid,
FT_String** name );
/*************************************************************************/
/* */
/* <FuncType> */
@ -556,6 +583,8 @@ FT_BEGIN_HEADER
TT_Get_Metrics_Func get_metrics;
TT_Get_Name_Func get_name;
} SFNT_Interface;
@ -594,7 +623,8 @@ FT_BEGIN_HEADER
free_eblc_, \
set_sbit_strike_, \
load_strike_metrics_, \
get_metrics_ ) \
get_metrics_, \
get_name_ ) \
static const SFNT_Interface class_ = \
{ \
goto_table_, \
@ -626,6 +656,7 @@ FT_BEGIN_HEADER
set_sbit_strike_, \
load_strike_metrics_, \
get_metrics_, \
get_name_, \
};
#else /* FT_CONFIG_OPTION_PIC */
@ -663,7 +694,8 @@ FT_BEGIN_HEADER
free_eblc_, \
set_sbit_strike_, \
load_strike_metrics_, \
get_metrics_ ) \
get_metrics_, \
get_name_ ) \
void \
FT_Init_Class_ ## class_( FT_Library library, \
SFNT_Interface* clazz ) \
@ -699,6 +731,7 @@ FT_BEGIN_HEADER
clazz->set_sbit_strike = set_sbit_strike_; \
clazz->load_strike_metrics = load_strike_metrics_; \
clazz->get_metrics = get_metrics_; \
clazz->get_name = get_name_; \
}
#endif /* FT_CONFIG_OPTION_PIC */

View File

@ -505,7 +505,9 @@
PUT_EMBEDDED_BITMAPS( tt_face_set_sbit_strike ),
PUT_EMBEDDED_BITMAPS( tt_face_load_strike_metrics ),
tt_face_get_metrics
tt_face_get_metrics,
tt_face_get_name
)

View File

@ -120,27 +120,9 @@
FT_Memory memory );
/*************************************************************************/
/* */
/* <Function> */
/* tt_face_get_name */
/* */
/* <Description> */
/* Returns a given ENGLISH name record in ASCII. */
/* */
/* <Input> */
/* face :: A handle to the source face object. */
/* */
/* nameid :: The name id of the name record to return. */
/* */
/* <InOut> */
/* name :: The address of a string pointer. NULL if no name is */
/* present. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
static FT_Error
/* documentation is in sfnt.h */
FT_LOCAL_DEF( FT_Error )
tt_face_get_name( TT_Face face,
FT_UShort nameid,
FT_String** name )

View File

@ -45,6 +45,11 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
sfnt_done_face( TT_Face face );
FT_LOCAL( FT_Error )
tt_face_get_name( TT_Face face,
FT_UShort nameid,
FT_String** name );
FT_END_HEADER