1141 {
1143#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
1145#endif
1153
1155
1157
1158
1159
1160
1161 {
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
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1192
1193
1194#ifdef FT_CONFIG_OPTION_INCREMENTAL
1195 has_outline =
FT_BOOL(
face->root.internal->incremental_interface ||
1199#else
1203#endif
1204
1205 is_apple_sbit = 0;
1207
1208
1209
1210
1211 if ( is_apple_sbix )
1212 has_outline =
FALSE;
1213
1214
1215
1217 {
1220 }
1221
1222
1223
1224 if ( !is_apple_sbit || is_apple_sbix )
1225 {
1229 }
1230
1233
1234
1235 if ( has_CBLC || has_CBDT )
1236 has_outline =
FALSE;
1237
1238
1239
1240 if (
face->header.Units_Per_EM < 16 ||
1241 face->header.Units_Per_EM > 16384 )
1242 {
1244
1246 }
1247
1248
1249
1252
1253
1254
1257
1258#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
1259 psnames_error =
error;
1260#endif
1261
1262
1263
1264 if ( !is_apple_sbit )
1265 {
1266
1269 {
1272 {
1274
1275#ifdef FT_CONFIG_OPTION_INCREMENTAL
1276
1277
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;
1284 }
1285#endif
1286 }
1287 }
1289 {
1290
1292 {
1293 FT_TRACE2((
"This is an SFNT Mac font.\n" ));
1294
1295 has_outline = 0;
1297 }
1298 else
1299 {
1301
1302#ifdef FT_CONFIG_OPTION_INCREMENTAL
1303
1304
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;
1311 }
1312#endif
1313
1314 }
1315 }
1316
1319
1320
1323 {
1326 face->vertical_info = 1;
1327 }
1328
1331
1334 {
1335
1336 face->os2.version = 0xFFFFU;
1337 }
1338 }
1339
1340
1341
1342
1345
1346
1348 {
1351 }
1352
1353
1357
1358 face->root.num_glyphs =
face->max_profile.numGlyphs;
1359
1360
1361
1362
1363
1364
1365
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 )
1374
1375 if ( !ignore_typographic_subfamily )
1376 GET_NAME( TYPOGRAPHIC_SUBFAMILY, &
face->root.style_name );
1377 if ( !
face->root.style_name )
1379 }
1380 else
1381 {
1383 if ( !
face->root.family_name && !ignore_typographic_family )
1384 GET_NAME( TYPOGRAPHIC_FAMILY, &
face->root.family_name );
1385 if ( !
face->root.family_name )
1387
1389 if ( !
face->root.style_name && !ignore_typographic_subfamily )
1390 GET_NAME( TYPOGRAPHIC_SUBFAMILY, &
face->root.style_name );
1391 if ( !
face->root.style_name )
1393 }
1394
1395
1396 {
1399
1400
1401
1402
1403
1404
1409
1410 if ( has_outline ==
TRUE )
1412
1413
1414
1417
1418#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
1419 if ( !psnames_error &&
1420 face->postscript.FormatType != 0x00030000L )
1422#endif
1423
1424
1425 if (
face->postscript.isFixedPitch )
1427
1428
1429 if (
face->vertical_info )
1431
1432
1435
1436#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
1437
1438
1440 {
1446 }
1447#endif
1448
1450
1451
1452
1453
1454
1455
1457 if ( has_outline ==
TRUE &&
face->os2.version != 0xFFFFU )
1458 {
1459
1460
1461
1462
1463 if (
face->os2.fsSelection & 512 )
1465 else if (
face->os2.fsSelection & 1 )
1467
1468 if (
face->os2.fsSelection & 32 )
1470 }
1471 else
1472 {
1473
1474
1475 if (
face->header.Mac_Style & 1 )
1477
1478 if (
face->header.Mac_Style & 2 )
1480 }
1481
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1494
1495
1496
1497 {
1499#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
1501#endif
1502
1503
1504 for (
m = 0;
m <
root->num_charmaps;
m++ )
1505 {
1507
1508
1511
1512#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
1513
1514 if ( charmap->
encoding == FT_ENCODING_UNICODE ||
1515 charmap->
encoding == FT_ENCODING_MS_SYMBOL )
1517 }
1518
1519
1520 if ( !has_unicode )
1521 {
1523
1524
1528 cmaprec.
encoding = FT_ENCODING_UNICODE;
1529
1530
1538
1539#endif
1540
1541 }
1542 }
1543
1544#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
1545
1546
1547
1548
1549
1550
1551 {
1553
1554
1556
1558 {
1563
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
1575
1576
1580
1581 bsize_idx = 0;
1582 for ( strike_idx = 0; strike_idx <
count; strike_idx++ )
1583 {
1585
1586
1589 continue;
1590
1593 ( avgwidth *
metrics.x_ppem + em_size / 2 ) / em_size );
1594
1597
1598
1600
1601
1603 sbit_strike_map[bsize_idx++] = strike_idx;
1604 }
1605
1606
1608
1609
1610
1611 if ( bsize_idx )
1612 {
1613 face->sbit_strike_map = sbit_strike_map;
1614
1617 }
1618 }
1619 }
1620
1621#endif
1622
1623
1624
1627
1628
1629
1630
1631
1632
1634 {
1635
1636
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
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
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;
1685 face->os2.sTypoLineGap;
1686 }
1687 else
1688 {
1689 root->ascender =
face->horizontal.Ascender;
1690 root->descender =
face->horizontal.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;
1703 face->os2.sTypoLineGap;
1704 }
1705 else
1706 {
1710 }
1711 }
1712 }
1713 }
1714
1715 root->max_advance_width =
1717 root->max_advance_height =
1720
1721
1722
1723
1724 root->underline_position =
face->postscript.underlinePosition -
1725 face->postscript.underlineThickness / 2;
1726 root->underline_thickness =
face->postscript.underlineThickness;
1727 }
1728
1729 }
1730
1732 FT_TRACE2((
"sfnt_load_face: done\n" ));
1733
1735 }
struct outqueuenode * head
#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