1139 {
1141#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
1143#endif
1149
1151
1153
1154
1155
1156
1157 {
1159
1160
1161 for (
i = 0;
i < num_params;
i++ )
1162 {
1164 ignore_typographic_family =
TRUE;
1166 ignore_typographic_subfamily =
TRUE;
1167 }
1168 }
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1188
1189
1190#ifdef FT_CONFIG_OPTION_INCREMENTAL
1191 has_outline =
FT_BOOL(
face->root.internal->incremental_interface ||
1195#else
1199#endif
1200
1201 is_apple_sbit = 0;
1203
1204
1205
1206
1207 if ( is_apple_sbix )
1208 has_outline =
FALSE;
1209
1210
1211
1213 {
1216 }
1217
1218
1219
1220 if ( !is_apple_sbit || is_apple_sbix )
1221 {
1225 }
1226
1227
1228
1229 if (
face->header.Units_Per_EM < 16 ||
1230 face->header.Units_Per_EM > 16384 )
1231 {
1233
1235 }
1236
1237
1238
1241
1242
1243
1246
1247#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
1248 psnames_error =
error;
1249#endif
1250
1251
1252
1253 if ( !is_apple_sbit )
1254 {
1255
1258 {
1261 {
1263
1264#ifdef FT_CONFIG_OPTION_INCREMENTAL
1265
1266
1267 if (
face->root.internal->incremental_interface &&
1268 face->root.internal->incremental_interface->funcs->
1269 get_glyph_metrics )
1270 {
1271 face->horizontal.number_Of_HMetrics = 0;
1273 }
1274#endif
1275 }
1276 }
1278 {
1279
1281 {
1282 FT_TRACE2((
"This is an SFNT Mac font.\n" ));
1283
1284 has_outline = 0;
1286 }
1287 else
1288 {
1290
1291#ifdef FT_CONFIG_OPTION_INCREMENTAL
1292
1293
1294 if (
face->root.internal->incremental_interface &&
1295 face->root.internal->incremental_interface->funcs->
1296 get_glyph_metrics )
1297 {
1298 face->horizontal.number_Of_HMetrics = 0;
1300 }
1301#endif
1302
1303 }
1304 }
1305
1308
1309
1312 {
1315 face->vertical_info = 1;
1316 }
1317
1320
1323 {
1324
1325 face->os2.version = 0xFFFFU;
1326 }
1327 }
1328
1329
1330
1331
1334
1335
1339
1340 face->root.num_glyphs =
face->max_profile.numGlyphs;
1341
1342
1343
1344
1345
1346
1347
1350 if (
face->os2.version != 0xFFFFU &&
face->os2.fsSelection & 256 )
1351 {
1352 if ( !ignore_typographic_family )
1353 GET_NAME( TYPOGRAPHIC_FAMILY, &
face->root.family_name );
1354 if ( !
face->root.family_name )
1356
1357 if ( !ignore_typographic_subfamily )
1358 GET_NAME( TYPOGRAPHIC_SUBFAMILY, &
face->root.style_name );
1359 if ( !
face->root.style_name )
1361 }
1362 else
1363 {
1365 if ( !
face->root.family_name && !ignore_typographic_family )
1366 GET_NAME( TYPOGRAPHIC_FAMILY, &
face->root.family_name );
1367 if ( !
face->root.family_name )
1369
1371 if ( !
face->root.style_name && !ignore_typographic_subfamily )
1372 GET_NAME( TYPOGRAPHIC_SUBFAMILY, &
face->root.style_name );
1373 if ( !
face->root.style_name )
1375 }
1376
1377
1378 {
1381
1382
1383
1384
1385
1386
1390
1391 if ( has_outline ==
TRUE )
1393
1394
1395
1398
1399#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
1400 if ( !psnames_error &&
1401 face->postscript.FormatType != 0x00030000L )
1403#endif
1404
1405
1406 if (
face->postscript.isFixedPitch )
1408
1409
1410 if (
face->vertical_info )
1412
1413
1416
1417#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
1418
1419
1421 {
1427 }
1428#endif
1429
1431
1432
1433
1434
1435
1436
1438 if ( has_outline ==
TRUE &&
face->os2.version != 0xFFFFU )
1439 {
1440
1441
1442
1443
1444 if (
face->os2.fsSelection & 512 )
1446 else if (
face->os2.fsSelection & 1 )
1448
1449 if (
face->os2.fsSelection & 32 )
1451 }
1452 else
1453 {
1454
1455
1456 if (
face->header.Mac_Style & 1 )
1458
1459 if (
face->header.Mac_Style & 2 )
1461 }
1462
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1475
1476
1477
1478 {
1480#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
1482#endif
1483
1484
1485 for (
m = 0;
m <
root->num_charmaps;
m++ )
1486 {
1488
1489
1492
1493#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
1494
1495 if ( charmap->
encoding == FT_ENCODING_UNICODE ||
1496 charmap->
encoding == FT_ENCODING_MS_SYMBOL )
1498 }
1499
1500
1501 if ( !has_unicode )
1502 {
1504
1505
1509 cmaprec.
encoding = FT_ENCODING_UNICODE;
1510
1511
1518
1519#endif
1520
1521 }
1522 }
1523
1524#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
1525
1526
1527
1528
1529
1530
1531 {
1533
1534
1536
1538 {
1543
1545 FT_UInt strike_idx, bsize_idx;
1546
1547
1548 if ( em_size == 0 ||
face->os2.version == 0xFFFFU )
1549 {
1550 avgwidth = 1;
1551 em_size = 1;
1552 }
1553
1554
1555
1556
1560
1561 bsize_idx = 0;
1562 for ( strike_idx = 0; strike_idx <
count; strike_idx++ )
1563 {
1565
1566
1569 continue;
1570
1573 ( avgwidth *
metrics.x_ppem + em_size / 2 ) / em_size );
1574
1577
1578
1580
1581
1583 sbit_strike_map[bsize_idx++] = strike_idx;
1584 }
1585
1586
1588
1589
1590
1591 if ( bsize_idx )
1592 {
1593 face->sbit_strike_map = sbit_strike_map;
1594
1597 }
1598 }
1599 }
1600
1601#endif
1602
1603
1604
1607
1608
1609
1610
1611
1612
1614 {
1615
1616
1617 root->bbox.xMin =
face->header.xMin;
1618 root->bbox.yMin =
face->header.yMin;
1619 root->bbox.xMax =
face->header.xMax;
1620 root->bbox.yMax =
face->header.yMax;
1621 root->units_per_EM =
face->header.Units_Per_EM;
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653 root->ascender =
face->horizontal.Ascender;
1654 root->descender =
face->horizontal.Descender;
1655
1657 face->horizontal.Line_Gap;
1658
1659 if ( !(
root->ascender ||
root->descender ) )
1660 {
1661 if (
face->os2.version != 0xFFFFU )
1662 {
1663 if (
face->os2.sTypoAscender ||
face->os2.sTypoDescender )
1664 {
1665 root->ascender =
face->os2.sTypoAscender;
1666 root->descender =
face->os2.sTypoDescender;
1667
1669 face->os2.sTypoLineGap;
1670 }
1671 else
1672 {
1675
1677 }
1678 }
1679 }
1680
1681 root->max_advance_width =
1683 root->max_advance_height =
1686
1687
1688
1689
1690 root->underline_position =
face->postscript.underlinePosition -
1691 face->postscript.underlineThickness / 2;
1692 root->underline_thickness =
face->postscript.underlineThickness;
1693 }
1694
1695 }
1696
1698 FT_TRACE2((
"sfnt_load_face: done\n" ));
1699
1701 }
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_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