1 /**************************************************************************** 2 * 3 * ftmmtypes.h 4 * 5 * OpenType Variations type definitions for internal use 6 * with the multi-masters service (specification). 7 * 8 * Copyright (C) 2022-2023 by 9 * David Turner, Robert Wilhelm, Werner Lemberg, George Williams, and 10 * Dominik Röttsches. 11 * 12 * This file is part of the FreeType project, and may only be used, 13 * modified, and distributed under the terms of the FreeType project 14 * license, LICENSE.TXT. By continuing to use, modify, or distribute 15 * this file you indicate that you have read the license and 16 * understand and accept it fully. 17 * 18 */ 19 20 21 #ifndef FTMMTYPES_H_ 22 #define FTMMTYPES_H_ 23 24 FT_BEGIN_HEADER 25 26 27 typedef FT_Int32 FT_ItemVarDelta; 28 29 typedef struct GX_ItemVarDataRec_ 30 { 31 FT_UInt itemCount; /* number of delta sets per item */ 32 FT_UInt regionIdxCount; /* number of region indices */ 33 FT_UInt* regionIndices; /* array of `regionCount' indices; */ 34 /* these index `varRegionList' */ 35 FT_ItemVarDelta* deltaSet; /* array of `itemCount' deltas */ 36 /* use `innerIndex' for this array */ 37 38 } GX_ItemVarDataRec, *GX_ItemVarData; 39 40 41 /* contribution of one axis to a region */ 42 typedef struct GX_AxisCoordsRec_ 43 { 44 FT_Fixed startCoord; 45 FT_Fixed peakCoord; /* zero means no effect (factor = 1) */ 46 FT_Fixed endCoord; 47 48 } GX_AxisCoordsRec, *GX_AxisCoords; 49 50 51 typedef struct GX_VarRegionRec_ 52 { 53 GX_AxisCoords axisList; /* array of axisCount records */ 54 55 } GX_VarRegionRec, *GX_VarRegion; 56 57 58 /* item variation store */ 59 typedef struct GX_ItemVarStoreRec_ 60 { 61 FT_UInt dataCount; 62 GX_ItemVarData varData; /* array of dataCount records; */ 63 /* use `outerIndex' for this array */ 64 FT_UShort axisCount; 65 FT_UInt regionCount; /* total number of regions defined */ 66 GX_VarRegion varRegionList; 67 68 } GX_ItemVarStoreRec, *GX_ItemVarStore; 69 70 71 typedef struct GX_DeltaSetIdxMapRec_ 72 { 73 FT_ULong mapCount; 74 FT_UInt* outerIndex; /* indices to item var data */ 75 FT_UInt* innerIndex; /* indices to delta set */ 76 77 } GX_DeltaSetIdxMapRec, *GX_DeltaSetIdxMap; 78 79 80 FT_END_HEADER 81 82 #endif /* FTMMTYPES_H_ */ 83 84 85 /* END */ 86