[truetype] Some GX structure renames for generalization.

We need this later on for MVAR also.

* src/truetype/ttgxvar.h (GX_HVarData): Renamed to...
(GX_ItemVarData): ...this.
(GX_HVarRegion): Renamed to...
(GX_VarRegion): ...this.
(GX_HVStore): Renamed to...
(GX_ItemVarStore): ...this.
(GX_WidthMap): Renamed to...
(GX_DeltaSetIdxMap): ...this.

(GX_HVarTable): Updated.

* src/truetype/ttgxvar.c: Updated.
This commit is contained in:
Werner Lemberg 2017-01-06 21:32:49 +01:00
parent 9c814704c0
commit 0bd0112f4e
3 changed files with 45 additions and 26 deletions

View File

@ -1,3 +1,22 @@
2017-01-06 Werner Lemberg <wl@gnu.org>
[truetype] Some GX structure renames for generalization.
We need this later on for MVAR also.
* src/truetype/ttgxvar.h (GX_HVarData): Renamed to...
(GX_ItemVarData): ...this.
(GX_HVarRegion): Renamed to...
(GX_VarRegion): ...this.
(GX_HVStore): Renamed to...
(GX_ItemVarStore): ...this.
(GX_WidthMap): Renamed to...
(GX_DeltaSetIdxMap): ...this.
(GX_HVarTable): Updated.
* src/truetype/ttgxvar.c: Updated.
2017-01-06 Werner Lemberg <wl@gnu.org> 2017-01-06 Werner Lemberg <wl@gnu.org>
[truetype] Code shuffling. [truetype] Code shuffling.

View File

@ -417,10 +417,10 @@
FT_UInt i, j, k; FT_UInt i, j, k;
FT_UInt shortDeltaCount; FT_UInt shortDeltaCount;
GX_Blend blend = face->blend; GX_Blend blend = face->blend;
GX_HVStore itemStore; GX_ItemVarStore itemStore;
GX_HVarTable hvarTable; GX_HVarTable hvarTable;
GX_HVarData hvarData; GX_ItemVarData hvarData;
FT_ULong* dataOffsetArray = NULL; FT_ULong* dataOffsetArray = NULL;
@ -617,8 +617,8 @@
FT_Error error; FT_Error error;
GX_Blend blend = face->blend; GX_Blend blend = face->blend;
GX_WidthMap widthMap; GX_DeltaSetIdxMap widthMap;
FT_UShort format; FT_UShort format;
FT_UInt entrySize; FT_UInt entrySize;
@ -822,7 +822,7 @@
{ {
FT_Error error = FT_Err_Ok; FT_Error error = FT_Err_Ok;
GX_HVarData varData; GX_ItemVarData varData;
FT_UInt master, j; FT_UInt master, j;
FT_Fixed netAdjustment = 0; /* accumulated adjustment */ FT_Fixed netAdjustment = 0; /* accumulated adjustment */

View File

@ -61,7 +61,7 @@ FT_BEGIN_HEADER
} GX_AVarSegmentRec, *GX_AVarSegment; } GX_AVarSegmentRec, *GX_AVarSegment;
typedef struct GX_HVarDataRec_ typedef struct GX_ItemVarDataRec_
{ {
FT_UInt itemCount; /* number of delta sets per item */ FT_UInt itemCount; /* number of delta sets per item */
FT_UInt regionIdxCount; /* number of region indices in this data */ FT_UInt regionIdxCount; /* number of region indices in this data */
@ -70,7 +70,7 @@ FT_BEGIN_HEADER
FT_Short* deltaSet; /* array of `itemCount' deltas */ FT_Short* deltaSet; /* array of `itemCount' deltas */
/* use `innerIndex' for this array */ /* use `innerIndex' for this array */
} GX_HVarDataRec, *GX_HVarData; } GX_ItemVarDataRec, *GX_ItemVarData;
/* contribution of one axis to a region */ /* contribution of one axis to a region */
@ -83,33 +83,33 @@ FT_BEGIN_HEADER
} GX_AxisCoordsRec, *GX_AxisCoords; } GX_AxisCoordsRec, *GX_AxisCoords;
typedef struct GX_HVarRegionRec_ typedef struct GX_VarRegionRec_
{ {
GX_AxisCoords axisList; /* array of axisCount records */ GX_AxisCoords axisList; /* array of axisCount records */
} GX_HVarRegionRec, *GX_HVarRegion; } GX_VarRegionRec, *GX_VarRegion;
/* HVAR item variation store */ /* item variation store */
typedef struct GX_HVStoreRec_ typedef struct GX_ItemVarStoreRec_
{ {
FT_UInt dataCount; FT_UInt dataCount;
GX_HVarData varData; /* array of dataCount records; */ GX_ItemVarData varData; /* array of dataCount records; */
/* use `outerIndex' for this array */ /* use `outerIndex' for this array */
FT_UShort axisCount; FT_UShort axisCount;
FT_UInt regionCount; /* total number of regions defined */ FT_UInt regionCount; /* total number of regions defined */
GX_HVarRegion varRegionList; GX_VarRegion varRegionList;
} GX_HVStoreRec, *GX_HVStore; } GX_ItemVarStoreRec, *GX_ItemVarStore;
typedef struct GX_WidthMapRec_ typedef struct GX_DeltaSetIdxMapRec_
{ {
FT_UInt mapCount; FT_UInt mapCount;
FT_UInt* outerIndex; /* indices to item var data */ FT_UInt* outerIndex; /* indices to item var data */
FT_UInt* innerIndex; /* indices to delta set */ FT_UInt* innerIndex; /* indices to delta set */
} GX_WidthMapRec, *GX_WidthMap; } GX_DeltaSetIdxMapRec, *GX_DeltaSetIdxMap;
/*************************************************************************/ /*************************************************************************/
@ -122,11 +122,11 @@ FT_BEGIN_HEADER
/* */ /* */
typedef struct GX_HVarTableRec_ typedef struct GX_HVarTableRec_
{ {
GX_HVStoreRec itemStore; /* Item Variation Store */ GX_ItemVarStoreRec itemStore; /* Item Variation Store */
GX_WidthMapRec widthMap; /* Advance Width Mapping */ GX_DeltaSetIdxMapRec widthMap; /* Advance Width Mapping */
#if 0 #if 0
GX_LSBMap lsbMap; /* not implemented */ GX_DeltaSetIdxMapRec lsbMap; /* not implemented */
GX_RSBMap rsbMap; /* not implemented */ GX_DeltaSetIdxMapRec rsbMap; /* not implemented */
#endif #endif
} GX_HVarTableRec, *GX_HVarTable; } GX_HVarTableRec, *GX_HVarTable;