ReactOS 0.4.16-dev-1067-ge98bba2
sfobjs.h File Reference
#include <ft2build.h>
Include dependency graph for sfobjs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

FT_BEGIN_HEADER sfnt_init_face (FT_Stream stream, TT_Face face, FT_Int face_instance_index, FT_Int num_params, FT_Parameter *params)
 
 sfnt_load_face (FT_Stream stream, TT_Face face, FT_Int face_instance_index, FT_Int num_params, FT_Parameter *params)
 
 sfnt_done_face (TT_Face face)
 
 tt_face_get_name (TT_Face face, FT_UShort nameid, FT_String **name)
 

Function Documentation

◆ sfnt_done_face()

sfnt_done_face ( TT_Face  face)

Definition at line 1744 of file sfobjs.c.

1745 {
1748
1749
1750 if ( !face )
1751 return;
1752
1753 memory = face->root.memory;
1754 sfnt = (SFNT_Service)face->sfnt;
1755
1756 if ( sfnt )
1757 {
1758 /* destroy the postscript names table if it is loaded */
1759 if ( sfnt->free_psnames )
1761
1762 /* destroy the embedded bitmaps table if it is loaded */
1763 if ( sfnt->free_eblc )
1764 sfnt->free_eblc( face );
1765
1766 /* destroy color table data if it is loaded */
1767 if ( sfnt->free_cpal )
1768 {
1769 sfnt->free_cpal( face );
1770 sfnt->free_colr( face );
1771 }
1772 }
1773
1774#ifdef TT_CONFIG_OPTION_BDF
1775 /* freeing the embedded BDF properties */
1776 tt_face_free_bdf_props( face );
1777#endif
1778
1779 /* freeing the kerning table */
1781
1782 /* freeing the collection table */
1783 FT_FREE( face->ttc_header.offsets );
1784 face->ttc_header.count = 0;
1785
1786 /* freeing table directory */
1787 FT_FREE( face->dir_tables );
1788 face->num_tables = 0;
1789
1790 {
1792
1793
1794 /* simply release the 'cmap' table frame */
1795 FT_FRAME_RELEASE( face->cmap_table );
1796 face->cmap_size = 0;
1797 }
1798
1799 face->horz_metrics_size = 0;
1800 face->vert_metrics_size = 0;
1801
1802 /* freeing vertical metrics, if any */
1803 if ( face->vertical_info )
1804 {
1805 FT_FREE( face->vertical.long_metrics );
1806 FT_FREE( face->vertical.short_metrics );
1807 face->vertical_info = 0;
1808 }
1809
1810 /* freeing the gasp table */
1811 FT_FREE( face->gasp.gaspRanges );
1812 face->gasp.numRanges = 0;
1813
1814 /* freeing the name table */
1815 if ( sfnt )
1816 sfnt->free_name( face );
1817
1818 /* freeing family and style name */
1819 FT_FREE( face->root.family_name );
1820 FT_FREE( face->root.style_name );
1821
1822 /* freeing sbit size table */
1823 FT_FREE( face->root.available_sizes );
1824 FT_FREE( face->sbit_strike_map );
1825 face->root.num_fixed_sizes = 0;
1826
1827 FT_FREE( face->postscript_name );
1828
1829#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
1830 FT_FREE( face->var_postscript_prefix );
1831#endif
1832
1833 /* freeing glyph color palette data */
1834 FT_FREE( face->palette_data.palette_name_ids );
1835 FT_FREE( face->palette_data.palette_flags );
1836 FT_FREE( face->palette_data.palette_entry_name_ids );
1837 FT_FREE( face->palette );
1838
1839 face->sfnt = NULL;
1840 }
#define NULL
Definition: types.h:112
#define FT_FREE(ptr)
Definition: ftmemory.h:328
#define FT_FACE_STREAM(x)
Definition: ftobjs.h:606
#define FT_FRAME_RELEASE(bytes)
Definition: ftstream.h:551
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:65
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
if(dx< 0)
Definition: linetemp.h:194
static char memory[1024 *256]
Definition: process.c:116
SFNT_Interface * SFNT_Service
Definition: sfnt.h:784
TT_Free_Table_Func free_eblc
Definition: sfnt.h:762
TT_Free_Table_Func free_name
Definition: sfnt.h:731
TT_Free_Table_Func free_cpal
Definition: sfnt.h:769
TT_Free_Table_Func free_psnames
Definition: sfnt.h:747
TT_Free_Table_Func free_colr
Definition: sfnt.h:770
Definition: parse.h:23
SFNT_Service sfnt
Definition: ttdriver.c:209
tt_face_done_kern(TT_Face face)
Definition: ttkern.c:173

◆ sfnt_init_face()

FT_BEGIN_HEADER sfnt_init_face ( FT_Stream  stream,
TT_Face  face,
FT_Int  face_instance_index,
FT_Int  num_params,
FT_Parameter params 
)

Definition at line 854 of file sfobjs.c.

859 {
861 FT_Library library = face->root.driver->root.library;
863 FT_Int face_index;
864
865
866 /* for now, parameters are unused */
867 FT_UNUSED( num_params );
868 FT_UNUSED( params );
869
870
871 sfnt = (SFNT_Service)face->sfnt;
872 if ( !sfnt )
873 {
875 if ( !sfnt )
876 {
877 FT_ERROR(( "sfnt_init_face: cannot access `sfnt' module\n" ));
878 return FT_THROW( Missing_Module );
879 }
880
881 face->sfnt = sfnt;
883 }
884
885 FT_FACE_FIND_GLOBAL_SERVICE( face, face->psnames, POSTSCRIPT_CMAPS );
886
887#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
888 if ( !face->mm )
889 {
890 /* we want the MM interface from the `truetype' module only */
891 FT_Module tt_module = FT_Get_Module( library, "truetype" );
892
893
894 face->mm = ft_module_get_service( tt_module,
896 0 );
897 }
898
899 if ( !face->var )
900 {
901 /* we want the metrics variations interface */
902 /* from the `truetype' module only */
903 FT_Module tt_module = FT_Get_Module( library, "truetype" );
904
905
906 face->var = ft_module_get_service( tt_module,
908 0 );
909 }
910#endif
911
912 FT_TRACE2(( "SFNT driver\n" ));
913
915 if ( error )
916 return error;
917
918 /* Stream may have changed in sfnt_open_font. */
919 stream = face->root.stream;
920
921 FT_TRACE2(( "sfnt_init_face: %08p (index %d)\n",
922 face,
923 face_instance_index ));
924
925 face_index = FT_ABS( face_instance_index ) & 0xFFFF;
926
927 /* value -(N+1) requests information on index N */
928 if ( face_instance_index < 0 )
929 face_index--;
930
931 if ( face_index >= face->ttc_header.count )
932 {
933 if ( face_instance_index >= 0 )
934 return FT_THROW( Invalid_Argument );
935 else
936 face_index = 0;
937 }
938
939 if ( FT_STREAM_SEEK( face->ttc_header.offsets[face_index] ) )
940 return error;
941
942 /* check whether we have a valid TrueType file */
944 if ( error )
945 return error;
946
947#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
948 {
949 FT_Memory memory = face->root.memory;
950
951 FT_ULong fvar_len;
952
955
956 FT_UShort num_axes;
957 FT_UShort axis_size;
958 FT_UShort num_instances;
959 FT_UShort instance_size;
960
961 FT_Int instance_index;
962
963 FT_Byte* default_values = NULL;
964 FT_Byte* instance_values = NULL;
965
966
967 instance_index = FT_ABS( face_instance_index ) >> 16;
968
969 /* test whether current face is a GX font with named instances */
970 if ( face->goto_table( face, TTAG_fvar, stream, &fvar_len ) ||
971 fvar_len < 20 ||
974 FT_STREAM_SKIP( 2 ) /* reserved */ ||
975 FT_READ_USHORT( num_axes ) ||
976 FT_READ_USHORT( axis_size ) ||
977 FT_READ_USHORT( num_instances ) ||
978 FT_READ_USHORT( instance_size ) )
979 {
980 version = 0;
981 offset = 0;
982 num_axes = 0;
983 axis_size = 0;
984 num_instances = 0;
985 instance_size = 0;
986 }
987
988 /* check that the data is bound by the table length */
989 if ( version != 0x00010000UL ||
990 axis_size != 20 ||
991 num_axes == 0 ||
992 /* `num_axes' limit implied by 16-bit `instance_size' */
993 num_axes > 0x3FFE ||
994 !( instance_size == 4 + 4 * num_axes ||
995 instance_size == 6 + 4 * num_axes ) ||
996 /* `num_instances' limit implied by limited range of name IDs */
997 num_instances > 0x7EFF ||
998 offset +
999 axis_size * num_axes +
1000 instance_size * num_instances > fvar_len )
1001 num_instances = 0;
1002 else
1003 face->variation_support |= TT_FACE_FLAG_VAR_FVAR;
1004
1005 /*
1006 * As documented in the OpenType specification, an entry for the
1007 * default instance may be omitted in the named instance table. In
1008 * particular this means that even if there is no named instance
1009 * table in the font we actually do have a named instance, namely the
1010 * default instance.
1011 *
1012 * For consistency, we always want the default instance in our list
1013 * of named instances. If it is missing, we try to synthesize it
1014 * later on. Here, we have to adjust `num_instances' accordingly.
1015 */
1016
1017 if ( ( face->variation_support & TT_FACE_FLAG_VAR_FVAR ) &&
1018 !( FT_ALLOC( default_values, num_axes * 4 ) ||
1019 FT_ALLOC( instance_values, num_axes * 4 ) ) )
1020 {
1021 /* the current stream position is 16 bytes after the table start */
1022 FT_ULong array_start = FT_STREAM_POS() - 16 + offset;
1023 FT_ULong default_value_offset, instance_offset;
1024
1025 FT_Byte* p;
1026 FT_UInt i;
1027
1028
1029 default_value_offset = array_start + 8;
1030 p = default_values;
1031
1032 for ( i = 0; i < num_axes; i++ )
1033 {
1034 (void)FT_STREAM_READ_AT( default_value_offset, p, 4 );
1035
1036 default_value_offset += axis_size;
1037 p += 4;
1038 }
1039
1040 instance_offset = array_start + axis_size * num_axes + 4;
1041
1042 for ( i = 0; i < num_instances; i++ )
1043 {
1044 (void)FT_STREAM_READ_AT( instance_offset,
1045 instance_values,
1046 num_axes * 4 );
1047
1048 if ( !ft_memcmp( default_values, instance_values, num_axes * 4 ) )
1049 break;
1050
1051 instance_offset += instance_size;
1052 }
1053
1054 if ( i == num_instances )
1055 {
1056 /* no default instance in named instance table; */
1057 /* we thus have to synthesize it */
1058 num_instances++;
1059 }
1060 }
1061
1062 FT_FREE( default_values );
1063 FT_FREE( instance_values );
1064
1065 /* we don't support Multiple Master CFFs yet; */
1066 /* note that `glyf' or `CFF2' have precedence */
1067 if ( face->goto_table( face, TTAG_glyf, stream, 0 ) &&
1068 face->goto_table( face, TTAG_CFF2, stream, 0 ) &&
1069 !face->goto_table( face, TTAG_CFF, stream, 0 ) )
1070 num_instances = 0;
1071
1072 /* instance indices in `face_instance_index' start with index 1, */
1073 /* thus `>' and not `>=' */
1074 if ( instance_index > num_instances )
1075 {
1076 if ( face_instance_index >= 0 )
1077 return FT_THROW( Invalid_Argument );
1078 else
1079 num_instances = 0;
1080 }
1081
1082 face->root.style_flags = (FT_Long)num_instances << 16;
1083 }
1084#endif
1085
1086 face->root.num_faces = face->ttc_header.count;
1087 face->root.face_index = face_instance_index;
1088
1089 return error;
1090 }
FT_Library library
Definition: cffdrivr.c:661
static const WCHAR version[]
Definition: asmname.c:66
#define FT_UNUSED(arg)
Definition: ftconfig.h:100
#define FT_ERROR(varformat)
Definition: ftdebug.h:209
#define FT_THROW(e)
Definition: ftdebug.h:241
#define FT_TRACE2(varformat)
Definition: ftdebug.h:187
#define FT_ALLOC(ptr, size)
Definition: ftmemory.h:302
FT_Get_Module(FT_Library library, const char *module_name)
Definition: ftobjs.c:4964
#define FT_ABS(a)
Definition: ftobjs.h:73
ft_module_get_service(FT_Module module, const char *service_id, FT_Bool global)
Definition: ftobjs.c:5007
FT_Get_Module_Interface(FT_Library library, const char *mod_name)
Definition: ftobjs.c:4992
#define FT_FACE_FIND_GLOBAL_SERVICE(face, ptr, id)
Definition: ftserv.h:127
#define ft_memcmp
Definition: ftstdlib.h:81
#define FT_READ_USHORT(var)
Definition: ftstream.h:328
#define FT_STREAM_SEEK(position)
Definition: ftstream.h:514
#define FT_READ_ULONG(var)
Definition: ftstream.h:332
#define FT_STREAM_POS()
Definition: ftstream.h:511
#define FT_STREAM_SKIP(distance)
Definition: ftstream.h:518
#define FT_STREAM_READ_AT(position, buffer, count)
Definition: ftstream.h:527
unsigned long FT_ULong
Definition: fttypes.h:253
unsigned char FT_Byte
Definition: fttypes.h:154
int FT_Error
Definition: fttypes.h:299
signed long FT_Long
Definition: fttypes.h:242
unsigned short FT_UShort
Definition: fttypes.h:209
unsigned int FT_UInt
Definition: fttypes.h:231
signed int FT_Int
Definition: fttypes.h:220
GLintptr offset
Definition: glext.h:5920
GLenum const GLfloat * params
Definition: glext.h:5645
GLfloat GLfloat p
Definition: glext.h:8902
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define error(str)
Definition: mkdosfs.c:1605
static FT_Error sfnt_open_font(FT_Stream stream, TT_Face face)
Definition: sfobjs.c:740
TT_Load_Table_Func load_font_dir
Definition: sfnt.h:758
TT_Loader_GotoTableFunc goto_table
Definition: sfnt.h:712
#define FT_SERVICE_ID_METRICS_VARIATIONS
Definition: svmetric.h:33
#define FT_SERVICE_ID_MULTI_MASTERS
Definition: svmm.h:35
#define TTAG_fvar
Definition: tttags.h:60
#define TTAG_CFF2
Definition: tttags.h:46
#define TTAG_glyf
Definition: tttags.h:63
#define TTAG_CFF
Definition: tttags.h:45
#define TT_FACE_FLAG_VAR_FVAR
Definition: tttypes.h:1208

◆ sfnt_load_face()

sfnt_load_face ( FT_Stream  stream,
TT_Face  face,
FT_Int  face_instance_index,
FT_Int  num_params,
FT_Parameter params 
)

Definition at line 1136 of file sfobjs.c.

1141 {
1143#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
1144 FT_Error psnames_error;
1145#endif
1146 FT_Bool has_outline;
1147 FT_Bool is_apple_sbit;
1148 FT_Bool is_apple_sbix;
1149 FT_Bool has_CBLC;
1150 FT_Bool has_CBDT;
1151 FT_Bool ignore_typographic_family = FALSE;
1152 FT_Bool ignore_typographic_subfamily = FALSE;
1153
1155
1156 FT_UNUSED( face_instance_index );
1157
1158
1159 /* Check parameters */
1160
1161 {
1162 FT_Int i;
1163
1164
1165 for ( i = 0; i < num_params; i++ )
1166 {
1168 ignore_typographic_family = TRUE;
1170 ignore_typographic_subfamily = TRUE;
1171 }
1172 }
1173
1174 /* Load tables */
1175
1176 /* We now support two SFNT-based bitmapped font formats. They */
1177 /* are recognized easily as they do not include a `glyf' */
1178 /* table. */
1179 /* */
1180 /* The first format comes from Apple, and uses a table named */
1181 /* `bhed' instead of `head' to store the font header (using */
1182 /* the same format). It also doesn't include horizontal and */
1183 /* vertical metrics tables (i.e. `hhea' and `vhea' tables are */
1184 /* missing). */
1185 /* */
1186 /* The other format comes from Microsoft, and is used with */
1187 /* WinCE/PocketPC. It looks like a standard TTF, except that */
1188 /* it doesn't contain outlines. */
1189 /* */
1190
1191 FT_TRACE2(( "sfnt_load_face: %08p\n\n", face ));
1192
1193 /* do we have outlines in there? */
1194#ifdef FT_CONFIG_OPTION_INCREMENTAL
1195 has_outline = FT_BOOL( face->root.internal->incremental_interface ||
1199#else
1200 has_outline = FT_BOOL( tt_face_lookup_table( face, TTAG_glyf ) ||
1203#endif
1204
1205 is_apple_sbit = 0;
1206 is_apple_sbix = !face->goto_table( face, TTAG_sbix, stream, 0 );
1207
1208 /* Apple 'sbix' color bitmaps are rendered scaled and then the 'glyf'
1209 * outline rendered on top. We don't support that yet, so just ignore
1210 * the 'glyf' outline and advertise it as a bitmap-only font. */
1211 if ( is_apple_sbix )
1212 has_outline = FALSE;
1213
1214 /* if this font doesn't contain outlines, we try to load */
1215 /* a `bhed' table */
1216 if ( !has_outline && sfnt->load_bhed )
1217 {
1218 LOAD_( bhed );
1219 is_apple_sbit = FT_BOOL( !error );
1220 }
1221
1222 /* load the font header (`head' table) if this isn't an Apple */
1223 /* sbit font file */
1224 if ( !is_apple_sbit || is_apple_sbix )
1225 {
1226 LOAD_( head );
1227 if ( error )
1228 goto Exit;
1229 }
1230
1231 has_CBLC = !face->goto_table( face, TTAG_CBLC, stream, 0 );
1232 has_CBDT = !face->goto_table( face, TTAG_CBDT, stream, 0 );
1233
1234 /* Ignore outlines for CBLC/CBDT fonts. */
1235 if ( has_CBLC || has_CBDT )
1236 has_outline = FALSE;
1237
1238 /* OpenType 1.8.2 introduced limits to this value; */
1239 /* however, they make sense for older SFNT fonts also */
1240 if ( face->header.Units_Per_EM < 16 ||
1241 face->header.Units_Per_EM > 16384 )
1242 {
1243 error = FT_THROW( Invalid_Table );
1244
1245 goto Exit;
1246 }
1247
1248 /* the following tables are often not present in embedded TrueType */
1249 /* fonts within PDF documents, so don't check for them. */
1250 LOAD_( maxp );
1251 LOAD_( cmap );
1252
1253 /* the following tables are optional in PCL fonts -- */
1254 /* don't check for errors */
1255 LOAD_( name );
1256 LOAD_( post );
1257
1258#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
1259 psnames_error = error;
1260#endif
1261
1262 /* do not load the metrics headers and tables if this is an Apple */
1263 /* sbit font file */
1264 if ( !is_apple_sbit )
1265 {
1266 /* load the `hhea' and `hmtx' tables */
1267 LOADM_( hhea, 0 );
1268 if ( !error )
1269 {
1270 LOADM_( hmtx, 0 );
1271 if ( FT_ERR_EQ( error, Table_Missing ) )
1272 {
1273 error = FT_THROW( Hmtx_Table_Missing );
1274
1275#ifdef FT_CONFIG_OPTION_INCREMENTAL
1276 /* If this is an incrementally loaded font and there are */
1277 /* overriding metrics, tolerate a missing `hmtx' table. */
1278 if ( face->root.internal->incremental_interface &&
1279 face->root.internal->incremental_interface->funcs->
1280 get_glyph_metrics )
1281 {
1282 face->horizontal.number_Of_HMetrics = 0;
1283 error = FT_Err_Ok;
1284 }
1285#endif
1286 }
1287 }
1288 else if ( FT_ERR_EQ( error, Table_Missing ) )
1289 {
1290 /* No `hhea' table necessary for SFNT Mac fonts. */
1291 if ( face->format_tag == TTAG_true )
1292 {
1293 FT_TRACE2(( "This is an SFNT Mac font.\n" ));
1294
1295 has_outline = 0;
1296 error = FT_Err_Ok;
1297 }
1298 else
1299 {
1300 error = FT_THROW( Horiz_Header_Missing );
1301
1302#ifdef FT_CONFIG_OPTION_INCREMENTAL
1303 /* If this is an incrementally loaded font and there are */
1304 /* overriding metrics, tolerate a missing `hhea' table. */
1305 if ( face->root.internal->incremental_interface &&
1306 face->root.internal->incremental_interface->funcs->
1307 get_glyph_metrics )
1308 {
1309 face->horizontal.number_Of_HMetrics = 0;
1310 error = FT_Err_Ok;
1311 }
1312#endif
1313
1314 }
1315 }
1316
1317 if ( error )
1318 goto Exit;
1319
1320 /* try to load the `vhea' and `vmtx' tables */
1321 LOADM_( hhea, 1 );
1322 if ( !error )
1323 {
1324 LOADM_( hmtx, 1 );
1325 if ( !error )
1326 face->vertical_info = 1;
1327 }
1328
1329 if ( error && FT_ERR_NEQ( error, Table_Missing ) )
1330 goto Exit;
1331
1332 LOAD_( os2 );
1333 if ( error )
1334 {
1335 /* we treat the table as missing if there are any errors */
1336 face->os2.version = 0xFFFFU;
1337 }
1338 }
1339
1340 /* the optional tables */
1341
1342 /* embedded bitmap support */
1343 if ( sfnt->load_eblc )
1344 LOAD_( eblc );
1345
1346 /* colored glyph support */
1347 if ( sfnt->load_cpal )
1348 {
1349 LOAD_( cpal );
1350 LOAD_( colr );
1351 }
1352
1353 /* consider the pclt, kerning, and gasp tables as optional */
1354 LOAD_( pclt );
1355 LOAD_( gasp );
1356 LOAD_( kern );
1357
1358 face->root.num_glyphs = face->max_profile.numGlyphs;
1359
1360 /* Bit 8 of the `fsSelection' field in the `OS/2' table denotes */
1361 /* a WWS-only font face. `WWS' stands for `weight', width', and */
1362 /* `slope', a term used by Microsoft's Windows Presentation */
1363 /* Foundation (WPF). This flag has been introduced in version */
1364 /* 1.5 of the OpenType specification (May 2008). */
1365
1366 face->root.family_name = NULL;
1367 face->root.style_name = NULL;
1368 if ( face->os2.version != 0xFFFFU && face->os2.fsSelection & 256 )
1369 {
1370 if ( !ignore_typographic_family )
1371 GET_NAME( TYPOGRAPHIC_FAMILY, &face->root.family_name );
1372 if ( !face->root.family_name )
1373 GET_NAME( FONT_FAMILY, &face->root.family_name );
1374
1375 if ( !ignore_typographic_subfamily )
1376 GET_NAME( TYPOGRAPHIC_SUBFAMILY, &face->root.style_name );
1377 if ( !face->root.style_name )
1378 GET_NAME( FONT_SUBFAMILY, &face->root.style_name );
1379 }
1380 else
1381 {
1382 GET_NAME( WWS_FAMILY, &face->root.family_name );
1383 if ( !face->root.family_name && !ignore_typographic_family )
1384 GET_NAME( TYPOGRAPHIC_FAMILY, &face->root.family_name );
1385 if ( !face->root.family_name )
1386 GET_NAME( FONT_FAMILY, &face->root.family_name );
1387
1388 GET_NAME( WWS_SUBFAMILY, &face->root.style_name );
1389 if ( !face->root.style_name && !ignore_typographic_subfamily )
1390 GET_NAME( TYPOGRAPHIC_SUBFAMILY, &face->root.style_name );
1391 if ( !face->root.style_name )
1392 GET_NAME( FONT_SUBFAMILY, &face->root.style_name );
1393 }
1394
1395 /* now set up root fields */
1396 {
1397 FT_Face root = &face->root;
1398 FT_Long flags = root->face_flags;
1399
1400
1401 /**********************************************************************
1402 *
1403 * Compute face flags.
1404 */
1405 if ( face->sbit_table_type == TT_SBIT_TABLE_TYPE_CBLC ||
1406 face->sbit_table_type == TT_SBIT_TABLE_TYPE_SBIX ||
1407 face->colr )
1408 flags |= FT_FACE_FLAG_COLOR; /* color glyphs */
1409
1410 if ( has_outline == TRUE )
1411 flags |= FT_FACE_FLAG_SCALABLE; /* scalable outlines */
1412
1413 /* The sfnt driver only supports bitmap fonts natively, thus we */
1414 /* don't set FT_FACE_FLAG_HINTER. */
1415 flags |= FT_FACE_FLAG_SFNT | /* SFNT file format */
1416 FT_FACE_FLAG_HORIZONTAL; /* horizontal data */
1417
1418#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
1419 if ( !psnames_error &&
1420 face->postscript.FormatType != 0x00030000L )
1422#endif
1423
1424 /* fixed width font? */
1425 if ( face->postscript.isFixedPitch )
1427
1428 /* vertical information? */
1429 if ( face->vertical_info )
1431
1432 /* kerning available ? */
1433 if ( TT_FACE_HAS_KERNING( face ) )
1435
1436#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
1437 /* Don't bother to load the tables unless somebody asks for them. */
1438 /* No need to do work which will (probably) not be used. */
1439 if ( face->variation_support & TT_FACE_FLAG_VAR_FVAR )
1440 {
1441 if ( tt_face_lookup_table( face, TTAG_glyf ) != 0 &&
1444 if ( tt_face_lookup_table( face, TTAG_CFF2 ) != 0 )
1446 }
1447#endif
1448
1449 root->face_flags = flags;
1450
1451 /**********************************************************************
1452 *
1453 * Compute style flags.
1454 */
1455
1456 flags = 0;
1457 if ( has_outline == TRUE && face->os2.version != 0xFFFFU )
1458 {
1459 /* We have an OS/2 table; use the `fsSelection' field. Bit 9 */
1460 /* indicates an oblique font face. This flag has been */
1461 /* introduced in version 1.5 of the OpenType specification. */
1462
1463 if ( face->os2.fsSelection & 512 ) /* bit 9 */
1465 else if ( face->os2.fsSelection & 1 ) /* bit 0 */
1467
1468 if ( face->os2.fsSelection & 32 ) /* bit 5 */
1470 }
1471 else
1472 {
1473 /* this is an old Mac font, use the header field */
1474
1475 if ( face->header.Mac_Style & 1 )
1477
1478 if ( face->header.Mac_Style & 2 )
1480 }
1481
1482 root->style_flags |= flags;
1483
1484 /**********************************************************************
1485 *
1486 * Polish the charmaps.
1487 *
1488 * Try to set the charmap encoding according to the platform &
1489 * encoding ID of each charmap. Emulate Unicode charmap if one
1490 * is missing.
1491 */
1492
1493 tt_face_build_cmaps( face ); /* ignore errors */
1494
1495
1496 /* set the encoding fields */
1497 {
1498 FT_Int m;
1499#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
1500 FT_Bool has_unicode = FALSE;
1501#endif
1502
1503
1504 for ( m = 0; m < root->num_charmaps; m++ )
1505 {
1506 FT_CharMap charmap = root->charmaps[m];
1507
1508
1509 charmap->encoding = sfnt_find_encoding( charmap->platform_id,
1510 charmap->encoding_id );
1511
1512#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
1513
1514 if ( charmap->encoding == FT_ENCODING_UNICODE ||
1515 charmap->encoding == FT_ENCODING_MS_SYMBOL ) /* PUA */
1516 has_unicode = TRUE;
1517 }
1518
1519 /* synthesize Unicode charmap if one is missing */
1520 if ( !has_unicode )
1521 {
1522 FT_CharMapRec cmaprec;
1523
1524
1525 cmaprec.face = root;
1528 cmaprec.encoding = FT_ENCODING_UNICODE;
1529
1530
1532 NULL, &cmaprec, NULL );
1533 if ( error &&
1534 FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) &&
1535 FT_ERR_NEQ( error, Unimplemented_Feature ) )
1536 goto Exit;
1537 error = FT_Err_Ok;
1538
1539#endif /* FT_CONFIG_OPTION_POSTSCRIPT_NAMES */
1540
1541 }
1542 }
1543
1544#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
1545
1546 /*
1547 * Now allocate the root array of FT_Bitmap_Size records and
1548 * populate them. Unfortunately, it isn't possible to indicate bit
1549 * depths in the FT_Bitmap_Size record. This is a design error.
1550 */
1551 {
1552 FT_UInt count;
1553
1554
1555 count = face->sbit_num_strikes;
1556
1557 if ( count > 0 )
1558 {
1559 FT_Memory memory = face->root.stream->memory;
1560 FT_UShort em_size = face->header.Units_Per_EM;
1561 FT_Short avgwidth = face->os2.xAvgCharWidth;
1563
1564 FT_UInt* sbit_strike_map = NULL;
1565 FT_UInt strike_idx, bsize_idx;
1566
1567
1568 if ( em_size == 0 || face->os2.version == 0xFFFFU )
1569 {
1570 avgwidth = 1;
1571 em_size = 1;
1572 }
1573
1574 /* to avoid invalid strike data in the `available_sizes' field */
1575 /* of `FT_Face', we map `available_sizes' indices to strike */
1576 /* indices */
1577 if ( FT_NEW_ARRAY( root->available_sizes, count ) ||
1578 FT_NEW_ARRAY( sbit_strike_map, count ) )
1579 goto Exit;
1580
1581 bsize_idx = 0;
1582 for ( strike_idx = 0; strike_idx < count; strike_idx++ )
1583 {
1584 FT_Bitmap_Size* bsize = root->available_sizes + bsize_idx;
1585
1586
1587 error = sfnt->load_strike_metrics( face, strike_idx, &metrics );
1588 if ( error )
1589 continue;
1590
1591 bsize->height = (FT_Short)( metrics.height >> 6 );
1592 bsize->width = (FT_Short)(
1593 ( avgwidth * metrics.x_ppem + em_size / 2 ) / em_size );
1594
1595 bsize->x_ppem = metrics.x_ppem << 6;
1596 bsize->y_ppem = metrics.y_ppem << 6;
1597
1598 /* assume 72dpi */
1599 bsize->size = metrics.y_ppem << 6;
1600
1601 /* only use strikes with valid PPEM values */
1602 if ( bsize->x_ppem && bsize->y_ppem )
1603 sbit_strike_map[bsize_idx++] = strike_idx;
1604 }
1605
1606 /* reduce array size to the actually used elements */
1607 (void)FT_RENEW_ARRAY( sbit_strike_map, count, bsize_idx );
1608
1609 /* from now on, all strike indices are mapped */
1610 /* using `sbit_strike_map' */
1611 if ( bsize_idx )
1612 {
1613 face->sbit_strike_map = sbit_strike_map;
1614
1615 root->face_flags |= FT_FACE_FLAG_FIXED_SIZES;
1616 root->num_fixed_sizes = (FT_Int)bsize_idx;
1617 }
1618 }
1619 }
1620
1621#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
1622
1623 /* a font with no bitmaps and no outlines is scalable; */
1624 /* it has only empty glyphs then */
1625 if ( !FT_HAS_FIXED_SIZES( root ) && !FT_IS_SCALABLE( root ) )
1626 root->face_flags |= FT_FACE_FLAG_SCALABLE;
1627
1628
1629 /**********************************************************************
1630 *
1631 * Set up metrics.
1632 */
1633 if ( FT_IS_SCALABLE( root ) )
1634 {
1635 /* XXX What about if outline header is missing */
1636 /* (e.g. sfnt wrapped bitmap)? */
1637 root->bbox.xMin = face->header.xMin;
1638 root->bbox.yMin = face->header.yMin;
1639 root->bbox.xMax = face->header.xMax;
1640 root->bbox.yMax = face->header.yMax;
1641 root->units_per_EM = face->header.Units_Per_EM;
1642
1643
1644 /*
1645 * Computing the ascender/descender/height is tricky.
1646 *
1647 * The OpenType specification v1.8.3 says:
1648 *
1649 * [OS/2's] sTypoAscender, sTypoDescender and sTypoLineGap fields
1650 * are intended to allow applications to lay out documents in a
1651 * typographically-correct and portable fashion.
1652 *
1653 * This is somewhat at odds with the decades of backwards
1654 * compatibility, operating systems and applications doing whatever
1655 * they want, not to mention broken fonts.
1656 *
1657 * Not all fonts have an OS/2 table; in this case, we take the values
1658 * in the horizontal header, although there is nothing stopping the
1659 * values from being unreliable. Even with a OS/2 table, certain fonts
1660 * set the sTypoAscender, sTypoDescender and sTypoLineGap fields to 0
1661 * and instead correctly set usWinAscent and usWinDescent.
1662 *
1663 * As an example, Arial Narrow is shipped as four files ARIALN.TTF,
1664 * ARIALNI.TTF, ARIALNB.TTF and ARIALNBI.TTF. Strangely, all fonts have
1665 * the same values in their sTypo* fields, except ARIALNB.ttf which
1666 * sets them to 0. All of them have different usWinAscent/Descent
1667 * values. The OS/2 table therefore cannot be trusted for computing the
1668 * text height reliably.
1669 *
1670 * As a compromise, do the following:
1671 *
1672 * 1. If the OS/2 table exists and the fsSelection bit 7 is set
1673 * (USE_TYPO_METRICS), trust the font and use the sTypo* metrics.
1674 * 2. Otherwise, use the `hhea' table's metrics.
1675 * 3. If they are zero and the OS/2 table exists,
1676 * 1. use the OS/2 table's sTypo* metrics if they are non-zero.
1677 * 2. Otherwise, use the OS/2 table's usWin* metrics.
1678 */
1679
1680 if ( face->os2.version != 0xFFFFU && face->os2.fsSelection & 128 )
1681 {
1682 root->ascender = face->os2.sTypoAscender;
1683 root->descender = face->os2.sTypoDescender;
1684 root->height = root->ascender - root->descender +
1685 face->os2.sTypoLineGap;
1686 }
1687 else
1688 {
1689 root->ascender = face->horizontal.Ascender;
1690 root->descender = face->horizontal.Descender;
1691 root->height = root->ascender - root->descender +
1692 face->horizontal.Line_Gap;
1693
1694 if ( !( root->ascender || root->descender ) )
1695 {
1696 if ( face->os2.version != 0xFFFFU )
1697 {
1698 if ( face->os2.sTypoAscender || face->os2.sTypoDescender )
1699 {
1700 root->ascender = face->os2.sTypoAscender;
1701 root->descender = face->os2.sTypoDescender;
1702 root->height = root->ascender - root->descender +
1703 face->os2.sTypoLineGap;
1704 }
1705 else
1706 {
1707 root->ascender = (FT_Short)face->os2.usWinAscent;
1708 root->descender = -(FT_Short)face->os2.usWinDescent;
1709 root->height = root->ascender - root->descender;
1710 }
1711 }
1712 }
1713 }
1714
1715 root->max_advance_width =
1716 (FT_Short)face->horizontal.advance_Width_Max;
1717 root->max_advance_height =
1718 (FT_Short)( face->vertical_info ? face->vertical.advance_Height_Max
1719 : root->height );
1720
1721 /* See https://www.microsoft.com/typography/otspec/post.htm -- */
1722 /* Adjust underline position from top edge to centre of */
1723 /* stroke to convert TrueType meaning to FreeType meaning. */
1724 root->underline_position = face->postscript.underlinePosition -
1725 face->postscript.underlineThickness / 2;
1726 root->underline_thickness = face->postscript.underlineThickness;
1727 }
1728
1729 }
1730
1731 Exit:
1732 FT_TRACE2(( "sfnt_load_face: done\n" ));
1733
1734 return error;
1735 }
struct outqueuenode * head
Definition: adnsresfilter.c:66
struct _root root
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define TT_MS_ID_UNICODE_CS
Definition: font.c:1181
#define TT_PLATFORM_MICROSOFT
Definition: font.c:1174
#define FT_FACE_FLAG_KERNING
Definition: freetype.h:1216
#define FT_FACE_FLAG_SFNT
Definition: freetype.h:1213
#define FT_STYLE_FLAG_ITALIC
Definition: freetype.h:1488
#define FT_FACE_FLAG_FIXED_SIZES
Definition: freetype.h:1211
#define FT_FACE_FLAG_SCALABLE
Definition: freetype.h:1210
#define FT_FACE_FLAG_FIXED_WIDTH
Definition: freetype.h:1212
#define FT_HAS_FIXED_SIZES(face)
Definition: freetype.h:1333
#define FT_IS_SCALABLE(face)
Definition: freetype.h:1284
#define FT_FACE_FLAG_VERTICAL
Definition: freetype.h:1215
#define FT_FACE_FLAG_GLYPH_NAMES
Definition: freetype.h:1219
#define FT_FACE_FLAG_COLOR
Definition: freetype.h:1224
#define FT_FACE_FLAG_MULTIPLE_MASTERS
Definition: freetype.h:1218
#define FT_STYLE_FLAG_BOLD
Definition: freetype.h:1489
#define FT_FACE_FLAG_HORIZONTAL
Definition: freetype.h:1214
return FT_Err_Ok
Definition: ftbbox.c:527
#define FT_NEW_ARRAY(ptr, count)
Definition: ftmemory.h:332
#define FT_RENEW_ARRAY(ptr, curcnt, newcnt)
Definition: ftmemory.h:335
FT_CMap_New(FT_CMap_Class clazz, FT_Pointer init_data, FT_CharMap charmap, FT_CMap *acmap)
Definition: ftobjs.c:3657
#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
Definition: ftparams.h:69
#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
Definition: ftparams.h:93
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
#define FT_ERR_EQ(x, e)
Definition: fttypes.h:604
#define FT_ERR_NEQ(x, e)
Definition: fttypes.h:606
signed short FT_Short
Definition: fttypes.h:198
#define FT_BOOL(x)
Definition: fttypes.h:591
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
Definition: glext.h:11745
GLbitfield flags
Definition: glext.h:7161
const GLfloat * m
Definition: glext.h:10848
#define LOADM_(x, vertical)
Definition: sfobjs.c:1109
#define GET_NAME(id, field)
Definition: sfobjs.c:1126
#define LOAD_(x)
Definition: sfobjs.c:1093
static FT_Encoding sfnt_find_encoding(int platform_id, int encoding_id)
Definition: sfobjs.c:290
static void Exit(void)
Definition: sock.c:1330
FT_Pos y_ppem
Definition: freetype.h:379
FT_Pos x_ppem
Definition: freetype.h:378
FT_Short width
Definition: freetype.h:374
FT_Short height
Definition: freetype.h:373
FT_Face face
Definition: freetype.h:835
FT_Encoding encoding
Definition: freetype.h:836
FT_UShort platform_id
Definition: freetype.h:837
FT_UShort encoding_id
Definition: freetype.h:838
TT_Load_Strike_Metrics_Func load_strike_metrics
Definition: sfnt.h:765
TT_Load_Table_Func load_eblc
Definition: sfnt.h:761
TT_Load_Table_Func load_bhed
Definition: sfnt.h:741
TT_Load_Table_Func load_cpal
Definition: sfnt.h:767
Definition: name.c:39
Definition: ecma_167.h:138
tt_face_build_cmaps(TT_Face face)
Definition: ttcmap.c:3768
FT_CALLBACK_TABLE const TT_CMap_ClassRec tt_cmap_unicode_class_rec
Definition: ttcmap.h:106
#define TT_FACE_HAS_KERNING(face)
Definition: ttkern.h:44
tt_face_lookup_table(TT_Face face, FT_ULong tag)
Definition: ttload.c:58
#define TTAG_true
Definition: tttags.h:100
#define TTAG_CBDT
Definition: tttags.h:43
#define TTAG_CBLC
Definition: tttags.h:44
#define TTAG_gvar
Definition: tttags.h:66
#define TTAG_sbix
Definition: tttags.h:96
@ TT_SBIT_TABLE_TYPE_CBLC
Definition: tttypes.h:1188
@ TT_SBIT_TABLE_TYPE_SBIX
Definition: tttypes.h:1189

◆ tt_face_get_name()

tt_face_get_name ( TT_Face  face,
FT_UShort  nameid,
FT_String **  name 
)

Definition at line 132 of file sfobjs.c.

135 {
136 FT_Memory memory = face->root.memory;
139 FT_UShort n;
140 TT_Name rec;
141
142 FT_Int found_apple = -1;
143 FT_Int found_apple_roman = -1;
144 FT_Int found_apple_english = -1;
145 FT_Int found_win = -1;
146 FT_Int found_unicode = -1;
147
149
151
152
153 FT_ASSERT( name );
154
155 rec = face->name_table.names;
156 for ( n = 0; n < face->num_names; n++, rec++ )
157 {
158 /* According to the OpenType 1.3 specification, only Microsoft or */
159 /* Apple platform IDs might be used in the `name' table. The */
160 /* `Unicode' platform is reserved for the `cmap' table, and the */
161 /* `ISO' one is deprecated. */
162 /* */
163 /* However, the Apple TrueType specification doesn't say the same */
164 /* thing and goes to suggest that all Unicode `name' table entries */
165 /* should be coded in UTF-16 (in big-endian format I suppose). */
166 /* */
167 if ( rec->nameID == nameid && rec->stringLength > 0 )
168 {
169 switch ( rec->platformID )
170 {
172 case TT_PLATFORM_ISO:
173 /* there is `languageID' to check there. We should use this */
174 /* field only as a last solution when nothing else is */
175 /* available. */
176 /* */
177 found_unicode = n;
178 break;
179
181 /* This is a bit special because some fonts will use either */
182 /* an English language id, or a Roman encoding id, to indicate */
183 /* the English version of its font name. */
184 /* */
185 if ( rec->languageID == TT_MAC_LANGID_ENGLISH )
186 found_apple_english = n;
187 else if ( rec->encodingID == TT_MAC_ID_ROMAN )
188 found_apple_roman = n;
189 break;
190
192 /* we only take a non-English name when there is nothing */
193 /* else available in the font */
194 /* */
195 if ( found_win == -1 || ( rec->languageID & 0x3FF ) == 0x009 )
196 {
197 switch ( rec->encodingID )
198 {
201 case TT_MS_ID_UCS_4:
202 is_english = FT_BOOL( ( rec->languageID & 0x3FF ) == 0x009 );
203 found_win = n;
204 break;
205
206 default:
207 ;
208 }
209 }
210 break;
211
212 default:
213 ;
214 }
215 }
216 }
217
218 found_apple = found_apple_roman;
219 if ( found_apple_english >= 0 )
220 found_apple = found_apple_english;
221
222 /* some fonts contain invalid Unicode or Macintosh formatted entries; */
223 /* we will thus favor names encoded in Windows formats if available */
224 /* (provided it is an English name) */
225 /* */
226 convert = NULL;
227 if ( found_win >= 0 && !( found_apple >= 0 && !is_english ) )
228 {
229 rec = face->name_table.names + found_win;
230 switch ( rec->encodingID )
231 {
232 /* all Unicode strings are encoded using UTF-16BE */
236 break;
237
238 case TT_MS_ID_UCS_4:
239 /* Apparently, if this value is found in a name table entry, it is */
240 /* documented as `full Unicode repertoire'. Experience with the */
241 /* MsGothic font shipped with Windows Vista shows that this really */
242 /* means UTF-16 encoded names (UCS-4 values are only used within */
243 /* charmaps). */
245 break;
246
247 default:
248 ;
249 }
250 }
251 else if ( found_apple >= 0 )
252 {
253 rec = face->name_table.names + found_apple;
255 }
256 else if ( found_unicode >= 0 )
257 {
258 rec = face->name_table.names + found_unicode;
260 }
261
262 if ( rec && convert )
263 {
264 if ( !rec->string )
265 {
266 FT_Stream stream = face->name_table.stream;
267
268
269 if ( FT_QNEW_ARRAY ( rec->string, rec->stringLength ) ||
271 FT_STREAM_READ( rec->string, rec->stringLength ) )
272 {
273 FT_FREE( rec->string );
274 rec->stringLength = 0;
275 result = NULL;
276 goto Exit;
277 }
278 }
279
280 result = convert( rec, memory );
281 }
282
283 Exit:
284 *name = result;
285 return error;
286 }
#define TT_PLATFORM_MACINTOSH
Definition: font.c:1173
#define TT_MS_ID_SYMBOL_CS
Definition: font.c:1180
#define TT_PLATFORM_APPLE_UNICODE
Definition: font.c:1172
#define FT_ASSERT(condition)
Definition: ftdebug.h:239
#define FT_QNEW_ARRAY(ptr, count)
Definition: ftmemory.h:341
#define FT_STREAM_READ(buffer, count)
Definition: ftstream.h:522
char FT_String
Definition: fttypes.h:187
GLdouble n
Definition: glext.h:7729
GLuint64EXT * result
Definition: glext.h:11304
static BOOL is_english
Definition: run.c:155
int convert
Definition: msacm.c:1374
FT_String *(* TT_Name_ConvertFunc)(TT_Name entry, FT_Memory memory)
Definition: sfobjs.c:125
static FT_String * tt_name_ascii_from_utf16(TT_Name entry, FT_Memory memory)
Definition: sfobjs.c:57
static FT_String * tt_name_ascii_from_other(TT_Name entry, FT_Memory memory)
Definition: sfobjs.c:92
FT_ULong stringOffset
Definition: tttypes.h:304
FT_Byte * string
Definition: tttypes.h:309
FT_UShort languageID
Definition: tttypes.h:301
FT_UShort stringLength
Definition: tttypes.h:303
FT_UShort encodingID
Definition: tttypes.h:300
FT_UShort platformID
Definition: tttypes.h:299
FT_UShort nameID
Definition: tttypes.h:302
#define TT_MAC_LANGID_ENGLISH
Definition: ttnameid.h:303
#define TT_MAC_ID_ROMAN
Definition: ttnameid.h:148
#define TT_PLATFORM_ISO
Definition: ttnameid.h:89
#define TT_MS_ID_UCS_4
Definition: ttnameid.h:255