| OLD | NEW |
| 1 /***************************************************************************/ | 1 /***************************************************************************/ |
| 2 /* */ | 2 /* */ |
| 3 /* ftsnames.c */ | 3 /* ftsnames.c */ |
| 4 /* */ | 4 /* */ |
| 5 /* Simple interface to access SFNT name tables (which are used */ | 5 /* Simple interface to access SFNT name tables (which are used */ |
| 6 /* to hold font names, copyright info, notices, etc.) (body). */ | 6 /* to hold font names, copyright info, notices, etc.) (body). */ |
| 7 /* */ | 7 /* */ |
| 8 /* This is _not_ used to retrieve glyph names! */ | 8 /* This is _not_ used to retrieve glyph names! */ |
| 9 /* */ | 9 /* */ |
| 10 /* Copyright 1996-2001, 2002, 2009 by */ | 10 /* Copyright 1996-2001, 2002, 2009 by */ |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 } | 37 } |
| 38 | 38 |
| 39 | 39 |
| 40 /* documentation is in ftsnames.h */ | 40 /* documentation is in ftsnames.h */ |
| 41 | 41 |
| 42 FT_EXPORT_DEF( FT_Error ) | 42 FT_EXPORT_DEF( FT_Error ) |
| 43 FT_Get_Sfnt_Name( FT_Face face, | 43 FT_Get_Sfnt_Name( FT_Face face, |
| 44 FT_UInt idx, | 44 FT_UInt idx, |
| 45 FT_SfntName *aname ) | 45 FT_SfntName *aname ) |
| 46 { | 46 { |
| 47 FT_Error error = FT_Err_Invalid_Argument; | 47 FT_Error error = FT_ERR( Invalid_Argument ); |
| 48 | 48 |
| 49 | 49 |
| 50 if ( aname && face && FT_IS_SFNT( face ) ) | 50 if ( aname && face && FT_IS_SFNT( face ) ) |
| 51 { | 51 { |
| 52 TT_Face ttface = (TT_Face)face; | 52 TT_Face ttface = (TT_Face)face; |
| 53 | 53 |
| 54 | 54 |
| 55 if ( idx < (FT_UInt)ttface->num_names ) | 55 if ( idx < (FT_UInt)ttface->num_names ) |
| 56 { | 56 { |
| 57 TT_NameEntryRec* entry = ttface->name_table.names + idx; | 57 TT_NameEntryRec* entry = ttface->name_table.names + idx; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 85 } | 85 } |
| 86 | 86 |
| 87 return error; | 87 return error; |
| 88 } | 88 } |
| 89 | 89 |
| 90 | 90 |
| 91 #endif /* TT_CONFIG_OPTION_SFNT_NAMES */ | 91 #endif /* TT_CONFIG_OPTION_SFNT_NAMES */ |
| 92 | 92 |
| 93 | 93 |
| 94 /* END */ | 94 /* END */ |
| OLD | NEW |