44#include FT_CONFIG_CONFIG_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_fdot6ToFixed( i ) \
76 ( (FT_Fixed)( (FT_ULong)(i) << 10 ) )
77#define FT_fixedToInt( x ) \
78 ( (FT_Short)( ( (x) + 0x8000U ) >> 16 ) )
79#define FT_fixedToFdot6( x ) \
80 ( (FT_Pos)( ( (x) + 0x200 ) >> 10 ) )
90#define FT_COMPONENT ttgxvar
110#define ALL_POINTS (FT_UShort*)~(FT_PtrDist)0
113#define GX_PT_POINTS_ARE_WORDS 0x80U
114#define GX_PT_POINT_RUN_COUNT_MASK 0x7FU
165 if (
n & GX_PT_POINTS_ARE_WORDS )
167 n &= GX_PT_POINT_RUN_COUNT_MASK;
174 FT_TRACE1((
"ft_var_readpackedpoints: number of points too large\n" ));
191 if ( runcnt & GX_PT_POINTS_ARE_WORDS )
193 runcnt &= GX_PT_POINT_RUN_COUNT_MASK;
198 for (
j = 0;
j < runcnt;
j++ )
211 for (
j = 0;
j < runcnt;
j++ )
225#define GX_DT_DELTAS_ARE_ZERO 0x80U
226#define GX_DT_DELTAS_ARE_WORDS 0x40U
227#define GX_DT_DELTA_RUN_COUNT_MASK 0x3FU
273 if ( delta_cnt >
size )
275 FT_TRACE1((
"ft_var_readpackeddeltas: number of points too large\n" ));
283 while (
i < delta_cnt )
286 cnt = runcnt & GX_DT_DELTA_RUN_COUNT_MASK;
288 if ( runcnt & GX_DT_DELTAS_ARE_ZERO )
291 for (
j = 0;
j <=
cnt &&
i < delta_cnt;
j++ )
294 else if ( runcnt & GX_DT_DELTAS_ARE_WORDS )
297 for (
j = 0;
j <=
cnt &&
i < delta_cnt;
j++ )
303 for (
j = 0;
j <=
cnt &&
i < delta_cnt;
j++ )
337 GX_Blend blend =
face->blend;
338 GX_AVarSegment segment;
350 blend->avar_loaded =
TRUE;
372 if ( axisCount != (
FT_Long)blend->mmvar->num_axis )
374 FT_TRACE2((
"ft_var_load_avar: number of axes in `avar' and `fvar'\n"
375 " table are different\n" ));
382 segment = &blend->avar_segment[0];
383 for (
i = 0;
i < axisCount;
i++, segment++ )
388 if ( (
FT_ULong)segment->pairCount * 4 > table_len ||
389 FT_NEW_ARRAY( segment->correspondence, segment->pairCount ) )
394 for (
j =
i - 1;
j >= 0;
j-- )
395 FT_FREE( blend->avar_segment[
j].correspondence );
397 FT_FREE( blend->avar_segment );
398 blend->avar_segment =
NULL;
402 for (
j = 0;
j < segment->pairCount;
j++ )
404 segment->correspondence[
j].fromCoord =
406 segment->correspondence[
j].toCoord =
410 segment->correspondence[
j].fromCoord / 65536.0,
411 segment->correspondence[
j].toCoord / 65536.0 ));
425 GX_ItemVarStore itemStore )
436 GX_Blend blend =
face->blend;
437 GX_ItemVarData varData;
448 FT_TRACE2((
"ft_var_load_item_variation_store: bad store format %d\n",
460 if ( !itemStore->dataCount )
462 FT_TRACE2((
"ft_var_load_item_variation_store: missing varData\n" ));
469 if (
FT_NEW_ARRAY( dataOffsetArray, itemStore->dataCount ) )
472 for (
i = 0;
i < itemStore->dataCount;
i++ )
486 if ( itemStore->axisCount != (
FT_Long)blend->mmvar->num_axis )
488 FT_TRACE2((
"ft_var_load_item_variation_store:"
489 " number of axes in item variation store\n"
491 " and `fvar' table are different\n" ));
496 if (
FT_NEW_ARRAY( itemStore->varRegionList, itemStore->regionCount ) )
499 for (
i = 0;
i < itemStore->regionCount;
i++ )
501 GX_AxisCoords axisCoords;
505 itemStore->axisCount ) )
508 axisCoords = itemStore->varRegionList[
i].axisList;
510 for (
j = 0;
j < itemStore->axisCount;
j++ )
529 if (
FT_NEW_ARRAY( itemStore->varData, itemStore->dataCount ) )
532 for (
i = 0;
i < itemStore->dataCount;
i++ )
534 varData = &itemStore->varData[
i];
545 if ( shortDeltaCount > varData->regionIdxCount )
547 FT_TRACE2((
"bad short count %d or region count %d\n",
549 varData->regionIdxCount ));
554 if ( varData->regionIdxCount > itemStore->regionCount )
556 FT_TRACE2((
"inconsistent regionCount %d in varData[%d]\n",
557 varData->regionIdxCount,
565 varData->regionIdxCount ) )
568 for (
j = 0;
j < varData->regionIdxCount;
j++ )
573 if ( varData->regionIndices[
j] >= itemStore->regionCount )
576 varData->regionIndices[
j] ));
588 varData->regionIdxCount * varData->itemCount ) )
593 for (
j = 0;
j < varData->itemCount * varData->regionIdxCount; )
595 for (
k = 0;
k < shortDeltaCount;
k++,
j++ )
604 varData->deltaSet[
j] = delta;
607 for ( ;
k < varData->regionIdxCount;
k++,
j++ )
616 varData->deltaSet[
j] = delta;
631 GX_DeltaSetIdxMap
map,
632 GX_ItemVarStore itemStore )
659 entrySize = ( (
format & 0x0030 ) >> 4 ) + 1;
660 innerBitCount = (
format & 0x000F ) + 1;
661 innerIndexMask = ( 1 << innerBitCount ) - 1;
669 for (
i = 0;
i <
map->mapCount;
i++ )
672 FT_UInt outerIndex, innerIndex;
676 for (
j = 0;
j < entrySize;
j++ )
684 mapData = ( mapData << 8 ) |
data;
687 outerIndex = mapData >> innerBitCount;
689 if ( outerIndex >= itemStore->dataCount )
691 FT_TRACE2((
"outerIndex[%d] == %d out of range\n",
698 map->outerIndex[
i] = outerIndex;
700 innerIndex = mapData & innerIndexMask;
702 if ( innerIndex >= itemStore->varData[outerIndex].itemCount )
704 FT_TRACE2((
"innerIndex[%d] == %d out of range\n",
711 map->innerIndex[
i] = innerIndex;
750 GX_Blend blend =
face->blend;
764 blend->vvar_loaded =
TRUE;
772 blend->hvar_loaded =
TRUE;
792 if ( majorVersion != 1 )
794 FT_TRACE2((
"bad table version %d\n", majorVersion ));
805 if (
FT_NEW( blend->vvar_table ) )
807 table = blend->vvar_table;
811 if (
FT_NEW( blend->hvar_table ) )
813 table = blend->hvar_table;
816 error = ft_var_load_item_variation_store(
818 table_offset + store_offset,
823 if ( widthMap_offset )
825 error = ft_var_load_delta_set_index_mapping(
827 table_offset + widthMap_offset,
842 blend->vvar_checked =
TRUE;
852 blend->hvar_checked =
TRUE;
868 GX_ItemVarStore itemStore,
872 GX_ItemVarData varData;
884 varData = &itemStore->varData[outerIndex];
885 deltaSet = &varData->deltaSet[varData->regionIdxCount * innerIndex];
888 for ( master = 0; master < varData->regionIdxCount; master++ )
891 FT_UInt regionIndex = varData->regionIndices[master];
893 GX_AxisCoords axis = itemStore->varRegionList[regionIndex].axisList;
897 for (
j = 0;
j < itemStore->axisCount;
j++, axis++ )
901 if ( axis->startCoord > axis->peakCoord ||
902 axis->peakCoord > axis->endCoord )
905 else if ( axis->startCoord < 0 &&
906 axis->endCoord > 0 &&
907 axis->peakCoord != 0 )
911 else if ( axis->peakCoord == 0 )
914 else if (
face->blend->normalizedcoords[
j] == axis->peakCoord )
918 else if (
face->blend->normalizedcoords[
j] <= axis->startCoord ||
919 face->blend->normalizedcoords[
j] >= axis->endCoord )
926 else if (
face->blend->normalizedcoords[
j] < axis->peakCoord )
929 face->blend->normalizedcoords[
j] - axis->startCoord,
930 axis->peakCoord - axis->startCoord );
934 axis->endCoord -
face->blend->normalizedcoords[
j],
935 axis->endCoord - axis->peakCoord );
939 delta = FT_intToFixed( deltaSet[master] );
940 scaledDelta =
FT_MulFix( scalar, delta );
943 netAdjustment = netAdjustment + scaledDelta;
947 return FT_fixedToInt( netAdjustment );
981 FT_UInt innerIndex, outerIndex;
987 if ( !
face->doblend || !
face->blend )
992 if ( !
face->blend->vvar_loaded )
995 face->blend->vvar_error = ft_var_load_hvvar(
face, 1 );
998 if ( !
face->blend->vvar_checked )
1008 if ( !
face->blend->hvar_loaded )
1011 face->blend->hvar_error = ft_var_load_hvvar(
face, 0 );
1014 if ( !
face->blend->hvar_checked )
1026 if (
table->widthMap.innerIndex )
1031 if (
idx >=
table->widthMap.mapCount )
1032 idx =
table->widthMap.mapCount - 1;
1035 outerIndex =
table->widthMap.outerIndex[
idx];
1036 innerIndex =
table->widthMap.innerIndex[
idx];
1040 GX_ItemVarData varData;
1045 innerIndex = gindex;
1047 varData = &
table->itemStore.varData[outerIndex];
1048 if ( gindex >= varData->itemCount )
1050 FT_TRACE2((
"gindex %d out of range\n", gindex ));
1056 delta = ft_var_get_item_delta(
face,
1061 FT_TRACE5((
"%s value %d adjusted by %d unit%s (%s)\n",
1062 vertical ?
"vertical height" :
"horizontal width",
1065 delta == 1 ?
"" :
"s",
1066 vertical ?
"VVAR" :
"HVAR" ));
1080 return tt_hvadvance_adjust(
face, gindex, avalue, 0 );
1089 return tt_hvadvance_adjust(
face, gindex, avalue, 1 );
1093#define GX_VALUE_SIZE 8
1097#define GX_VALUE_CASE( tag, dflt ) \
1098 case MVAR_TAG_ ## tag : \
1099 p = (FT_Short*)&face->dflt; \
1102#define GX_GASP_CASE( idx ) \
1103 case MVAR_TAG_GASP_ ## idx : \
1104 if ( idx < face->gasp.numRanges - 1 ) \
1105 p = (FT_Short*)&face->gasp.gaspRanges[idx].maxPPEM; \
1131 GX_VALUE_CASE( CPHT, os2.sCapHeight );
1132 GX_VALUE_CASE( HASC, os2.sTypoAscender );
1133 GX_VALUE_CASE( HCLA, os2.usWinAscent );
1134 GX_VALUE_CASE( HCLD, os2.usWinDescent );
1135 GX_VALUE_CASE( HCOF, horizontal.caret_Offset );
1136 GX_VALUE_CASE( HCRN, horizontal.caret_Slope_Run );
1137 GX_VALUE_CASE( HCRS, horizontal.caret_Slope_Rise );
1138 GX_VALUE_CASE( HDSC, os2.sTypoDescender );
1139 GX_VALUE_CASE( HLGP, os2.sTypoLineGap );
1140 GX_VALUE_CASE( SBXO, os2.ySubscriptXOffset);
1141 GX_VALUE_CASE( SBXS, os2.ySubscriptXSize );
1142 GX_VALUE_CASE( SBYO, os2.ySubscriptYOffset );
1143 GX_VALUE_CASE( SBYS, os2.ySubscriptYSize );
1144 GX_VALUE_CASE( SPXO, os2.ySuperscriptXOffset );
1145 GX_VALUE_CASE( SPXS, os2.ySuperscriptXSize );
1146 GX_VALUE_CASE( SPYO, os2.ySuperscriptYOffset );
1147 GX_VALUE_CASE( SPYS, os2.ySuperscriptYSize );
1148 GX_VALUE_CASE( STRO, os2.yStrikeoutPosition );
1149 GX_VALUE_CASE( STRS, os2.yStrikeoutSize );
1150 GX_VALUE_CASE( UNDO, postscript.underlinePosition );
1151 GX_VALUE_CASE( UNDS, postscript.underlineThickness );
1152 GX_VALUE_CASE( VASC, vertical.Ascender );
1153 GX_VALUE_CASE( VCOF, vertical.caret_Offset );
1154 GX_VALUE_CASE( VCRN, vertical.caret_Slope_Run );
1155 GX_VALUE_CASE( VCRS, vertical.caret_Slope_Rise );
1156 GX_VALUE_CASE( VDSC, vertical.Descender );
1157 GX_VALUE_CASE( VLGP, vertical.Line_Gap );
1158 GX_VALUE_CASE( XHGT, os2.sxHeight );
1190 GX_Blend blend =
face->blend;
1191 GX_ItemVarStore itemStore;
1218 if ( majorVersion != 1 )
1220 FT_TRACE2((
"bad table version %d\n", majorVersion ));
1224 if (
FT_NEW( blend->mvar_table ) )
1235 error = ft_var_load_item_variation_store(
1237 table_offset + store_offset,
1238 &blend->mvar_table->itemStore );
1243 blend->mvar_table->valueCount ) )
1247 FT_FRAME_ENTER( blend->mvar_table->valueCount * GX_VALUE_SIZE ) )
1250 value = blend->mvar_table->values;
1251 limit =
value + blend->mvar_table->valueCount;
1252 itemStore = &blend->mvar_table->itemStore;
1260 if (
value->outerIndex >= itemStore->dataCount ||
1261 value->innerIndex >= itemStore->varData[
value->outerIndex]
1276 value = blend->mvar_table->values;
1277 limit =
value + blend->mvar_table->valueCount;
1287#ifdef FT_DEBUG_LEVEL_TRACE
1289 FT_TRACE1((
"ft_var_load_mvar: Ignoring unknown tag `%c%c%c%c'\n",
1331 GX_Blend blend =
face->blend;
1341 value = blend->mvar_table->values;
1342 limit =
value + blend->mvar_table->valueCount;
1350 delta = ft_var_get_item_delta(
face,
1351 &blend->mvar_table->itemStore,
1353 value->innerIndex );
1357 FT_TRACE5((
"value %c%c%c%c (%d unit%s) adjusted by %d unit%s (MVAR)\n",
1363 value->unmodified == 1 ?
"" :
"s",
1365 delta == 1 ?
"" :
"s" ));
1372 if (
value->tag == MVAR_TAG_HASC )
1374 else if (
value->tag == MVAR_TAG_HDSC )
1376 else if (
value->tag == MVAR_TAG_HLGP )
1415 root->ascender =
root->ascender + mvar_hasc_delta;
1416 root->descender =
root->descender + mvar_hdsc_delta;
1418 current_line_gap + mvar_hlgp_delta;
1420 root->underline_position =
face->postscript.underlinePosition -
1421 face->postscript.underlineThickness / 2;
1422 root->underline_thickness =
face->postscript.underlineThickness;
1427 tt_size_reset_iterator,
1433 typedef struct GX_GVar_Head_
1467 GX_Blend blend =
face->blend;
1474 GX_GVar_Head gvar_head;
1480#define FT_STRUCTURE GX_GVar_Head
1509 if ( gvar_head.version != 0x00010000L )
1516 if ( gvar_head.axisCount != (
FT_UShort)blend->mmvar->num_axis )
1518 FT_TRACE1((
"ft_var_load_gvar: number of axes in `gvar' and `cvar'\n"
1519 " table are different\n" ));
1525 if ( (
FT_ULong)gvar_head.globalCoordCount * gvar_head.axisCount >
1529 " invalid number of global coordinates\n" ));
1536 offsets_len = ( gvar_head.glyphCount + 1 ) *
1537 ( ( gvar_head.flags & 1 ) ? 4L : 2L );
1540 if (offsets_len > table_len )
1542 FT_TRACE1((
"ft_var_load_gvar: invalid number of glyphs\n" ));
1549 blend->gvar_size = table_len;
1550 offsetToData = gvar_start + gvar_head.offsetToData;
1552 FT_TRACE5((
"gvar: there %s %d shared coordinate%s:\n",
1553 gvar_head.globalCoordCount == 1 ?
"is" :
"are",
1554 gvar_head.globalCoordCount,
1555 gvar_head.globalCoordCount == 1 ?
"" :
"s" ));
1561 if (
FT_NEW_ARRAY( blend->glyphoffsets, gvar_head.glyphCount + 1 ) )
1564 if ( gvar_head.flags & 1 )
1570 for (
i = 0;
i <= gvar_head.glyphCount;
i++ )
1574 if ( max_offset <= blend->glyphoffsets[
i] )
1575 max_offset = blend->glyphoffsets[
i];
1579 " glyph variation data offset %d not monotonic\n",
1581 blend->glyphoffsets[
i] = max_offset;
1585 if ( limit < blend->glyphoffsets[
i] )
1588 " glyph variation data offset %d out of range\n",
1590 blend->glyphoffsets[
i] =
limit;
1600 for (
i = 0;
i <= gvar_head.glyphCount;
i++ )
1604 if ( max_offset <= blend->glyphoffsets[
i] )
1605 max_offset = blend->glyphoffsets[
i];
1609 " glyph variation data offset %d not monotonic\n",
1611 blend->glyphoffsets[
i] = max_offset;
1615 if ( limit < blend->glyphoffsets[
i] )
1618 " glyph variation data offset %d out of range\n",
1620 blend->glyphoffsets[
i] =
limit;
1625 blend->gv_glyphcnt = gvar_head.glyphCount;
1629 if ( gvar_head.globalCoordCount != 0 )
1633 gvar_head.axisCount * 2L ) )
1636 " glyph variation shared tuples missing\n" ));
1641 gvar_head.axisCount * gvar_head.globalCoordCount ) )
1644 for (
i = 0;
i < gvar_head.globalCoordCount;
i++ )
1647 for (
j = 0;
j < (
FT_UInt)gvar_head.axisCount;
j++ )
1649 blend->tuplecoords[
i * gvar_head.axisCount +
j] =
1652 blend->tuplecoords[
i * gvar_head.axisCount +
j] / 65536.0 ));
1657 blend->tuplecount = gvar_head.globalCoordCount;
1671 FT_FREE( blend->glyphoffsets );
1672 blend->gv_glyphcnt = 0;
1710 ft_var_apply_tuple( GX_Blend blend,
1720 for (
i = 0;
i < blend->num_axis;
i++ )
1722 FT_TRACE6((
" axis %d coordinate %.5f:\n",
1723 i, blend->normalizedcoords[
i] / 65536.0 ));
1730 if ( tuple_coords[
i] == 0 )
1732 FT_TRACE6((
" tuple coordinate is zero, ignore\n" ));
1736 if ( blend->normalizedcoords[
i] == 0 )
1738 FT_TRACE6((
" axis coordinate is zero, stop\n" ));
1743 if ( blend->normalizedcoords[
i] == tuple_coords[
i] )
1745 FT_TRACE6((
" tuple coordinate %.5f fits perfectly\n",
1746 tuple_coords[
i] / 65536.0 ));
1751 if ( !( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) )
1755 if ( blend->normalizedcoords[
i] <
FT_MIN( 0, tuple_coords[
i] ) ||
1756 blend->normalizedcoords[
i] >
FT_MAX( 0, tuple_coords[
i] ) )
1758 FT_TRACE6((
" tuple coordinate %.5f is exceeded, stop\n",
1759 tuple_coords[
i] / 65536.0 ));
1764 FT_TRACE6((
" tuple coordinate %.5f fits\n",
1765 tuple_coords[
i] / 65536.0 ));
1767 blend->normalizedcoords[
i],
1774 if ( blend->normalizedcoords[
i] <= im_start_coords[
i] ||
1775 blend->normalizedcoords[
i] >= im_end_coords[
i] )
1777 FT_TRACE6((
" intermediate tuple range ]%.5f;%.5f[ is exceeded,"
1779 im_start_coords[
i] / 65536.0,
1780 im_end_coords[
i] / 65536.0 ));
1785 FT_TRACE6((
" intermediate tuple range ]%.5f;%.5f[ fits\n",
1786 im_start_coords[
i] / 65536.0,
1787 im_end_coords[
i] / 65536.0 ));
1788 if ( blend->normalizedcoords[
i] < tuple_coords[
i] )
1790 blend->normalizedcoords[
i] - im_start_coords[
i],
1791 tuple_coords[
i] - im_start_coords[
i] );
1794 im_end_coords[
i] - blend->normalizedcoords[
i],
1795 im_end_coords[
i] - tuple_coords[
i] );
1799 FT_TRACE6((
" apply factor is %.5f\n", apply / 65536.0 ));
1820 blend =
face->blend;
1821 mmvar = blend->mmvar;
1823 if ( num_coords > mmvar->
num_axis )
1826 " only using first %d of %d coordinates\n",
1836 for (
i = 0;
i < num_coords;
i++,
a++ )
1842 if (
coord >
a->maximum || coord < a->minimum )
1845 "ft_var_to_normalized: design coordinate %.5f\n"
1846 " is out of range [%.5f;%.5f]; clamping\n",
1848 a->minimum / 65536.0,
1849 a->maximum / 65536.0 ));
1851 if (
coord >
a->maximum )
1857 if ( coord < a->def )
1860 else if (
coord >
a->def )
1872 if ( blend->avar_segment )
1874 FT_TRACE5((
"normalized design coordinates"
1875 " before applying `avar' data:\n" ));
1877 av = blend->avar_segment;
1880 for (
j = 1;
j < (
FT_UInt)av->pairCount;
j++ )
1888 av->correspondence[
j].toCoord -
1889 av->correspondence[
j - 1].toCoord,
1890 av->correspondence[
j].fromCoord -
1891 av->correspondence[
j - 1].fromCoord ) +
1892 av->correspondence[
j - 1].toCoord;
1916 blend =
face->blend;
1919 if ( num_coords > blend->num_axis )
1922 " only using first %d of %d coordinates\n",
1923 blend->num_axis, num_coords ));
1924 nc = blend->num_axis;
1927 for (
i = 0;
i < nc;
i++ )
1930 for ( ;
i < num_coords;
i++ )
1933 if ( blend->avar_segment )
1935 GX_AVarSegment av = blend->avar_segment;
1939 " after removing `avar' distortion:\n" ));
1941 for (
i = 0;
i < nc;
i++, av++ )
1943 for (
j = 1;
j < (
FT_UInt)av->pairCount;
j++ )
1945 if ( design[
i] < av->correspondence[
j].toCoord )
1948 FT_MulDiv( design[
i] - av->correspondence[
j - 1].toCoord,
1949 av->correspondence[
j].fromCoord -
1950 av->correspondence[
j - 1].fromCoord,
1951 av->correspondence[
j].toCoord -
1952 av->correspondence[
j - 1].toCoord ) +
1953 av->correspondence[
j - 1].fromCoord;
1955 FT_TRACE5((
" %.5f\n", design[
i] / 65536.0 ));
1962 mmvar = blend->mmvar;
1965 for (
i = 0;
i < nc;
i++,
a++ )
1967 if ( design[
i] < 0 )
1969 a->def -
a->minimum );
1970 else if ( design[
i] > 0 )
1972 a->maximum -
a->def );
1988 typedef struct GX_FVar_Head_
2000 typedef struct fvar_axis_
2052 GX_FVar_Head fvar_head;
2071#define FT_STRUCTURE GX_FVar_Head
2088#define FT_STRUCTURE GX_FVar_Axis
2104 need_init = !
face->blend;
2119 "TT_Get_MM_Var: `gvar' or `CFF2' table is missing\n" ));
2138 usePsName =
FT_BOOL( fvar_head.instanceSize ==
2139 6 + 4 * fvar_head.axisCount );
2144 fvar_head.axisCount,
2145 fvar_head.axisCount == 1 ?
"is" :
"es" ));
2150 num_axes = fvar_head.axisCount;
2151 face->blend->num_axis = num_axes;
2154 num_axes =
face->blend->num_axis;
2159 num_instances = (
FT_UInt)
face->root.style_flags >> 16;
2172 ( ( (
n) +
sizeof (
void*) - 1 ) & ~(
sizeof (
void*) - 1 ) )
2179 namedstyle_size =
ALIGN_SIZE( num_instances *
2181 next_coords_size =
ALIGN_SIZE( num_instances *
2184 next_name_size = num_axes * 5;
2188 face->blend->mmvar_len = mmvar_size +
2197 face->blend->mmvar = mmvar;
2213 (
FT_UShort*)( (
char*)mmvar + mmvar_size );
2215 (
FT_Var_Axis*)( (
char*)axis_flags + axis_flags_size );
2221 for (
i = 0;
i < num_instances;
i++ )
2224 next_coords += num_axes;
2228 namedstyle_size + next_coords_size );
2229 for (
i = 0;
i < num_axes;
i++ )
2241 for (
i = 0;
i < num_axes;
i++ )
2243 GX_FVar_Axis axis_rec;
2245#ifdef FT_DEBUG_LEVEL_TRACE
2252 a->tag = axis_rec.axisTag;
2253 a->minimum = axis_rec.minValue;
2254 a->def = axis_rec.defaultValue;
2255 a->maximum = axis_rec.maxValue;
2256 a->strid = axis_rec.nameID;
2259 a->name[1] = (
FT_String)( (
a->tag >> 16 ) & 0xFF );
2260 a->name[2] = (
FT_String)( (
a->tag >> 8 ) & 0xFF );
2264 *axis_flags = axis_rec.flags;
2266 if (
a->minimum >
a->def ||
2267 a->def >
a->maximum )
2269 a->minimum =
a->def;
2270 a->maximum =
a->def;
2272#ifdef FT_DEBUG_LEVEL_TRACE
2277#ifdef FT_DEBUG_LEVEL_TRACE
2281 " minimum default maximum flags\n" ));
2285 " %10.5f %10.5f %10.5f 0x%04X%s\n",
2288 a->minimum / 65536.0,
2290 a->maximum / 65536.0,
2292 invalid ?
" (invalid, disabled)" :
"" ));
2304 num_axes * num_instances ) )
2307 if ( fvar_head.instanceCount && !
face->blend->avar_loaded )
2312 ft_var_load_avar(
face );
2319 fvar_head.instanceCount,
2320 fvar_head.instanceCount == 1 ?
"" :
"s" ));
2323 nsc =
face->blend->normalized_stylecoords;
2324 for (
i = 0;
i < fvar_head.instanceCount;
i++,
ns++ )
2335 for (
j = 0;
j < num_axes;
j++,
c++ )
2344#ifdef FT_DEBUG_LEVEL_TRACE
2356 if (
ns->strid != 0xFFFF )
2361 if ( strname && !
ft_strcmp( strname,
".notdef" ) )
2365 if (
ns->psid != 0xFFFF )
2370 if ( psname && !
ft_strcmp( psname,
".notdef" ) )
2376 FT_TRACE5((
" instance %d (%s%s%s, %s%s%s)\n",
2378 strname ?
"name: `" :
"",
2379 strname ? strname :
"unnamed",
2381 psname ?
"PS name: `" :
"",
2382 psname ? psname :
"no PS name",
2383 psname ?
"'" :
"" ));
2390 ft_var_to_normalized(
face, num_axes,
ns->coords, nsc );
2396 if ( num_instances != fvar_head.instanceCount )
2400 FT_Int found, dummy1, dummy2;
2431 " Adding default instance to named instances\n" ));
2440 for (
j = 0;
j < num_axes;
j++,
a++,
c++ )
2446 ft_var_load_mvar(
face );
2461 (
FT_UShort*)( (
char*)mmvar + mmvar_size );
2463 (
FT_Var_Axis*)( (
char*)axis_flags + axis_flags_size );
2472 next_coords += num_axes;
2477 namedstyle_size + next_coords_size );
2478 for (
n = 0;
n < num_axes;
n++ )
2480 a->
name = next_name;
2483 if (
a->tag == TTAG_wght )
2484 a->name = (
char*)
"Weight";
2485 else if (
a->tag == TTAG_wdth )
2486 a->name = (
char*)
"Width";
2487 else if (
a->tag == TTAG_opsz )
2488 a->name = (
char*)
"OpticalSize";
2489 else if (
a->tag == TTAG_slnt )
2490 a->name = (
char*)
"Slant";
2536 blend =
face->blend;
2537 mmvar = blend->mmvar;
2539 if ( num_coords > mmvar->
num_axis )
2542 " only using first %d of %d coordinates\n",
2548 " normalized design coordinates:\n" ));
2550 for (
i = 0;
i < num_coords;
i++ )
2555 FT_TRACE1((
"TT_Set_MM_Blend: normalized design coordinate %.5f\n"
2556 " is out of range [-1;1]\n",
2565 if ( !
face->is_cff2 && !blend->glyphoffsets )
2569 if ( !blend->coords )
2575 all_design_coords =
TRUE;
2578 if ( !blend->normalizedcoords )
2583 manageCvt = mcvt_modify;
2597 manageCvt = mcvt_retain;
2599 for (
i = 0;
i < num_coords;
i++ )
2601 if ( blend->normalizedcoords[
i] !=
coords[
i] )
2603 manageCvt = mcvt_load;
2614 c = blend->normalizedcoords +
i;
2615 n = blend->normalized_stylecoords +
2616 ( instance_index - 1 ) * mmvar->
num_axis +
2625 c = blend->normalizedcoords +
i;
2641 if ( blend->normalizedcoords[
i] != 0 )
2643 manageCvt = mcvt_load;
2659 if ( set_design_coords )
2660 ft_var_to_design(
face,
2661 all_design_coords ? blend->num_axis : num_coords,
2662 blend->normalizedcoords,
2669 switch ( manageCvt )
2744 face->root.face_flags &= ~FT_FACE_FLAG_VARIATION;
2792 blend =
face->blend;
2794 if ( !blend->coords )
2803 if ( num_coords > blend->num_axis )
2806 " only using first %d of %d coordinates\n",
2807 blend->num_axis, num_coords ));
2808 nc = blend->num_axis;
2811 if (
face->doblend )
2813 for (
i = 0;
i < nc;
i++ )
2814 coords[
i] = blend->normalizedcoords[
i];
2818 for (
i = 0;
i < nc;
i++ )
2822 for ( ;
i < num_coords;
i++ )
2881 blend =
face->blend;
2882 mmvar = blend->mmvar;
2884 if ( num_coords > mmvar->
num_axis )
2887 " only using first %d of %d coordinates\n",
2892 if ( !blend->coords )
2900 for (
i = 0;
i < num_coords;
i++,
n++,
c++ )
2915 instance_index = (
FT_UInt)
face->root.face_index >> 16;
2916 named_style = mmvar->
namedstyle + instance_index - 1;
2918 n = named_style->
coords + num_coords;
2933 a = mmvar->
axis + num_coords;
2946 if ( blend->normalizedcoords && !have_diff )
2952 if ( !
face->blend->avar_loaded )
2953 ft_var_load_avar(
face );
2956 " normalized design coordinates:\n" ));
2957 ft_var_to_normalized(
face, num_coords, blend->coords,
normalized );
2966 face->root.face_flags &= ~FT_FACE_FLAG_VARIATION;
3015 blend =
face->blend;
3017 if ( !blend->coords )
3026 if ( num_coords > blend->num_axis )
3029 " only using first %d of %d coordinates\n",
3030 blend->num_axis, num_coords ));
3031 nc = blend->num_axis;
3034 if (
face->doblend )
3036 for (
i = 0;
i < nc;
i++ )
3041 for (
i = 0;
i < nc;
i++ )
3045 for ( ;
i < num_coords;
i++ )
3089 blend =
face->blend;
3090 mmvar = blend->mmvar;
3092 num_instances = (
FT_UInt)
face->root.style_flags >> 16;
3095 if ( instance_index > num_instances )
3101 if ( instance_index > 0 )
3110 named_style = mmvar->
namedstyle + instance_index - 1;
3120 face->root.style_name = style_name;
3137 face->root.face_index = ( instance_index << 16 ) |
3138 (
face->root.face_index & 0xFFFFL );
3139 face->root.face_flags &= ~FT_FACE_FLAG_VARIATION;
3164 size->cvt_ready = -1;
3215 GX_Blend blend =
face->blend;
3233 "tt_face_vary_cvt: no blend specified\n" ));
3241 "tt_face_vary_cvt: no `cvt ' table\n" ));
3261 table_start = FT_Stream_FTell(
stream );
3281 if ( offsetToData + ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) * 4 >
3285 " invalid CVT variation array header\n" ));
3291 offsetToData += table_start;
3293 if ( tupleCount & GX_TC_TUPLES_SHARE_POINT_NUMBERS )
3295 here = FT_Stream_FTell(
stream );
3297 FT_Stream_SeekSet(
stream, offsetToData );
3299 sharedpoints = ft_var_readpackedpoints(
stream,
3302 offsetToData = FT_Stream_FTell(
stream );
3304 FT_Stream_SeekSet(
stream, here );
3307 FT_TRACE5((
"cvar: there %s %d tuple%s:\n",
3308 ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ?
"is" :
"are",
3309 tupleCount & GX_TC_TUPLE_COUNT_MASK,
3310 ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ?
"" :
"s" ));
3315 for (
i = 0;
i < ( tupleCount & GX_TC_TUPLE_COUNT_MASK );
i++ )
3327 if ( tupleIndex & GX_TI_EMBEDDED_TUPLE_COORD )
3329 for (
j = 0;
j < blend->num_axis;
j++ )
3332 else if ( ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) >= blend->tuplecount )
3335 " invalid tuple index\n" ));
3342 if ( !blend->tuplecoords )
3345 " no valid tuple coordinates available\n" ));
3353 blend->tuplecoords +
3354 ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) * blend->num_axis,
3358 if ( tupleIndex & GX_TI_INTERMEDIATE_TUPLE )
3360 for (
j = 0;
j < blend->num_axis;
j++ )
3362 for (
j = 0;
j < blend->num_axis;
j++ )
3366 apply = ft_var_apply_tuple( blend,
3374 offsetToData += tupleDataSize;
3378 here = FT_Stream_FTell(
stream );
3380 FT_Stream_SeekSet(
stream, offsetToData );
3382 if ( tupleIndex & GX_TI_PRIVATE_POINT_NUMBERS )
3384 localpoints = ft_var_readpackedpoints(
stream,
3392 point_count = spoint_count;
3395 deltas = ft_var_readpackeddeltas(
stream,
3397 point_count == 0 ?
face->cvt_size
3402 ( localpoints == ALL_POINTS && point_count !=
face->cvt_size ) )
3405 else if ( localpoints == ALL_POINTS )
3407#ifdef FT_DEBUG_LEVEL_TRACE
3415 for (
j = 0;
j <
face->cvt_size;
j++ )
3420 old_cvt_delta = cvt_deltas[
j];
3421 cvt_deltas[
j] = old_cvt_delta +
FT_MulFix( deltas[
j], apply );
3423#ifdef FT_DEBUG_LEVEL_TRACE
3424 if ( old_cvt_delta != cvt_deltas[
j] )
3428 ( FT_fdot6ToFixed(
face->cvt[
j] ) +
3429 old_cvt_delta ) / 65536.0,
3430 ( FT_fdot6ToFixed(
face->cvt[
j] ) +
3431 cvt_deltas[
j] ) / 65536.0 ));
3437#ifdef FT_DEBUG_LEVEL_TRACE
3445#ifdef FT_DEBUG_LEVEL_TRACE
3452 for (
j = 0;
j < point_count;
j++ )
3462 old_cvt_delta = cvt_deltas[pindex];
3463 cvt_deltas[pindex] = old_cvt_delta +
FT_MulFix( deltas[
j], apply );
3465#ifdef FT_DEBUG_LEVEL_TRACE
3466 if ( old_cvt_delta != cvt_deltas[pindex] )
3470 ( FT_fdot6ToFixed(
face->cvt[pindex] ) +
3471 old_cvt_delta ) / 65536.0,
3472 ( FT_fdot6ToFixed(
face->cvt[pindex] ) +
3473 cvt_deltas[pindex] ) / 65536.0 ));
3479#ifdef FT_DEBUG_LEVEL_TRACE
3485 if ( localpoints != ALL_POINTS )
3489 offsetToData += tupleDataSize;
3491 FT_Stream_SeekSet(
stream, here );
3496 for (
i = 0;
i <
face->cvt_size;
i++ )
3497 face->cvt[
i] += FT_fixedToFdot6( cvt_deltas[
i] );
3503 if ( sharedpoints != ALL_POINTS )
3513 tt_cvt_ready_iterator,
3526 tt_delta_shift(
int p1,
3536 delta.
x = out_points[
ref].
x - in_points[
ref].
x;
3537 delta.
y = out_points[
ref].
y - in_points[
ref].
y;
3539 if ( delta.
x == 0 && delta.
y == 0 )
3542 for (
p = p1;
p <
ref;
p++ )
3544 out_points[
p].
x += delta.
x;
3545 out_points[
p].
y += delta.
y;
3548 for (
p =
ref + 1;
p <= p2;
p++ )
3550 out_points[
p].
x += delta.
x;
3551 out_points[
p].
y += delta.
y;
3563 tt_delta_interpolate(
int p1,
3572 FT_Pos out, in1, in2, out1, out2, d1, d2;
3579 for (
i = 0;
i <= 1;
i++ )
3585 if ( in_points[ref1].
x > in_points[ref2].
x )
3592 in1 = in_points[ref1].
x;
3593 in2 = in_points[ref2].
x;
3594 out1 = out_points[ref1].
x;
3595 out2 = out_points[ref2].
x;
3601 if ( in1 != in2 || out1 == out2 )
3607 for (
p = p1;
p <= p2;
p++ )
3609 out = in_points[
p].
x;
3613 else if (
out >= in2 )
3618 out_points[
p].
x =
out;
3655 end_point =
outline->contours[contour];
3656 first_point =
point;
3659 while (
point <= end_point && !has_delta[
point] )
3662 if (
point <= end_point )
3664 first_delta =
point;
3669 while (
point <= end_point )
3673 if ( has_delta[
point] )
3675 tt_delta_interpolate( cur_delta + 1,
3688 if ( cur_delta == first_delta )
3689 tt_delta_shift( first_point,
3698 tt_delta_interpolate( cur_delta + 1,
3705 if ( first_delta > 0 )
3706 tt_delta_interpolate( first_point,
3716 }
while ( contour < outline->n_contours );
3779 GX_Blend blend =
face->blend;
3794 if ( !
face->doblend || !blend )
3795 return FT_THROW( Invalid_Argument );
3797 for (
i = 0;
i < n_points;
i++ )
3803 if ( glyph_index >= blend->gv_glyphcnt ||
3804 blend->glyphoffsets[glyph_index] ==
3805 blend->glyphoffsets[glyph_index + 1] )
3807 FT_TRACE2((
"TT_Vary_Apply_Glyph_Deltas:"
3808 " no variation data for glyph %d\n", glyph_index ));
3817 dataSize = blend->glyphoffsets[glyph_index + 1] -
3818 blend->glyphoffsets[glyph_index];
3824 glyph_start = FT_Stream_FTell(
stream );
3838 ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) * 4 >
dataSize )
3840 FT_TRACE2((
"TT_Vary_Apply_Glyph_Deltas:"
3841 " invalid glyph variation array header\n" ));
3847 offsetToData += glyph_start;
3849 if ( tupleCount & GX_TC_TUPLES_SHARE_POINT_NUMBERS )
3851 here = FT_Stream_FTell(
stream );
3853 FT_Stream_SeekSet(
stream, offsetToData );
3855 sharedpoints = ft_var_readpackedpoints(
stream,
3858 offsetToData = FT_Stream_FTell(
stream );
3860 FT_Stream_SeekSet(
stream, here );
3863 FT_TRACE5((
"gvar: there %s %d tuple%s:\n",
3864 ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ?
"is" :
"are",
3865 tupleCount & GX_TC_TUPLE_COUNT_MASK,
3866 ( tupleCount & GX_TC_TUPLE_COUNT_MASK ) == 1 ?
"" :
"s" ));
3872 for (
j = 0;
j < n_points;
j++ )
3874 points_org[
j].
x = FT_intToFixed(
outline->points[
j].x );
3875 points_org[
j].
y = FT_intToFixed(
outline->points[
j].y );
3878 for (
i = 0;
i < ( tupleCount & GX_TC_TUPLE_COUNT_MASK );
i++ )
3890 if ( tupleIndex & GX_TI_EMBEDDED_TUPLE_COORD )
3892 for (
j = 0;
j < blend->num_axis;
j++ )
3895 else if ( ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) >= blend->tuplecount )
3897 FT_TRACE2((
"TT_Vary_Apply_Glyph_Deltas:"
3898 " invalid tuple index\n" ));
3906 blend->tuplecoords +
3907 ( tupleIndex & GX_TI_TUPLE_INDEX_MASK ) * blend->num_axis,
3910 if ( tupleIndex & GX_TI_INTERMEDIATE_TUPLE )
3912 for (
j = 0;
j < blend->num_axis;
j++ )
3914 for (
j = 0;
j < blend->num_axis;
j++ )
3918 apply = ft_var_apply_tuple( blend,
3926 offsetToData += tupleDataSize;
3930 here = FT_Stream_FTell(
stream );
3932 FT_Stream_SeekSet(
stream, offsetToData );
3934 if ( tupleIndex & GX_TI_PRIVATE_POINT_NUMBERS )
3936 localpoints = ft_var_readpackedpoints(
stream,
3944 point_count = spoint_count;
3947 deltas_x = ft_var_readpackeddeltas(
stream,
3949 point_count == 0 ? n_points
3951 deltas_y = ft_var_readpackeddeltas(
stream,
3953 point_count == 0 ? n_points
3956 if ( !
points || !deltas_y || !deltas_x )
3959 else if (
points == ALL_POINTS )
3961#ifdef FT_DEBUG_LEVEL_TRACE
3969 for (
j = 0;
j < n_points;
j++ )
3971 FT_Fixed old_point_delta_x = point_deltas_x[
j];
3972 FT_Fixed old_point_delta_y = point_deltas_y[
j];
3978 if (
j < n_points - 4 )
3980 point_deltas_x[
j] = old_point_delta_x + point_delta_x;
3981 point_deltas_y[
j] = old_point_delta_y + point_delta_y;
3988 if (
j == ( n_points - 4 ) &&
3989 !(
face->variation_support &
3991 point_deltas_x[
j] = old_point_delta_x + point_delta_x;
3993 else if (
j == ( n_points - 3 ) &&
3994 !(
face->variation_support &
3996 point_deltas_x[
j] = old_point_delta_x + point_delta_x;
3998 else if (
j == ( n_points - 2 ) &&
3999 !(
face->variation_support &
4001 point_deltas_y[
j] = old_point_delta_y + point_delta_y;
4003 else if (
j == ( n_points - 1 ) &&
4004 !(
face->variation_support &
4006 point_deltas_y[
j] = old_point_delta_y + point_delta_y;
4009#ifdef FT_DEBUG_LEVEL_TRACE
4010 if ( point_delta_x || point_delta_y )
4012 FT_TRACE7((
" %d: (%f, %f) -> (%f, %f)\n",
4014 ( FT_intToFixed(
outline->points[
j].x ) +
4015 old_point_delta_x ) / 65536.0,
4016 ( FT_intToFixed(
outline->points[
j].y ) +
4017 old_point_delta_y ) / 65536.0,
4018 ( FT_intToFixed(
outline->points[
j].x ) +
4019 point_deltas_x[
j] ) / 65536.0,
4020 ( FT_intToFixed(
outline->points[
j].y ) +
4021 point_deltas_y[
j] ) / 65536.0 ));
4027#ifdef FT_DEBUG_LEVEL_TRACE
4035#ifdef FT_DEBUG_LEVEL_TRACE
4042 for (
j = 0;
j < n_points;
j++ )
4045 points_out[
j] = points_org[
j];
4048 for (
j = 0;
j < point_count;
j++ )
4053 if (
idx >= n_points )
4064 tt_interpolate_deltas(
outline,
4071 for (
j = 0;
j < n_points;
j++ )
4073 FT_Fixed old_point_delta_x = point_deltas_x[
j];
4074 FT_Fixed old_point_delta_y = point_deltas_y[
j];
4076 FT_Pos point_delta_x = points_out[
j].
x - points_org[
j].
x;
4077 FT_Pos point_delta_y = points_out[
j].
y - points_org[
j].
y;
4080 if (
j < n_points - 4 )
4082 point_deltas_x[
j] = old_point_delta_x + point_delta_x;
4083 point_deltas_y[
j] = old_point_delta_y + point_delta_y;
4090 if (
j == ( n_points - 4 ) &&
4091 !(
face->variation_support &
4093 point_deltas_x[
j] = old_point_delta_x + point_delta_x;
4095 else if (
j == ( n_points - 3 ) &&
4096 !(
face->variation_support &
4098 point_deltas_x[
j] = old_point_delta_x + point_delta_x;
4100 else if (
j == ( n_points - 2 ) &&
4101 !(
face->variation_support &
4103 point_deltas_y[
j] = old_point_delta_y + point_delta_y;
4105 else if (
j == ( n_points - 1 ) &&
4106 !(
face->variation_support &
4108 point_deltas_y[
j] = old_point_delta_y + point_delta_y;
4111#ifdef FT_DEBUG_LEVEL_TRACE
4112 if ( point_delta_x || point_delta_y )
4114 FT_TRACE7((
" %d: (%f, %f) -> (%f, %f)\n",
4116 ( FT_intToFixed(
outline->points[
j].x ) +
4117 old_point_delta_x ) / 65536.0,
4118 ( FT_intToFixed(
outline->points[
j].y ) +
4119 old_point_delta_y ) / 65536.0,
4120 ( FT_intToFixed(
outline->points[
j].x ) +
4121 point_deltas_x[
j] ) / 65536.0,
4122 ( FT_intToFixed(
outline->points[
j].y ) +
4123 point_deltas_y[
j] ) / 65536.0 ));
4129#ifdef FT_DEBUG_LEVEL_TRACE
4135 if ( localpoints != ALL_POINTS )
4140 offsetToData += tupleDataSize;
4142 FT_Stream_SeekSet(
stream, here );
4147 for (
i = 0;
i < n_points;
i++ )
4149 unrounded[
i].
x += FT_fixedToFdot6( point_deltas_x[
i] );
4150 unrounded[
i].
y += FT_fixedToFdot6( point_deltas_y[
i] );
4152 outline->points[
i].x += FT_fixedToInt( point_deltas_x[
i] );
4153 outline->points[
i].y += FT_fixedToInt( point_deltas_y[
i] );
4161 if ( sharedpoints != ALL_POINTS )
4198 *num_coords =
face->blend->num_axis;
4201 if ( normalizedcoords )
4202 *normalizedcoords =
face->blend->normalizedcoords;
4204 *mm_var =
face->blend->mmvar;
4222 GX_ItemVarStore itemStore )
4228 if ( itemStore->varData )
4230 for (
i = 0;
i < itemStore->dataCount;
i++ )
4232 FT_FREE( itemStore->varData[
i].regionIndices );
4233 FT_FREE( itemStore->varData[
i].deltaSet );
4236 FT_FREE( itemStore->varData );
4239 if ( itemStore->varRegionList )
4241 for (
i = 0;
i < itemStore->regionCount;
i++ )
4242 FT_FREE( itemStore->varRegionList[
i].axisList );
4244 FT_FREE( itemStore->varRegionList );
4261 GX_Blend blend =
face->blend;
4270 num_axes = blend->mmvar->num_axis;
4273 FT_FREE( blend->normalizedcoords );
4274 FT_FREE( blend->normalized_stylecoords );
4277 if ( blend->avar_segment )
4279 for (
i = 0;
i < num_axes;
i++ )
4280 FT_FREE( blend->avar_segment[
i].correspondence );
4281 FT_FREE( blend->avar_segment );
4284 if ( blend->hvar_table )
4286 ft_var_done_item_variation_store(
face,
4287 &blend->hvar_table->itemStore );
4289 FT_FREE( blend->hvar_table->widthMap.innerIndex );
4290 FT_FREE( blend->hvar_table->widthMap.outerIndex );
4294 if ( blend->vvar_table )
4296 ft_var_done_item_variation_store(
face,
4297 &blend->vvar_table->itemStore );
4299 FT_FREE( blend->vvar_table->widthMap.innerIndex );
4300 FT_FREE( blend->vvar_table->widthMap.outerIndex );
4304 if ( blend->mvar_table )
4306 ft_var_done_item_variation_store(
face,
4307 &blend->mvar_table->itemStore );
4309 FT_FREE( blend->mvar_table->values );
4313 FT_FREE( blend->tuplecoords );
4314 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 INT_TO_F26DOT6(x)
#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]
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