773 {
775#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
777#endif
785
787
789
790
791
792
793 {
795
796
797 for (
i = 0;
i < num_params;
i++ )
798 {
800 ignore_typographic_family =
TRUE;
802 ignore_typographic_subfamily =
TRUE;
803 }
804 }
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
824
825
826#ifdef FT_CONFIG_OPTION_INCREMENTAL
827 has_outline =
FT_BOOL(
face->root.internal->incremental_interface ||
831#else
835#endif
836
837 is_apple_sbit = 0;
839
840
841
842
843 if ( is_apple_sbix )
845
846
847
849 {
852 }
853
854
855
856 if ( !is_apple_sbit || is_apple_sbix )
857 {
861 }
862
865
866
867 if ( has_CBLC || has_CBDT )
869
870
871
872 if (
face->header.Units_Per_EM < 16 ||
873 face->header.Units_Per_EM > 16384 )
874 {
876
878 }
879
880
881
884
885
886
889
890#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
891 psnames_error =
error;
892#endif
893
894
895
896 if ( !is_apple_sbit )
897 {
898
901 {
904 {
906
907#ifdef FT_CONFIG_OPTION_INCREMENTAL
908
909
910 if (
face->root.internal->incremental_interface &&
911 face->root.internal->incremental_interface->funcs->
912 get_glyph_metrics )
913 {
914 face->horizontal.number_Of_HMetrics = 0;
916 }
917#endif
918 }
919 }
921 {
922
924 {
925 FT_TRACE2((
"This is an SFNT Mac font.\n" ));
926
927 has_outline = 0;
929 }
930 else
931 {
933
934#ifdef FT_CONFIG_OPTION_INCREMENTAL
935
936
937 if (
face->root.internal->incremental_interface &&
938 face->root.internal->incremental_interface->funcs->
939 get_glyph_metrics )
940 {
941 face->horizontal.number_Of_HMetrics = 0;
943 }
944#endif
945
946 }
947 }
948
951
952
955 {
958 face->vertical_info = 1;
959 }
960
963
966 {
967
968 face->os2.version = 0xFFFFU;
969 }
970 }
971
972
973
974
977
978
980 {
983 }
984
985
989
990 face->root.num_glyphs =
face->max_profile.numGlyphs;
991
992
993
994
995
996
997
1000 if (
face->os2.version != 0xFFFFU &&
face->os2.fsSelection & 256 )
1001 {
1002 if ( !ignore_typographic_family )
1003 GET_NAME( TYPOGRAPHIC_FAMILY, &
face->root.family_name );
1004 if ( !
face->root.family_name )
1006
1007 if ( !ignore_typographic_subfamily )
1008 GET_NAME( TYPOGRAPHIC_SUBFAMILY, &
face->root.style_name );
1009 if ( !
face->root.style_name )
1011 }
1012 else
1013 {
1015 if ( !
face->root.family_name && !ignore_typographic_family )
1016 GET_NAME( TYPOGRAPHIC_FAMILY, &
face->root.family_name );
1017 if ( !
face->root.family_name )
1019
1021 if ( !
face->root.style_name && !ignore_typographic_subfamily )
1022 GET_NAME( TYPOGRAPHIC_SUBFAMILY, &
face->root.style_name );
1023 if ( !
face->root.style_name )
1025 }
1026
1027
1028 {
1031
1032
1033
1034
1035
1036
1041
1042 if ( has_outline ==
TRUE )
1044
1045
1046
1049
1050#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
1051 if ( !psnames_error &&
1052 face->postscript.FormatType != 0x00030000L )
1054#endif
1055
1056
1057 if (
face->postscript.isFixedPitch )
1059
1060
1061 if (
face->vertical_info )
1063
1064
1067
1068#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
1069
1070
1072 {
1078 }
1079#endif
1080
1082
1083
1084
1085
1086
1087
1089 if ( has_outline ==
TRUE &&
face->os2.version != 0xFFFFU )
1090 {
1091
1092
1093
1094
1095 if (
face->os2.fsSelection & 512 )
1097 else if (
face->os2.fsSelection & 1 )
1099
1100 if (
face->os2.fsSelection & 32 )
1102 }
1103 else
1104 {
1105
1106
1107 if (
face->header.Mac_Style & 1 )
1109
1110 if (
face->header.Mac_Style & 2 )
1112 }
1113
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1126
1127
1128
1129 {
1131#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
1133#endif
1134
1135
1136 for (
m = 0;
m <
root->num_charmaps;
m++ )
1137 {
1139
1140
1143
1144#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
1145
1146 if ( charmap->
encoding == FT_ENCODING_UNICODE ||
1147 charmap->
encoding == FT_ENCODING_MS_SYMBOL )
1149 }
1150
1151
1152 if ( !has_unicode )
1153 {
1155
1156
1160 cmaprec.
encoding = FT_ENCODING_UNICODE;
1161
1162
1170
1171#endif
1172
1173 }
1174 }
1175
1176#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
1177
1178
1179
1180
1181
1182
1183 {
1185
1186
1188
1190 {
1195
1197 FT_UInt strike_idx, bsize_idx;
1198
1199
1200 if ( em_size == 0 ||
face->os2.version == 0xFFFFU )
1201 {
1202 avgwidth = 1;
1203 em_size = 1;
1204 }
1205
1206
1207
1208
1212
1213 bsize_idx = 0;
1214 for ( strike_idx = 0; strike_idx <
count; strike_idx++ )
1215 {
1217
1218
1221 continue;
1222
1225 ( avgwidth *
metrics.x_ppem + em_size / 2 ) / em_size );
1226
1229
1230
1232
1233
1235 sbit_strike_map[bsize_idx++] = strike_idx;
1236 }
1237
1238
1240
1241
1242
1243 if ( bsize_idx )
1244 {
1245 face->sbit_strike_map = sbit_strike_map;
1246
1249 }
1250 }
1251 }
1252
1253#endif
1254
1255
1256
1259
1260
1261
1262
1263
1264
1266 {
1267
1268
1269 root->bbox.xMin =
face->header.xMin;
1270 root->bbox.yMin =
face->header.yMin;
1271 root->bbox.xMax =
face->header.xMax;
1272 root->bbox.yMax =
face->header.yMax;
1273 root->units_per_EM =
face->header.Units_Per_EM;
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312 if (
face->os2.version != 0xFFFFU &&
face->os2.fsSelection & 128 )
1313 {
1314 root->ascender =
face->os2.sTypoAscender;
1315 root->descender =
face->os2.sTypoDescender;
1317 face->os2.sTypoLineGap;
1318 }
1319 else
1320 {
1321 root->ascender =
face->horizontal.Ascender;
1322 root->descender =
face->horizontal.Descender;
1324 face->horizontal.Line_Gap;
1325
1326 if ( !(
root->ascender ||
root->descender ) )
1327 {
1328 if (
face->os2.version != 0xFFFFU )
1329 {
1330 if (
face->os2.sTypoAscender ||
face->os2.sTypoDescender )
1331 {
1332 root->ascender =
face->os2.sTypoAscender;
1333 root->descender =
face->os2.sTypoDescender;
1335 face->os2.sTypoLineGap;
1336 }
1337 else
1338 {
1342 }
1343 }
1344 }
1345 }
1346
1347 root->max_advance_width =
1349 root->max_advance_height =
1352
1353
1354
1355
1356 root->underline_position =
face->postscript.underlinePosition -
1357 face->postscript.underlineThickness / 2;
1358 root->underline_thickness =
face->postscript.underlineThickness;
1359 }
1360
1361 }
1362
1364 FT_TRACE2((
"sfnt_load_face: done\n" ));
1365
1367 }
struct outqueuenode * head
#define TT_MS_ID_UNICODE_CS
#define TT_PLATFORM_MICROSOFT
#define FT_FACE_FLAG_KERNING
#define FT_FACE_FLAG_SFNT
#define FT_STYLE_FLAG_ITALIC
#define FT_FACE_FLAG_FIXED_SIZES
#define FT_FACE_FLAG_SCALABLE
#define FT_FACE_FLAG_FIXED_WIDTH
#define FT_HAS_FIXED_SIZES(face)
#define FT_IS_SCALABLE(face)
#define FT_FACE_FLAG_VERTICAL
#define FT_FACE_FLAG_GLYPH_NAMES
#define FT_FACE_FLAG_COLOR
#define FT_FACE_FLAG_MULTIPLE_MASTERS
#define FT_STYLE_FLAG_BOLD
#define FT_FACE_FLAG_HORIZONTAL
#define FT_NEW_ARRAY(ptr, count)
#define FT_RENEW_ARRAY(ptr, curcnt, newcnt)
FT_CMap_New(FT_CMap_Class clazz, FT_Pointer init_data, FT_CharMap charmap, FT_CMap *acmap)
#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLuint GLuint GLsizei count
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
#define LOADM_(x, vertical)
#define GET_NAME(id, field)
static FT_Encoding sfnt_find_encoding(int platform_id, int encoding_id)
TT_Load_Strike_Metrics_Func load_strike_metrics
TT_Load_Table_Func load_eblc
TT_Load_Table_Func load_bhed
TT_Load_Table_Func load_cpal
tt_face_build_cmaps(TT_Face face)
FT_CALLBACK_TABLE const TT_CMap_ClassRec tt_cmap_unicode_class_rec
#define TT_FACE_HAS_KERNING(face)
tt_face_lookup_table(TT_Face face, FT_ULong tag)
@ TT_SBIT_TABLE_TYPE_CBLC
@ TT_SBIT_TABLE_TYPE_SBIX