43#include FT_INTERNAL_DEBUG_H
44#include FT_CONFIG_CONFIG_H
45#include FT_INTERNAL_STREAM_H
46#include FT_INTERNAL_SFNT_H
47#include FT_TRUETYPE_TAGS_H
48#include FT_TRUETYPE_IDS_H
49#include FT_MULTIPLE_MASTERS_H
58#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
61#define FT_Stream_FTell( stream ) \
62 (FT_ULong)( (stream)->cursor - (stream)->base )
63#define FT_Stream_SeekSet( stream, off ) \
65 ( (off) < (FT_ULong)( (stream)->limit - (stream)->base ) ) \
66 ? (stream)->base + (off) \
71#define FT_fdot14ToFixed( x ) \
72 ( (FT_Fixed)( (FT_ULong)(x) << 2 ) )
73#define FT_intToFixed( i ) \
74 ( (FT_Fixed)( (FT_ULong)(i) << 16 ) )
75#define FT_fixedToInt( x ) \
76 ( (FT_Short)( ( (FT_UInt32)(x) + 0x8000U ) >> 16 ) )
86#define FT_COMPONENT ttgxvar
106#define ALL_POINTS (FT_UShort*)~(FT_PtrDist)0
109#define GX_PT_POINTS_ARE_WORDS 0x80U
110#define GX_PT_POINT_RUN_COUNT_MASK 0x7FU
161 if (
n & GX_PT_POINTS_ARE_WORDS )
163 n &= GX_PT_POINT_RUN_COUNT_MASK;
170 FT_TRACE1((
"ft_var_readpackedpoints: number of points too large\n" ));
187 if ( runcnt & GX_PT_POINTS_ARE_WORDS )
189 runcnt &= GX_PT_POINT_RUN_COUNT_MASK;
194 for (
j = 0;
j < runcnt;
j++ )
207 for (
j = 0;
j < runcnt;
j++ )
221#define GX_DT_DELTAS_ARE_ZERO 0x80U
222#define GX_DT_DELTAS_ARE_WORDS 0x40U
223#define GX_DT_DELTA_RUN_COUNT_MASK 0x3FU
269 if ( delta_cnt >
size )
271 FT_TRACE1((
"ft_var_readpackeddeltas: number of points too large\n" ));
279 while (
i < delta_cnt )
282 cnt = runcnt & GX_DT_DELTA_RUN_COUNT_MASK;
284 if ( runcnt & GX_DT_DELTAS_ARE_ZERO )
287 for (
j = 0;
j <=
cnt &&
i < delta_cnt;
j++ )
290 else if ( runcnt & GX_DT_DELTAS_ARE_WORDS )
293 for (
j = 0;
j <=
cnt &&
i < delta_cnt;
j++ )
299 for (
j = 0;
j <=
cnt &&
i < delta_cnt;
j++ )
333 GX_Blend blend =
face->blend;
334 GX_AVarSegment segment;
346 blend->avar_loaded =
TRUE;
368 if ( axisCount != (
FT_Long)blend->mmvar->num_axis )
370 FT_TRACE2((
"ft_var_load_avar: number of axes in `avar' and `fvar'\n"
371 " table are different\n" ));
378 segment = &blend->avar_segment[0];
379 for (
i = 0;
i < axisCount;
i++, segment++ )
384 if ( (
FT_ULong)segment->pairCount * 4 > table_len ||
385 FT_NEW_ARRAY( segment->correspondence, segment->pairCount ) )
390 for (
j =
i - 1;
j >= 0;
j-- )
391 FT_FREE( blend->avar_segment[
j].correspondence );
393 FT_FREE( blend->avar_segment );
394 blend->avar_segment =
NULL;
398 for (
j = 0;
j < segment->pairCount;
j++ )
405 segment->correspondence[
j].fromCoord / 65536.0,
406 segment->correspondence[
j].toCoord / 65536.0 ));
420 GX_ItemVarStore itemStore )
431 GX_Blend blend =
face->blend;
432 GX_ItemVarData varData;
443 FT_TRACE2((
"ft_var_load_item_variation_store: bad store format %d\n",
455 if ( !itemStore->dataCount )
457 FT_TRACE2((
"ft_var_load_item_variation_store: missing varData\n" ));
464 if (
FT_NEW_ARRAY( dataOffsetArray, itemStore->dataCount ) )
467 for (
i = 0;
i < itemStore->dataCount;
i++ )
481 if ( itemStore->axisCount != (
FT_Long)blend->mmvar->num_axis )
483 FT_TRACE2((
"ft_var_load_item_variation_store:"
484 " number of axes in item variation store\n"
486 " and `fvar' table are different\n" ));
491 if (
FT_NEW_ARRAY( itemStore->varRegionList, itemStore->regionCount ) )
494 for (
i = 0;
i < itemStore->regionCount;
i++ )
496 GX_AxisCoords axisCoords;
500 itemStore->axisCount ) )
503 axisCoords = itemStore->varRegionList[
i].axisList;
505 for (
j = 0;
j < itemStore->axisCount;
j++ )
524 if (
FT_NEW_ARRAY( itemStore->varData, itemStore->dataCount ) )
527 for (
i = 0;
i < itemStore->dataCount;
i++ )
529 varData = &itemStore->varData[
i];
540 if ( shortDeltaCount > varData->regionIdxCount )
542 FT_TRACE2((
"bad short count %d or region count %d\n",
544 varData->regionIdxCount ));
549 if ( varData->regionIdxCount > itemStore->regionCount )
551 FT_TRACE2((
"inconsistent regionCount %d in varData[%d]\n",
552 varData->regionIdxCount,
560 varData->regionIdxCount ) )
563 for (
j = 0;
j < varData->regionIdxCount;
j++ )
568 if ( varData->regionIndices[
j] >= itemStore->regionCount )
571 varData->regionIndices[
j] ));
583 varData->regionIdxCount * varData->itemCount ) )
588 for (
j = 0;
j < varData->itemCount * varData->regionIdxCount; )
590 for (
k = 0;
k < shortDeltaCount;
k++,
j++ )
599 varData->deltaSet[
j] = delta;
602 for ( ;
k < varData->regionIdxCount;
k++,
j++ )
611 varData->deltaSet[
j] = delta;
626 GX_DeltaSetIdxMap
map,
627 GX_ItemVarStore itemStore )
654 entrySize = ( (
format & 0x0030 ) >> 4 ) + 1;
655 innerBitCount = (
format & 0x000F ) + 1;
656 innerIndexMask = ( 1 << innerBitCount ) - 1;
664 for (
i = 0;
i <
map->mapCount;
i++ )
667 FT_UInt outerIndex, innerIndex;
671 for (
j = 0;
j < entrySize;
j++ )
679 mapData = ( mapData << 8 ) |
data;
682 outerIndex = mapData >> innerBitCount;
684 if ( outerIndex >= itemStore->dataCount )
686 FT_TRACE2((
"outerIndex[%d] == %d out of range\n",
693 map->outerIndex[
i] = outerIndex;
695 innerIndex = mapData & innerIndexMask;
697 if ( innerIndex >= itemStore->varData[outerIndex].itemCount )
699 FT_TRACE2((
"innerIndex[%d] == %d out of range\n",
706 map->innerIndex[
i] = innerIndex;
745 GX_Blend blend =
face->blend;
759 blend->vvar_loaded =
TRUE;
767 blend->hvar_loaded =
TRUE;
787 if ( majorVersion != 1 )
789 FT_TRACE2((
"bad table version %d\n", majorVersion ));
800 if (
FT_NEW( blend->vvar_table ) )
802 table = blend->vvar_table;
806 if (
FT_NEW( blend->hvar_table ) )
808 table = blend->hvar_table;
811 error = ft_var_load_item_variation_store(
813 table_offset + store_offset,
818 if ( widthMap_offset )
820 error = ft_var_load_delta_set_index_mapping(
822 table_offset + widthMap_offset,
837 blend->vvar_checked =
TRUE;
847 blend->hvar_checked =
TRUE;
863 GX_ItemVarStore itemStore,
867 GX_ItemVarData varData;
879 varData = &itemStore->varData[outerIndex];
880 deltaSet = &varData->deltaSet[varData->regionIdxCount * innerIndex];
883 for ( master = 0; master < varData->regionIdxCount; master++ )
886 FT_UInt regionIndex = varData->regionIndices[master];
888 GX_AxisCoords axis = itemStore->varRegionList[regionIndex].axisList;
892 for (
j = 0;
j < itemStore->axisCount;
j++, axis++ )
896 if ( axis->startCoord > axis->peakCoord ||
897 axis->peakCoord > axis->endCoord )
900 else if ( axis->startCoord < 0 &&
901 axis->endCoord > 0 &&
902 axis->peakCoord != 0 )
906 else if ( axis->peakCoord == 0 )
909 else if (
face->blend->normalizedcoords[
j] == axis->peakCoord )
913 else if (
face->blend->normalizedcoords[
j] <= axis->startCoord ||
914 face->blend->normalizedcoords[
j] >= axis->endCoord )
921 else if (
face->blend->normalizedcoords[
j] < axis->peakCoord )
924 face->blend->normalizedcoords[
j] - axis->startCoord,
925 axis->peakCoord - axis->startCoord );
929 axis->endCoord -
face->blend->normalizedcoords[
j],
930 axis->endCoord - axis->peakCoord );
934 delta = FT_intToFixed( deltaSet[master] );
935 scaledDelta =
FT_MulFix( scalar, delta );
938 netAdjustment = netAdjustment + scaledDelta;
942 return FT_fixedToInt( netAdjustment );
976 FT_UInt innerIndex, outerIndex;
982 if ( !
face->doblend || !
face->blend )
987 if ( !
face->blend->vvar_loaded )
990 face->blend->vvar_error = ft_var_load_hvvar(
face, 1 );
993 if ( !
face->blend->vvar_checked )
1003 if ( !
face->blend->hvar_loaded )
1006 face->blend->hvar_error = ft_var_load_hvvar(
face, 0 );
1009 if ( !
face->blend->hvar_checked )
1021 if (
table->widthMap.innerIndex )
1026 if (
idx >=
table->widthMap.mapCount )
1027 idx =
table->widthMap.mapCount - 1;
1030 outerIndex =
table->widthMap.outerIndex[
idx];
1031 innerIndex =
table->widthMap.innerIndex[
idx];
1035 GX_ItemVarData varData;
1040 innerIndex = gindex;
1042 varData = &
table->itemStore.varData[outerIndex];
1043 if ( gindex >= varData->itemCount )
1045 FT_TRACE2((
"gindex %d out of range\n", gindex ));
1051 delta = ft_var_get_item_delta(
face,
1056 FT_TRACE5((
"%s value %d adjusted by %d unit%s (%s)\n",
1057 vertical ?
"vertical height" :
"horizontal width",
1060 delta == 1 ?
"" :
"s",
1061 vertical ?
"VVAR" :
"HVAR" ));
1075 return tt_hvadvance_adjust(
face, gindex, avalue, 0 );
1084 return tt_hvadvance_adjust(
face, gindex, avalue, 1 );
1088#define GX_VALUE_SIZE 8
1092#define GX_VALUE_CASE( tag, dflt ) \
1093 case MVAR_TAG_ ## tag : \
1094 p = (FT_Short*)&face->dflt; \
1097#define GX_GASP_CASE( idx ) \
1098 case MVAR_TAG_GASP_ ## idx : \
1099 if ( idx < face->gasp.numRanges - 1 ) \
1100 p = (FT_Short*)&face->gasp.gaspRanges[idx].maxPPEM; \
1126 GX_VALUE_CASE( CPHT, os2.sCapHeight );
1127 GX_VALUE_CASE( HASC, os2.sTypoAscender );
1128 GX_VALUE_CASE( HCLA, os2.usWinAscent );
1129 GX_VALUE_CASE( HCLD, os2.usWinDescent );
1130 GX_VALUE_CASE( HCOF, horizontal.caret_Offset );
1131 GX_VALUE_CASE( HCRN, horizontal.caret_Slope_Run );
1132 GX_VALUE_CASE( HCRS, horizontal.caret_Slope_Rise );
1133 GX_VALUE_CASE( HDSC, os2.sTypoDescender );
1134 GX_VALUE_CASE( HLGP, os2.sTypoLineGap );
1135 GX_VALUE_CASE( SBXO, os2.ySubscriptXOffset);
1136 GX_VALUE_CASE( SBXS, os2.ySubscriptXSize );
1137 GX_VALUE_CASE( SBYO, os2.ySubscriptYOffset );
1138 GX_VALUE_CASE( SBYS, os2.ySubscriptYSize );
1139 GX_VALUE_CASE( SPXO, os2.ySuperscriptXOffset );
1140 GX_VALUE_CASE( SPXS, os2.ySuperscriptXSize );
1141 GX_VALUE_CASE( SPYO, os2.ySuperscriptYOffset );
1142 GX_VALUE_CASE( SPYS, os2.ySuperscriptYSize );
1143 GX_VALUE_CASE( STRO, os2.yStrikeoutPosition );
1144 GX_VALUE_CASE( STRS, os2.yStrikeoutSize );
1145 GX_VALUE_CASE( UNDO, postscript.underlinePosition );
1146 GX_VALUE_CASE( UNDS, postscript.underlineThickness );
1147 GX_VALUE_CASE( VASC, vertical.Ascender );
1148 GX_VALUE_CASE( VCOF, vertical.caret_Offset );
1149 GX_VALUE_CASE( VCRN, vertical.caret_Slope_Run );
1150 GX_VALUE_CASE( VCRS, vertical.caret_Slope_Rise );
1151 GX_VALUE_CASE( VDSC, vertical.Descender );
1152 GX_VALUE_CASE( VLGP, vertical.Line_Gap );
1153 GX_VALUE_CASE( XHGT, os2.sxHeight );
1185 GX_Blend blend =
face->blend;
1186 GX_ItemVarStore itemStore;
1213 if ( majorVersion != 1 )
1215 FT_TRACE2((
"bad table version %d\n", majorVersion ));
1219 if (
FT_NEW( blend->mvar_table ) )
1230 error = ft_var_load_item_variation_store(
1232 table_offset + store_offset,
1233 &blend->mvar_table->itemStore );
1238 blend->mvar_table->valueCount ) )
1242 FT_FRAME_ENTER( blend->mvar_table->valueCount * GX_VALUE_SIZE ) )
1245 value = blend->mvar_table->values;
1246 limit =
value + blend->mvar_table->valueCount;
1247 itemStore = &blend->mvar_table->itemStore;
1255 if (
value->outerIndex >= itemStore->dataCount ||
1256 value->innerIndex >= itemStore->varData[
value->outerIndex]
1271 value = blend->mvar_table->values;
1272 limit =
value + blend->mvar_table->valueCount;
1282#ifdef FT_DEBUG_LEVEL_TRACE
1284 FT_TRACE1((
"ft_var_load_mvar: Ignoring unknown tag `%c%c%c%c'\n",
1326 GX_Blend blend =
face->blend;
1336 value = blend->mvar_table->values;
1337 limit =
value + blend->mvar_table->valueCount;
1345 delta = ft_var_get_item_delta(
face,
1346 &blend->mvar_table->itemStore,
1348 value->innerIndex );
1352 FT_TRACE5((
"value %c%c%c%c (%d unit%s) adjusted by %d unit%s (MVAR)\n",
1358 value->unmodified == 1 ?
"" :
"s",
1360 delta == 1 ?
"" :
"s" ));
1367 if (
value->tag == MVAR_TAG_HASC )
1369 else if (
value->tag == MVAR_TAG_HDSC )
1371 else if (
value->tag == MVAR_TAG_HLGP )
1410 root->ascender =
root->ascender + mvar_hasc_delta;
1411 root->descender =
root->descender + mvar_hdsc_delta;
1413 current_line_gap + mvar_hlgp_delta;
1415 root->underline_position =
face->postscript.underlinePosition -
1416 face->postscript.underlineThickness / 2;
1417 root->underline_thickness =
face->postscript.underlineThickness;
1422 tt_size_reset_iterator,
1428 typedef struct GX_GVar_Head_
1462 GX_Blend blend =
face->blend;
1468 GX_GVar_Head gvar_head;
1474#define FT_STRUCTURE GX_GVar_Head
1503 if ( gvar_head.version != 0x00010000L )
1510 if ( gvar_head.axisCount != (
FT_UShort)blend->mmvar->num_axis )
1512 FT_TRACE1((
"ft_var_load_gvar: number of axes in `gvar' and `cvar'\n"
1513 " table are different\n" ));
1519 if ( (
FT_ULong)gvar_head.globalCoordCount * gvar_head.axisCount >
1523 " invalid number of global coordinates\n" ));
1529 if ( (
FT_ULong)gvar_head.glyphCount *
1530 ( ( gvar_head.flags & 1 ) ? 4 : 2 ) > table_len )
1532 FT_TRACE1((
"ft_var_load_gvar: invalid number of glyphs\n" ));
1539 blend->gvar_size = table_len;
1540 blend->tuplecount = gvar_head.globalCoordCount;
1541 blend->gv_glyphcnt = gvar_head.glyphCount;
1542 offsetToData = gvar_start + gvar_head.offsetToData;
1544 FT_TRACE5((
"gvar: there %s %d shared coordinate%s:\n",
1545 blend->tuplecount == 1 ?
"is" :
"are",
1547 blend->tuplecount == 1 ?
"" :
"s" ));
1549 if (
FT_NEW_ARRAY( blend->glyphoffsets, blend->gv_glyphcnt + 1 ) )
1552 if ( gvar_head.flags & 1 )
1561 for (
i = 0;
i <= blend->gv_glyphcnt;
i++ )
1565 if ( blend->glyphoffsets[
i] >
limit )
1568 " invalid glyph variation data offset for index %d\n",
1584 for (
i = 0;
i <= blend->gv_glyphcnt;
i++ )
1588 if ( blend->glyphoffsets[
i] >
limit )
1591 " invalid glyph variation data offset for index %d\n",
1603 if ( blend->tuplecount != 0 )
1606 gvar_head.axisCount * blend->tuplecount ) )
1613 for (
i = 0;
i < blend->tuplecount;
i++ )
1616 for (
j = 0;
j < (
FT_UInt)gvar_head.axisCount;
j++ )
1618 blend->tuplecoords[
i * gvar_head.axisCount +
j] =
1621 blend->tuplecoords[
i * gvar_head.axisCount +
j] / 65536.0 ));
1669 ft_var_apply_tuple( GX_Blend blend,
1679 for (
i = 0;
i < blend->num_axis;
i++ )
1681 FT_TRACE6((
" axis %d coordinate %.5f:\n",
1682 i, blend->normalizedcoords[
i] / 65536.0 ));
1689 if ( tuple_coords[
i] == 0 )
1691 FT_TRACE6((
" tuple coordinate is zero, ignore\n",
i ));
1695 if ( blend->normalizedcoords[
i] == 0 )
1697 FT_TRACE6((
" axis coordinate is zero, stop\n" ));
1702 if ( blend->normalizedcoords[
i] == tuple_coords[
i] )
1704 FT_TRACE6((
" tuple coordinate %.5f fits perfectly\n",
1705 tuple_coords[
i] / 65536.0 ));
1710 if ( !( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) )
1714 if ( blend->normalizedcoords[
i] <
FT_MIN( 0, tuple_coords[
i] ) ||
1715 blend->normalizedcoords[
i] >
FT_MAX( 0, tuple_coords[
i] ) )
1717 FT_TRACE6((
" tuple coordinate %.5f is exceeded, stop\n",
1718 tuple_coords[
i] / 65536.0 ));
1723 FT_TRACE6((
" tuple coordinate %.5f fits\n",
1724 tuple_coords[
i] / 65536.0 ));
1726 blend->normalizedcoords[
i],
1733 if ( blend->normalizedcoords[
i] <= im_start_coords[
i] ||
1734 blend->normalizedcoords[
i] >= im_end_coords[
i] )
1736 FT_TRACE6((
" intermediate tuple range ]%.5f;%.5f[ is exceeded,"
1738 im_start_coords[
i] / 65536.0,
1739 im_end_coords[
i] / 65536.0 ));
1744 FT_TRACE6((
" intermediate tuple range ]%.5f;%.5f[ fits\n",
1745 im_start_coords[
i] / 65536.0,
1746 im_end_coords[
i] / 65536.0 ));
1747 if ( blend->normalizedcoords[
i] < tuple_coords[
i] )
1749 blend->normalizedcoords[
i] - im_start_coords[
i],
1750 tuple_coords[
i] - im_start_coords[
i] );
1753 im_end_coords[
i] - blend->normalizedcoords[
i],
1754 im_end_coords[
i] - tuple_coords[
i] );
1758 FT_TRACE6((
" apply factor is %.5f\n", apply / 65536.0 ));
1779 blend =
face->blend;
1780 mmvar = blend->mmvar;
1782 if ( num_coords > mmvar->
num_axis )
1785 " only using first %d of %d coordinates\n",
1795 for (
i = 0;
i < num_coords;
i++,
a++ )
1801 if (
coord >
a->maximum || coord < a->minimum )
1804 "ft_var_to_normalized: design coordinate %.5f\n"
1805 " is out of range [%.5f;%.5f]; clamping\n",
1807 a->minimum / 65536.0,
1808 a->maximum / 65536.0 ));
1810 if (
coord >
a->maximum )
1816 if ( coord < a->def )
1819 else if (
coord >
a->def )
1831 if ( blend->avar_segment )
1833 FT_TRACE5((
"normalized design coordinates"
1834 " before applying `avar' data:\n" ));
1836 av = blend->avar_segment;
1839 for (
j = 1;
j < (
FT_UInt)av->pairCount;
j++ )
1847 av->correspondence[
j].toCoord -
1848 av->correspondence[
j - 1].toCoord,
1849 av->correspondence[
j].fromCoord -
1850 av->correspondence[
j - 1].fromCoord ) +
1851 av->correspondence[
j - 1].toCoord;
1875 blend =
face->blend;
1878 if ( num_coords > blend->num_axis )
1881 " only using first %d of %d coordinates\n",
1882 blend->num_axis, num_coords ));
1883 nc = blend->num_axis;
1886 for (
i = 0;
i < nc;
i++ )
1889 for ( ;
i < num_coords;
i++ )
1892 if ( blend->avar_segment )
1894 GX_AVarSegment av = blend->avar_segment;
1898 " after removing `avar' distortion:\n" ));
1900 for (
i = 0;
i < nc;
i++, av++ )
1902 for (
j = 1;
j < (
FT_UInt)av->pairCount;
j++ )
1904 if ( design[
i] < av->correspondence[
j].toCoord )
1907 FT_MulDiv( design[
i] - av->correspondence[
j - 1].toCoord,
1908 av->correspondence[
j].fromCoord -
1909 av->correspondence[
j - 1].fromCoord,
1910 av->correspondence[
j].toCoord -
1911 av->correspondence[
j - 1].toCoord ) +
1912 av->correspondence[
j - 1].fromCoord;
1914 FT_TRACE5((
" %.5f\n", design[
i] / 65536.0 ));
1921 mmvar = blend->mmvar;
1924 for (
i = 0;
i < nc;
i++,
a++ )
1926 if ( design[
i] < 0 )
1928 a->def -
a->minimum );
1929 else if ( design[
i] > 0 )
1931 a->maximum -
a->def );
1947 typedef struct GX_FVar_Head_
1959 typedef struct fvar_axis_
2011 GX_FVar_Head fvar_head;
2030#define FT_STRUCTURE GX_FVar_Head
2047#define FT_STRUCTURE GX_FVar_Axis
2063 need_init = !
face->blend;
2078 "TT_Get_MM_Var: `gvar' or `CFF2' table is missing\n" ));
2097 usePsName =
FT_BOOL( fvar_head.instanceSize ==
2098 6 + 4 * fvar_head.axisCount );
2103 fvar_head.axisCount,
2104 fvar_head.axisCount == 1 ?
"is" :
"es" ));
2109 num_axes = fvar_head.axisCount;
2110 face->blend->num_axis = num_axes;
2113 num_axes =
face->blend->num_axis;
2118 num_instances = (
FT_UInt)
face->root.style_flags >> 16;
2131 ( ( (
n) +
sizeof (
void*) - 1 ) & ~(
sizeof (
void*) - 1 ) )
2138 namedstyle_size =
ALIGN_SIZE( num_instances *
2140 next_coords_size =
ALIGN_SIZE( num_instances *
2143 next_name_size = num_axes * 5;
2147 face->blend->mmvar_len = mmvar_size +
2156 face->blend->mmvar = mmvar;
2172 (
FT_UShort*)( (
char*)mmvar + mmvar_size );
2174 (
FT_Var_Axis*)( (
char*)axis_flags + axis_flags_size );
2180 for (
i = 0;
i < num_instances;
i++ )
2183 next_coords += num_axes;
2187 namedstyle_size + next_coords_size );
2188 for (
i = 0;
i < num_axes;
i++ )
2200 for (
i = 0;
i < num_axes;
i++ )
2202 GX_FVar_Axis axis_rec;
2204#ifdef FT_DEBUG_LEVEL_TRACE
2211 a->tag = axis_rec.axisTag;
2212 a->minimum = axis_rec.minValue;
2213 a->def = axis_rec.defaultValue;
2214 a->maximum = axis_rec.maxValue;
2215 a->strid = axis_rec.nameID;
2218 a->name[1] = (
FT_String)( (
a->tag >> 16 ) & 0xFF );
2219 a->name[2] = (
FT_String)( (
a->tag >> 8 ) & 0xFF );
2223 *axis_flags = axis_rec.flags;
2225 if (
a->minimum >
a->def ||
2226 a->def >
a->maximum )
2228 a->minimum =
a->def;
2229 a->maximum =
a->def;
2231#ifdef FT_DEBUG_LEVEL_TRACE
2236#ifdef FT_DEBUG_LEVEL_TRACE
2240 " minimum default maximum flags\n" ));
2244 " %10.5f %10.5f %10.5f 0x%04X%s\n",
2247 a->minimum / 65536.0,
2249 a->maximum / 65536.0,
2251 invalid ?
" (invalid, disabled)" :
"" ));
2263 num_axes * num_instances ) )
2266 if ( fvar_head.instanceCount && !
face->blend->avar_loaded )
2271 ft_var_load_avar(
face );
2278 fvar_head.instanceCount,
2279 fvar_head.instanceCount == 1 ?
"" :
"s" ));
2282 nsc =
face->blend->normalized_stylecoords;
2283 for (
i = 0;
i < fvar_head.instanceCount;
i++,
ns++ )
2294 for (
j = 0;
j < num_axes;
j++,
c++ )
2303#ifdef FT_DEBUG_LEVEL_TRACE
2315 if (
ns->strid != 0xFFFF )
2320 if ( strname && !
ft_strcmp( strname,
".notdef" ) )
2324 if (
ns->psid != 0xFFFF )
2329 if ( psname && !
ft_strcmp( psname,
".notdef" ) )
2335 FT_TRACE5((
" instance %d (%s%s%s, %s%s%s)\n",
2337 strname ?
"name: `" :
"",
2338 strname ? strname :
"unnamed",
2340 psname ?
"PS name: `" :
"",
2341 psname ? psname :
"no PS name",
2342 psname ?
"'" :
"" ));
2349 ft_var_to_normalized(
face, num_axes,
ns->coords, nsc );
2355 if ( num_instances != fvar_head.instanceCount )
2359 FT_Int found, dummy1, dummy2;
2390 " Adding default instance to named instances\n" ));
2399 for (
j = 0;
j < num_axes;
j++,
a++,
c++ )
2405 ft_var_load_mvar(
face );
2420 (
FT_UShort*)( (
char*)mmvar + mmvar_size );
2422 (
FT_Var_Axis*)( (
char*)axis_flags + axis_flags_size );
2431 next_coords += num_axes;
2436 namedstyle_size + next_coords_size );
2437 for (
n = 0;
n < num_axes;
n++ )
2439 a->
name = next_name;
2442 if (
a->tag == TTAG_wght )
2443 a->name = (
char*)
"Weight";
2444 else if (
a->tag == TTAG_wdth )
2445 a->name = (
char*)
"Width";
2446 else if (
a->tag == TTAG_opsz )
2447 a->name = (
char*)
"OpticalSize";
2448 else if (
a->tag == TTAG_slnt )
2449 a->name = (
char*)
"Slant";
2495 blend =
face->blend;
2496 mmvar = blend->mmvar;
2498 if ( num_coords > mmvar->
num_axis )
2501 " only using first %d of %d coordinates\n",
2507 " normalized design coordinates:\n" ));
2509 for (
i = 0;
i < num_coords;
i++ )
2514 FT_TRACE1((
"TT_Set_MM_Blend: normalized design coordinate %.5f\n"
2515 " is out of range [-1;1]\n",
2524 if ( !
face->is_cff2 && !blend->glyphoffsets )
2528 if ( !blend->coords )
2534 all_design_coords =
TRUE;
2537 if ( !blend->normalizedcoords )
2542 manageCvt = mcvt_modify;
2556 manageCvt = mcvt_retain;
2558 for (
i = 0;
i < num_coords;
i++ )
2560 if ( blend->normalizedcoords[
i] !=
coords[
i] )
2562 manageCvt = mcvt_load;
2573 c = blend->normalizedcoords +
i;
2574 n = blend->normalized_stylecoords +
2575 ( instance_index - 1 ) * mmvar->
num_axis +
2584 c = blend->normalizedcoords +
i;
2600 if ( blend->normalizedcoords[
i] != 0 )
2602 manageCvt = mcvt_load;
2618 if ( set_design_coords )
2619 ft_var_to_design(
face,
2620 all_design_coords ? blend->num_axis : num_coords,
2621 blend->normalizedcoords,
2628 switch ( manageCvt )
2703 face->root.face_flags &= ~FT_FACE_FLAG_VARIATION;
2751 blend =
face->blend;
2753 if ( !blend->coords )
2762 if ( num_coords > blend->num_axis )
2765 " only using first %d of %d coordinates\n",
2766 blend->num_axis, num_coords ));
2767 nc = blend->num_axis;
2770 if (
face->doblend )
2772 for (
i = 0;
i < nc;
i++ )
2773 coords[
i] = blend->normalizedcoords[
i];
2777 for (
i = 0;
i < nc;
i++ )
2781 for ( ;
i < num_coords;
i++ )
2840 blend =
face->blend;
2841 mmvar = blend->mmvar;
2843 if ( num_coords > mmvar->
num_axis )
2846 " only using first %d of %d coordinates\n",
2851 if ( !blend->coords )
2859 for (
i = 0;
i < num_coords;
i++,
n++,
c++ )
2874 instance_index = (
FT_UInt)
face->root.face_index >> 16;
2875 named_style = mmvar->
namedstyle + instance_index - 1;
2877 n = named_style->
coords + num_coords;
2892 a = mmvar->
axis + num_coords;
2905 if ( blend->normalizedcoords && !have_diff )
2911 if ( !
face->blend->avar_loaded )
2912 ft_var_load_avar(
face );
2915 " normalized design coordinates:\n" ));
2916 ft_var_to_normalized(
face, num_coords, blend->coords,
normalized );
2925 face->root.face_flags &= ~FT_FACE_FLAG_VARIATION;
2974 blend =
face->blend;
2976 if ( !blend->coords )
2985 if ( num_coords > blend->num_axis )
2988 " only using first %d of %d coordinates\n",
2989 blend->num_axis, num_coords ));
2990 nc = blend->num_axis;
2993 if (
face->doblend )
2995 for (
i = 0;
i < nc;
i++ )
3000 for (
i = 0;
i < nc;
i++ )
3004 for ( ;
i < num_coords;
i++ )
3048 blend =
face->blend;
3049 mmvar = blend->mmvar;
3051 num_instances = (
FT_UInt)
face->root.style_flags >> 16;
3054 if ( instance_index > num_instances )
3057 if ( instance_index > 0 && mmvar->
namedstyle )
3066 named_style = mmvar->
namedstyle + instance_index - 1;
3076 face->root.style_name = style_name;
3088 face->root.face_index = ( instance_index << 16 ) |
3089 (
face->root.face_index & 0xFFFFL );
3090 face->root.face_flags &= ~FT_FACE_FLAG_VARIATION;
3149 GX_Blend blend =
face->blend;
3167 "tt_face_vary_cvt: no blend specified\n" ));
3175 "tt_face_vary_cvt: no `cvt ' table\n" ));
3195 table_start = FT_Stream_FTell(
stream );
3215 if ( offsetToData + ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) * 4 >
3219 " invalid CVT variation array header\n" ));
3225 offsetToData += table_start;
3227 if ( tupleCount & GX_TC_TUPLES_SHARE_POINT_NUMBERS )
3229 here = FT_Stream_FTell(
stream );
3231 FT_Stream_SeekSet(
stream, offsetToData );
3233 sharedpoints = ft_var_readpackedpoints(
stream,
3236 offsetToData = FT_Stream_FTell(
stream );
3238 FT_Stream_SeekSet(
stream, here );
3241 FT_TRACE5((
"cvar: there %s %d tuple%s:\n",
3242 ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ?
"is" :
"are",
3243 tupleCount & GX_TC_TUPLE_COUNT_MASK,
3244 ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ?
"" :
"s" ));
3249 for (
i = 0;
i < ( tupleCount & GX_TC_TUPLE_COUNT_MASK );
i++ )
3261 if ( tupleIndex & GX_TI_EMBEDDED_TUPLE_COORD )
3263 for (
j = 0;
j < blend->num_axis;
j++ )
3267 else if ( ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) >= blend->tuplecount )
3270 " invalid tuple index\n" ));
3277 if ( !blend->tuplecoords )
3280 " no valid tuple coordinates available\n" ));
3288 blend->tuplecoords +
3289 ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) * blend->num_axis,
3293 if ( tupleIndex & GX_TI_INTERMEDIATE_TUPLE )
3295 for (
j = 0;
j < blend->num_axis;
j++ )
3297 for (
j = 0;
j < blend->num_axis;
j++ )
3301 apply = ft_var_apply_tuple( blend,
3309 offsetToData += tupleDataSize;
3313 here = FT_Stream_FTell(
stream );
3315 FT_Stream_SeekSet(
stream, offsetToData );
3317 if ( tupleIndex & GX_TI_PRIVATE_POINT_NUMBERS )
3319 localpoints = ft_var_readpackedpoints(
stream,
3327 point_count = spoint_count;
3330 deltas = ft_var_readpackeddeltas(
stream,
3332 point_count == 0 ?
face->cvt_size
3337 ( localpoints == ALL_POINTS && point_count !=
face->cvt_size ) )
3340 else if ( localpoints == ALL_POINTS )
3342#ifdef FT_DEBUG_LEVEL_TRACE
3350 for (
j = 0;
j <
face->cvt_size;
j++ )
3355 old_cvt_delta = cvt_deltas[
j];
3356 cvt_deltas[
j] = old_cvt_delta +
FT_MulFix( deltas[
j], apply );
3358#ifdef FT_DEBUG_LEVEL_TRACE
3359 if ( old_cvt_delta != cvt_deltas[
j] )
3363 ( FT_intToFixed(
face->cvt[
j] ) +
3364 old_cvt_delta ) / 65536.0,
3365 ( FT_intToFixed(
face->cvt[
j] ) +
3366 cvt_deltas[
j] ) / 65536.0 ));
3372#ifdef FT_DEBUG_LEVEL_TRACE
3380#ifdef FT_DEBUG_LEVEL_TRACE
3387 for (
j = 0;
j < point_count;
j++ )
3397 old_cvt_delta = cvt_deltas[pindex];
3398 cvt_deltas[pindex] = old_cvt_delta +
FT_MulFix( deltas[
j], apply );
3400#ifdef FT_DEBUG_LEVEL_TRACE
3401 if ( old_cvt_delta != cvt_deltas[pindex] )
3405 ( FT_intToFixed(
face->cvt[pindex] ) +
3406 old_cvt_delta ) / 65536.0,
3407 ( FT_intToFixed(
face->cvt[pindex] ) +
3408 cvt_deltas[pindex] ) / 65536.0 ));
3414#ifdef FT_DEBUG_LEVEL_TRACE
3420 if ( localpoints != ALL_POINTS )
3424 offsetToData += tupleDataSize;
3426 FT_Stream_SeekSet(
stream, here );
3431 for (
i = 0;
i <
face->cvt_size;
i++ )
3432 face->cvt[
i] += FT_fixedToInt( cvt_deltas[
i] );
3438 if ( sharedpoints != ALL_POINTS )
3455 tt_delta_shift(
int p1,
3465 delta.
x = out_points[
ref].
x - in_points[
ref].
x;
3466 delta.
y = out_points[
ref].
y - in_points[
ref].
y;
3468 if ( delta.
x == 0 && delta.
y == 0 )
3471 for (
p = p1;
p <
ref;
p++ )
3473 out_points[
p].
x += delta.
x;
3474 out_points[
p].
y += delta.
y;
3477 for (
p =
ref + 1;
p <= p2;
p++ )
3479 out_points[
p].
x += delta.
x;
3480 out_points[
p].
y += delta.
y;
3492 tt_delta_interpolate(
int p1,
3501 FT_Pos out, in1, in2, out1, out2, d1, d2;
3508 for (
i = 0;
i <= 1;
i++ )
3514 if ( in_points[ref1].
x > in_points[ref2].
x )
3521 in1 = in_points[ref1].
x;
3522 in2 = in_points[ref2].
x;
3523 out1 = out_points[ref1].
x;
3524 out2 = out_points[ref2].
x;
3530 if ( in1 != in2 || out1 == out2 )
3536 for (
p = p1;
p <= p2;
p++ )
3538 out = in_points[
p].
x;
3542 else if (
out >= in2 )
3547 out_points[
p].
x =
out;
3584 end_point =
outline->contours[contour];
3585 first_point =
point;
3588 while (
point <= end_point && !has_delta[
point] )
3591 if (
point <= end_point )
3593 first_delta =
point;
3598 while (
point <= end_point )
3602 if ( has_delta[
point] )
3604 tt_delta_interpolate( cur_delta + 1,
3617 if ( cur_delta == first_delta )
3618 tt_delta_shift( first_point,
3627 tt_delta_interpolate( cur_delta + 1,
3634 if ( first_delta > 0 )
3635 tt_delta_interpolate( first_point,
3645 }
while ( contour < outline->n_contours );
3702 GX_Blend blend =
face->blend;
3717 if ( !
face->doblend || !blend )
3718 return FT_THROW( Invalid_Argument );
3720 if ( glyph_index >= blend->gv_glyphcnt ||
3721 blend->glyphoffsets[glyph_index] ==
3722 blend->glyphoffsets[glyph_index + 1] )
3724 FT_TRACE2((
"TT_Vary_Apply_Glyph_Deltas:"
3725 " no variation data for this glyph\n" ));
3734 dataSize = blend->glyphoffsets[glyph_index + 1] -
3735 blend->glyphoffsets[glyph_index];
3741 glyph_start = FT_Stream_FTell(
stream );
3755 ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) * 4 >
dataSize )
3757 FT_TRACE2((
"TT_Vary_Apply_Glyph_Deltas:"
3758 " invalid glyph variation array header\n" ));
3764 offsetToData += glyph_start;
3766 if ( tupleCount & GX_TC_TUPLES_SHARE_POINT_NUMBERS )
3768 here = FT_Stream_FTell(
stream );
3770 FT_Stream_SeekSet(
stream, offsetToData );
3772 sharedpoints = ft_var_readpackedpoints(
stream,
3775 offsetToData = FT_Stream_FTell(
stream );
3777 FT_Stream_SeekSet(
stream, here );
3780 FT_TRACE5((
"gvar: there %s %d tuple%s:\n",
3781 ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ?
"is" :
"are",
3782 tupleCount & GX_TC_TUPLE_COUNT_MASK,
3783 ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ?
"" :
"s" ));
3789 for (
j = 0;
j < n_points;
j++ )
3791 points_org[
j].
x = FT_intToFixed(
outline->points[
j].x );
3792 points_org[
j].
y = FT_intToFixed(
outline->points[
j].y );
3795 for (
i = 0;
i < ( tupleCount & GX_TC_TUPLE_COUNT_MASK );
i++ )
3807 if ( tupleIndex & GX_TI_EMBEDDED_TUPLE_COORD )
3809 for (
j = 0;
j < blend->num_axis;
j++ )
3813 else if ( ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) >= blend->tuplecount )
3815 FT_TRACE2((
"TT_Vary_Apply_Glyph_Deltas:"
3816 " invalid tuple index\n" ));
3824 blend->tuplecoords +
3825 ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) * blend->num_axis,
3828 if ( tupleIndex & GX_TI_INTERMEDIATE_TUPLE )
3830 for (
j = 0;
j < blend->num_axis;
j++ )
3832 for (
j = 0;
j < blend->num_axis;
j++ )
3836 apply = ft_var_apply_tuple( blend,
3844 offsetToData += tupleDataSize;
3848 here = FT_Stream_FTell(
stream );
3850 FT_Stream_SeekSet(
stream, offsetToData );
3852 if ( tupleIndex & GX_TI_PRIVATE_POINT_NUMBERS )
3854 localpoints = ft_var_readpackedpoints(
stream,
3862 point_count = spoint_count;
3865 deltas_x = ft_var_readpackeddeltas(
stream,
3867 point_count == 0 ? n_points
3869 deltas_y = ft_var_readpackeddeltas(
stream,
3871 point_count == 0 ? n_points
3874 if ( !
points || !deltas_y || !deltas_x )
3877 else if (
points == ALL_POINTS )
3879#ifdef FT_DEBUG_LEVEL_TRACE
3887 for (
j = 0;
j < n_points;
j++ )
3889 FT_Fixed old_point_delta_x = point_deltas_x[
j];
3890 FT_Fixed old_point_delta_y = point_deltas_y[
j];
3896 if (
j < n_points - 4 )
3898 point_deltas_x[
j] = old_point_delta_x + point_delta_x;
3899 point_deltas_y[
j] = old_point_delta_y + point_delta_y;
3906 if (
j == ( n_points - 4 ) &&
3907 !(
face->variation_support &
3909 point_deltas_x[
j] = old_point_delta_x + point_delta_x;
3911 else if (
j == ( n_points - 3 ) &&
3912 !(
face->variation_support &
3914 point_deltas_x[
j] = old_point_delta_x + point_delta_x;
3916 else if (
j == ( n_points - 2 ) &&
3917 !(
face->variation_support &
3919 point_deltas_y[
j] = old_point_delta_y + point_delta_y;
3921 else if (
j == ( n_points - 1 ) &&
3922 !(
face->variation_support &
3924 point_deltas_y[
j] = old_point_delta_y + point_delta_y;
3927#ifdef FT_DEBUG_LEVEL_TRACE
3928 if ( point_delta_x || point_delta_y )
3930 FT_TRACE7((
" %d: (%f, %f) -> (%f, %f)\n",
3932 ( FT_intToFixed(
outline->points[
j].x ) +
3933 old_point_delta_x ) / 65536.0,
3934 ( FT_intToFixed(
outline->points[
j].y ) +
3935 old_point_delta_y ) / 65536.0,
3936 ( FT_intToFixed(
outline->points[
j].x ) +
3937 point_deltas_x[
j] ) / 65536.0,
3938 ( FT_intToFixed(
outline->points[
j].y ) +
3939 point_deltas_y[
j] ) / 65536.0 ));
3945#ifdef FT_DEBUG_LEVEL_TRACE
3953#ifdef FT_DEBUG_LEVEL_TRACE
3960 for (
j = 0;
j < n_points;
j++ )
3963 points_out[
j] = points_org[
j];
3966 for (
j = 0;
j < point_count;
j++ )
3971 if (
idx >= n_points )
3982 tt_interpolate_deltas(
outline,
3989 for (
j = 0;
j < n_points;
j++ )
3991 FT_Fixed old_point_delta_x = point_deltas_x[
j];
3992 FT_Fixed old_point_delta_y = point_deltas_y[
j];
3994 FT_Pos point_delta_x = points_out[
j].
x - points_org[
j].
x;
3995 FT_Pos point_delta_y = points_out[
j].
y - points_org[
j].
y;
3998 if (
j < n_points - 4 )
4000 point_deltas_x[
j] = old_point_delta_x + point_delta_x;
4001 point_deltas_y[
j] = old_point_delta_y + point_delta_y;
4008 if (
j == ( n_points - 4 ) &&
4009 !(
face->variation_support &
4011 point_deltas_x[
j] = old_point_delta_x + point_delta_x;
4013 else if (
j == ( n_points - 3 ) &&
4014 !(
face->variation_support &
4016 point_deltas_x[
j] = old_point_delta_x + point_delta_x;
4018 else if (
j == ( n_points - 2 ) &&
4019 !(
face->variation_support &
4021 point_deltas_y[
j] = old_point_delta_y + point_delta_y;
4023 else if (
j == ( n_points - 1 ) &&
4024 !(
face->variation_support &
4026 point_deltas_y[
j] = old_point_delta_y + point_delta_y;
4029#ifdef FT_DEBUG_LEVEL_TRACE
4030 if ( point_delta_x || point_delta_y )
4032 FT_TRACE7((
" %d: (%f, %f) -> (%f, %f)\n",
4034 ( FT_intToFixed(
outline->points[
j].x ) +
4035 old_point_delta_x ) / 65536.0,
4036 ( FT_intToFixed(
outline->points[
j].y ) +
4037 old_point_delta_y ) / 65536.0,
4038 ( FT_intToFixed(
outline->points[
j].x ) +
4039 point_deltas_x[
j] ) / 65536.0,
4040 ( FT_intToFixed(
outline->points[
j].y ) +
4041 point_deltas_y[
j] ) / 65536.0 ));
4047#ifdef FT_DEBUG_LEVEL_TRACE
4053 if ( localpoints != ALL_POINTS )
4058 offsetToData += tupleDataSize;
4060 FT_Stream_SeekSet(
stream, here );
4065 for (
i = 0;
i < n_points;
i++ )
4067 outline->points[
i].x += FT_fixedToInt( point_deltas_x[
i] );
4068 outline->points[
i].y += FT_fixedToInt( point_deltas_y[
i] );
4076 if ( sharedpoints != ALL_POINTS )
4113 *num_coords =
face->blend->num_axis;
4116 if ( normalizedcoords )
4117 *normalizedcoords =
face->blend->normalizedcoords;
4119 *mm_var =
face->blend->mmvar;
4137 GX_ItemVarStore itemStore )
4143 if ( itemStore->varData )
4145 for (
i = 0;
i < itemStore->dataCount;
i++ )
4147 FT_FREE( itemStore->varData[
i].regionIndices );
4148 FT_FREE( itemStore->varData[
i].deltaSet );
4151 FT_FREE( itemStore->varData );
4154 if ( itemStore->varRegionList )
4156 for (
i = 0;
i < itemStore->regionCount;
i++ )
4157 FT_FREE( itemStore->varRegionList[
i].axisList );
4159 FT_FREE( itemStore->varRegionList );
4176 GX_Blend blend =
face->blend;
4185 num_axes = blend->mmvar->num_axis;
4188 FT_FREE( blend->normalizedcoords );
4189 FT_FREE( blend->normalized_stylecoords );
4192 if ( blend->avar_segment )
4194 for (
i = 0;
i < num_axes;
i++ )
4195 FT_FREE( blend->avar_segment[
i].correspondence );
4196 FT_FREE( blend->avar_segment );
4199 if ( blend->hvar_table )
4201 ft_var_done_item_variation_store(
face,
4202 &blend->hvar_table->itemStore );
4204 FT_FREE( blend->hvar_table->widthMap.innerIndex );
4205 FT_FREE( blend->hvar_table->widthMap.outerIndex );
4209 if ( blend->vvar_table )
4211 ft_var_done_item_variation_store(
face,
4212 &blend->vvar_table->itemStore );
4214 FT_FREE( blend->vvar_table->widthMap.innerIndex );
4215 FT_FREE( blend->vvar_table->widthMap.outerIndex );
4219 if ( blend->mvar_table )
4221 ft_var_done_item_variation_store(
face,
4222 &blend->mvar_table->itemStore );
4224 FT_FREE( blend->mvar_table->values );
4228 FT_FREE( blend->tuplecoords );
4229 FT_FREE( blend->glyphoffsets );
void user(int argc, const char *argv[])
#define FT_fdot14ToFixed(x)
static const WCHAR version[]
FT_DivFix(FT_Long a, FT_Long b)
#define FT_FACE_FLAG_VARIATION
#define FT_IS_NAMED_INSTANCE(face)
FT_MulDiv(FT_Long a, FT_Long b, FT_Long c)
FT_MulFix(FT_Long a, FT_Long b)
#define FT_TRACE5(varformat)
#define FT_TRACE7(varformat)
#define FT_TRACE6(varformat)
#define FT_TRACE2(varformat)
#define FT_TRACE1(varformat)
FT_BEGIN_HEADER typedef signed long FT_Pos
FT_List_Iterate(FT_List list, FT_List_Iterator iterator, void *user)
#define FT_NEW_ARRAY(ptr, count)
#define FT_SET_ERROR(expression)
#define FT_ALLOC(ptr, size)
#define FT_MEM_COPY(dest, source, count)
#define FT_FACE_STREAM(x)
#define FT_FACE_MEMORY(x)
#define FT_FRAME_ENTER(size)
#define FT_READ_USHORT(var)
#define FT_FRAME_SKIP_SHORT
#define FT_STREAM_SEEK(position)
#define FT_READ_ULONG(var)
#define FT_FRAME_ULONG(f)
#define FT_READ_BYTE(var)
#define FT_READ_CHAR(var)
#define FT_STREAM_READ_FIELDS(fields, object)
#define FT_STREAM_SKIP(distance)
#define FT_FRAME_START(size)
#define FT_FRAME_USHORT(f)
#define FT_READ_SHORT(var)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLenum GLenum GLenum GLenum scale
GLenum GLuint GLint GLenum face
GLint GLenum GLboolean normalized
GLboolean GLboolean GLboolean GLboolean a
GLsizei const GLfloat * points
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
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 GLint GLint j
#define TT_NAME_ID_FONT_SUBFAMILY
#define ALIGN_SIZE(size, alignment)
static char memory[1024 *256]
static const WCHAR invalid[]
SFNT_Interface * SFNT_Service
FT_Var_Named_Style * namedstyle
TT_Get_Name_ID_Func get_name_id
TT_Get_Name_Func get_name
#define TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY
#define TT_NAME_ID_PS_NAME
tt_size_reset(TT_Size size, FT_Bool only_height)
tt_face_load_cvt(TT_Face face, FT_Stream stream)
#define TT_FACE_FLAG_VAR_HADVANCE
#define TT_FACE_FLAG_VAR_LSB
#define TT_FACE_FLAG_VAR_TSB
struct TT_SizeRec_ * TT_Size
#define TT_FACE_FLAG_VAR_VADVANCE
#define TT_FACE_FLAG_VAR_MVAR
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList