ref: f152a7fbaefb8b7f2dee22e4e3d54ed1afedd301
dir: /otf.h/
/* this file is generated. do not modify. */
typedef struct Otf Otf;
#pragma incomplete Otf
typedef struct SubHeader SubHeader;
typedef struct MapGroup MapGroup;
typedef struct SubtableCmap0 SubtableCmap0;
typedef struct SubtableCmap2 SubtableCmap2;
typedef struct SubtableCmap4 SubtableCmap4;
typedef struct SubtableCmap6 SubtableCmap6;
typedef struct SubtableCmap8 SubtableCmap8;
typedef struct SubtableCmap10 SubtableCmap10;
typedef struct SubtableCmap12or13 SubtableCmap12or13;
typedef struct UnicodeRange UnicodeRange;
typedef struct DefaultUVS DefaultUVS;
typedef struct UVSMapping UVSMapping;
typedef struct NonDefaultUVS NonDefaultUVS;
typedef struct VariationSelector VariationSelector;
typedef struct SubtableCmap14 SubtableCmap14;
typedef struct SubtableCmap SubtableCmap;
typedef struct EncodingRecord EncodingRecord;
typedef struct TableCmap TableCmap;
typedef struct TableHead TableHead;
typedef struct TableHhea TableHhea;
typedef struct LongHorMetric LongHorMetric;
typedef struct TableMaxp TableMaxp;
typedef struct TableHmtx TableHmtx;
typedef struct TablePost TablePost;
typedef struct NameRecord NameRecord;
typedef struct LangTagRecord LangTagRecord;
typedef struct TableName TableName;
typedef struct BigGlyphMetrics BigGlyphMetrics;
typedef struct SmallGlyphMetrics SmallGlyphMetrics;
typedef struct SbitLineMetrics SbitLineMetrics;
typedef struct IndexSubtable1 IndexSubtable1;
typedef struct IndexSubtable2 IndexSubtable2;
typedef struct IndexSubtable3 IndexSubtable3;
typedef struct GlyphIdOffsetPair GlyphIdOffsetPair;
typedef struct IndexSubtable4 IndexSubtable4;
typedef struct IndexSubtable5 IndexSubtable5;
typedef struct IndexSubtable IndexSubtable;
typedef struct IndexSubtableRecord IndexSubtableRecord;
typedef struct BitmapSize BitmapSize;
typedef struct TableEBDT TableEBDT;
typedef struct TableEBLC TableEBLC;
typedef struct AttachList AttachList;
typedef struct AttachPoint AttachPoint;
typedef struct LigCaretList LigCaretList;
typedef struct LigGlyph LigGlyph;
typedef struct CaretValue CaretValue;
typedef struct ValueRecord ValueRecord;
typedef struct SinglePos SinglePos;
typedef struct TableGDEF TableGDEF;
typedef struct LangSys LangSys;
typedef struct LangSysRecord LangSysRecord;
typedef struct Script Script;
typedef struct ScriptRecord ScriptRecord;
typedef struct ScriptList ScriptList;
typedef struct Feature Feature;
typedef struct FeatureRecord FeatureRecord;
typedef struct FeatureList FeatureList;
typedef struct Lookup Lookup;
typedef struct LookupList LookupList;
typedef struct TableGPOS TableGPOS;
typedef struct TableGSUB TableGSUB;
typedef struct MathValueRecord MathValueRecord;
typedef struct MathConstants MathConstants;
typedef struct MathItalicsCorrectionInfo MathItalicsCorrectionInfo;
typedef struct MathTopAccentAttachment MathTopAccentAttachment;
typedef struct MathKernInfoRecord MathKernInfoRecord;
typedef struct MathKernInfo MathKernInfo;
typedef struct MathKern MathKern;
typedef struct Coverage1 Coverage1;
typedef struct RangeRecord RangeRecord;
typedef struct Coverage2 Coverage2;
typedef struct Coverage Coverage;
typedef struct MathVariants MathVariants;
typedef struct MathGlyphInfo MathGlyphInfo;
typedef struct MathGlyphVariantRecord MathGlyphVariantRecord;
typedef struct GlyphPart GlyphPart;
typedef struct GlyphAssembly GlyphAssembly;
typedef struct MathGlyphConstruction MathGlyphConstruction;
typedef struct TableMATH TableMATH;
typedef struct KernPair KernPair;
typedef struct KernSubtable0 KernSubtable0;
typedef struct KernClass KernClass;
typedef struct KernSubtable2 KernSubtable2;
typedef struct KernSubtable KernSubtable;
typedef struct TableKern TableKern;
typedef struct TableLoca TableLoca;
typedef struct TableOS∕2 TableOS∕2;
typedef struct TableRecord TableRecord;
typedef struct TableDirectory TableDirectory;
struct SubHeader {
u16int firstCode;
u16int entryCode;
s16int idDelta;
u16int idRangeOffset;
};
int read_SubHeader(Otf *o, SubHeader *v);
void print_SubHeader(Biobuf *f, int indent, Otf *o, SubHeader *v);
struct MapGroup {
u32int startCharCode;
u32int endCharCode;
u32int startGlyphID;
};
int read_MapGroup(Otf *o, MapGroup *v);
void print_MapGroup(Biobuf *f, int indent, Otf *o, MapGroup *v);
struct SubtableCmap0 {
u16int length;
u16int language;
u8int glyphIdArray[256];
};
int read_SubtableCmap0(Otf *o, SubtableCmap0 *v);
void print_SubtableCmap0(Biobuf *f, int indent, Otf *o, SubtableCmap0 *v);
struct SubtableCmap2 {
u16int length;
u16int language;
u16int subHeaderKeys[256];
};
int read_SubtableCmap2(Otf *o, SubtableCmap2 *v);
void print_SubtableCmap2(Biobuf *f, int indent, Otf *o, SubtableCmap2 *v);
struct SubtableCmap4 {
u16int length;
u16int language;
u16int segCountX2;
u16int searchRange;
u16int entrySelector;
u16int rangeShift;
u16int *endCode;
// u16int reservedPad;
u16int *startCode;
s16int *idDelta;
s16int *idRangeOffset;
};
int read_SubtableCmap4(Otf *o, SubtableCmap4 *v);
void print_SubtableCmap4(Biobuf *f, int indent, Otf *o, SubtableCmap4 *v);
struct SubtableCmap6 {
u16int length;
u16int language;
u16int firstCode;
u16int entryCount;
u16int *glyphIdArray;
};
int read_SubtableCmap6(Otf *o, SubtableCmap6 *v);
void print_SubtableCmap6(Biobuf *f, int indent, Otf *o, SubtableCmap6 *v);
struct SubtableCmap8 {
u16int length;
u16int language;
u8int is32[8192];
u32int numGroups;
MapGroup *groups;
};
int read_SubtableCmap8(Otf *o, SubtableCmap8 *v);
void print_SubtableCmap8(Biobuf *f, int indent, Otf *o, SubtableCmap8 *v);
struct SubtableCmap10 {
u16int reserved;
u32int length;
u32int language;
u32int startCharCode;
u32int numChars;
};
int read_SubtableCmap10(Otf *o, SubtableCmap10 *v);
void print_SubtableCmap10(Biobuf *f, int indent, Otf *o, SubtableCmap10 *v);
struct SubtableCmap12or13 {
u16int reserved;
u32int length;
u32int language;
u32int numGroups;
MapGroup *groups;
};
int read_SubtableCmap12or13(Otf *o, SubtableCmap12or13 *v);
void print_SubtableCmap12or13(Biobuf *f, int indent, Otf *o, SubtableCmap12or13 *v);
struct UnicodeRange {
u32int startUnicodeValue;
u8int additionalCount;
};
int read_UnicodeRange(Otf *o, UnicodeRange *v);
void print_UnicodeRange(Biobuf *f, int indent, Otf *o, UnicodeRange *v);
struct DefaultUVS {
u32int numUnicodeValueRanges;
UnicodeRange *ranges;
};
int read_DefaultUVS(Otf *o, DefaultUVS *v);
void print_DefaultUVS(Biobuf *f, int indent, Otf *o, DefaultUVS *v);
struct UVSMapping {
u32int unicodeValue;
u16int glyphID;
};
int read_UVSMapping(Otf *o, UVSMapping *v);
void print_UVSMapping(Biobuf *f, int indent, Otf *o, UVSMapping *v);
struct NonDefaultUVS {
u32int numUVSMappings;
UVSMapping *uvsMappings;
};
int read_NonDefaultUVS(Otf *o, NonDefaultUVS *v);
void print_NonDefaultUVS(Biobuf *f, int indent, Otf *o, NonDefaultUVS *v);
struct VariationSelector {
u32int varSelector;
u32int defaultUVSOffset;
u32int nonDefaultUVSOffset;
DefaultUVS *defaultUVS;
NonDefaultUVS *nonDefaultUVS;
};
int read_VariationSelector(Otf *o, VariationSelector *v);
void print_VariationSelector(Biobuf *f, int indent, Otf *o, VariationSelector *v);
struct SubtableCmap14 {
u32int length;
u32int numVarSelectorRecords;
VariationSelector *varSelector;
};
int read_SubtableCmap14(Otf *o, SubtableCmap14 *v);
void print_SubtableCmap14(Biobuf *f, int indent, Otf *o, SubtableCmap14 *v);
struct SubtableCmap {
u16int format;
SubtableCmap0 sub0;
SubtableCmap2 sub2;
SubtableCmap4 sub4;
SubtableCmap6 sub6;
SubtableCmap8 sub8;
SubtableCmap10 sub10;
SubtableCmap12or13 sub12or13;
SubtableCmap14 sub14;
};
int read_SubtableCmap(Otf *o, SubtableCmap *v);
void print_SubtableCmap(Biobuf *f, int indent, Otf *o, SubtableCmap *v);
struct EncodingRecord {
u16int platformID;
u16int encodingID;
u32int subtableOffset;
SubtableCmap *subtable;
};
int read_EncodingRecord(Otf *o, EncodingRecord *v);
void print_EncodingRecord(Biobuf *f, int indent, Otf *o, EncodingRecord *v);
struct TableCmap {
// u16int version;
u16int numTables;
EncodingRecord *encodingRecords;
};
int read_TableCmap(Otf *o, TableCmap *v);
void print_TableCmap(Biobuf *f, int indent, Otf *o, TableCmap *v);
struct TableHead {
// u16int majorVersion;
// u16int minorVersion;
// float fontRevision;
// u32int checksumAdjustment;
// u32int magicNumber;
u16int flags;
u16int unitsPerEm;
s64int created;
s64int modified;
s16int xMin;
s16int yMin;
s16int xMax;
s16int yMax;
u16int macStyle;
u16int lowestRecPPEM;
// s16int fontDirectionHint;
s16int indexToLocFormat;
// s16int glyphDataFormat;
};
int read_TableHead(Otf *o, TableHead *v);
void print_TableHead(Biobuf *f, int indent, Otf *o, TableHead *v);
struct TableHhea {
u16int majorVersion;
u16int minorVersion;
s16int ascender;
s16int descender;
s16int lineGap;
u16int advanceWidthMax;
s16int minLeftSideBearing;
s16int minRightSideBearing;
s16int xMaxExtent;
s16int caretSlopeRise;
s16int caretSlopeRun;
s16int caretOffset;
// s16int reserved[4];
s16int metricDataFormat;
u16int numberOfHMetrics;
};
int read_TableHhea(Otf *o, TableHhea *v);
void print_TableHhea(Biobuf *f, int indent, Otf *o, TableHhea *v);
struct LongHorMetric {
u16int advanceWidth;
s16int lsb;
};
int read_LongHorMetric(Otf *o, LongHorMetric *v);
void print_LongHorMetric(Biobuf *f, int indent, Otf *o, LongHorMetric *v);
struct TableMaxp {
// u32int version;
u16int numGlyphs;
};
int read_TableMaxp(Otf *o, TableMaxp *v);
void print_TableMaxp(Biobuf *f, int indent, Otf *o, TableMaxp *v);
struct TableHmtx {
LongHorMetric *hMetrics;
s16int *leftSideBearings;
};
int read_TableHmtx(Otf *o, TableHmtx *v);
void print_TableHmtx(Biobuf *f, int indent, Otf *o, TableHmtx *v);
struct TablePost {
// u32int version;
float italicAngle;
s16int underlinePosition;
s16int underlineThickness;
u32int isFixedPitch;
};
int read_TablePost(Otf *o, TablePost *v);
void print_TablePost(Biobuf *f, int indent, Otf *o, TablePost *v);
struct NameRecord {
u16int platformID;
u16int encodingID;
u16int languageID;
u16int nameID;
u16int length;
u16int stringOffset;
};
int read_NameRecord(Otf *o, NameRecord *v);
void print_NameRecord(Biobuf *f, int indent, Otf *o, NameRecord *v);
struct LangTagRecord {
u16int length;
u16int langTagOffset;
};
int read_LangTagRecord(Otf *o, LangTagRecord *v);
void print_LangTagRecord(Biobuf *f, int indent, Otf *o, LangTagRecord *v);
struct TableName {
u16int version;
u16int count;
u16int storageOffset;
NameRecord *nameRecord;
u16int langTagCount;
LangTagRecord *langTagRecord;
};
int read_TableName(Otf *o, TableName *v);
void print_TableName(Biobuf *f, int indent, Otf *o, TableName *v);
struct BigGlyphMetrics {
u8int height;
u8int width;
s8int horiBearingX;
s8int horiBearingY;
u8int horiAdvance;
s8int vertBearingX;
s8int vertBearingY;
u8int vertAdvance;
};
int read_BigGlyphMetrics(Otf *o, BigGlyphMetrics *v);
void print_BigGlyphMetrics(Biobuf *f, int indent, Otf *o, BigGlyphMetrics *v);
struct SmallGlyphMetrics {
u8int height;
u8int width;
s8int bearingX;
s8int bearingY;
u8int advance;
};
int read_SmallGlyphMetrics(Otf *o, SmallGlyphMetrics *v);
void print_SmallGlyphMetrics(Biobuf *f, int indent, Otf *o, SmallGlyphMetrics *v);
struct SbitLineMetrics {
s8int ascender;
s8int descender;
u8int widthMax;
s8int caretSlopeNumerator;
s8int caretSlopeDenumerator;
s8int caretOffset;
s8int minOriginSB;
s8int minAdvanceSB;
s8int maxBeforeBL;
s8int minAfterBL;
// s8int pad[2];
};
int read_SbitLineMetrics(Otf *o, SbitLineMetrics *v);
void print_SbitLineMetrics(Biobuf *f, int indent, Otf *o, SbitLineMetrics *v);
struct IndexSubtable1 {
u32int *sbitOffsets;
};
int read_IndexSubtable1(Otf *o, IndexSubtable1 *v);
void print_IndexSubtable1(Biobuf *f, int indent, Otf *o, IndexSubtable1 *v);
struct IndexSubtable2 {
u32int imageSize;
BigGlyphMetrics bigMetrics;
};
int read_IndexSubtable2(Otf *o, IndexSubtable2 *v);
void print_IndexSubtable2(Biobuf *f, int indent, Otf *o, IndexSubtable2 *v);
struct IndexSubtable3 {
u16int *sbitOffsets;
};
int read_IndexSubtable3(Otf *o, IndexSubtable3 *v);
void print_IndexSubtable3(Biobuf *f, int indent, Otf *o, IndexSubtable3 *v);
struct GlyphIdOffsetPair {
u16int glyphID;
u16int sbitOffset;
};
int read_GlyphIdOffsetPair(Otf *o, GlyphIdOffsetPair *v);
void print_GlyphIdOffsetPair(Biobuf *f, int indent, Otf *o, GlyphIdOffsetPair *v);
struct IndexSubtable4 {
u32int numGlyphs;
GlyphIdOffsetPair *glyphArray;
};
int read_IndexSubtable4(Otf *o, IndexSubtable4 *v);
void print_IndexSubtable4(Biobuf *f, int indent, Otf *o, IndexSubtable4 *v);
struct IndexSubtable5 {
u32int imageSize;
BigGlyphMetrics bigMetrics;
u32int numGlyphs;
u16int *glyphIdArray;
};
int read_IndexSubtable5(Otf *o, IndexSubtable5 *v);
void print_IndexSubtable5(Biobuf *f, int indent, Otf *o, IndexSubtable5 *v);
struct IndexSubtable {
u16int indexFormat;
u16int imageFormat;
u32int imageDataOffset;
IndexSubtable1 sub1;
IndexSubtable2 sub2;
IndexSubtable3 sub3;
IndexSubtable4 sub4;
IndexSubtable5 sub5;
};
int read_IndexSubtable(Otf *o, IndexSubtable *v);
void print_IndexSubtable(Biobuf *f, int indent, Otf *o, IndexSubtable *v);
struct IndexSubtableRecord {
u16int firstGlyphIndex;
u16int lastGlyphIndex;
u32int indexSubtableOffset;
IndexSubtable *indexSubtable;
};
int read_IndexSubtableRecord(Otf *o, IndexSubtableRecord *v);
void print_IndexSubtableRecord(Biobuf *f, int indent, Otf *o, IndexSubtableRecord *v);
struct BitmapSize {
u32int indexSubtableListOffset;
u32int indexSubtableListSize;
u32int numberOfIndexSubtables;
// u32int colorRef;
SbitLineMetrics hori;
SbitLineMetrics vert;
u16int startGlyphIndex;
u16int endGlyphIndex;
u8int ppemX;
u8int ppemY;
u8int bitDepth;
s8int flags;
IndexSubtableRecord *indexSubtableList;
};
int read_BitmapSize(Otf *o, BitmapSize *v);
void print_BitmapSize(Biobuf *f, int indent, Otf *o, BitmapSize *v);
struct TableEBDT {
u16int majorVersion;
// u16int minorVersion;
};
int read_TableEBDT(Otf *o, TableEBDT *v);
void print_TableEBDT(Biobuf *f, int indent, Otf *o, TableEBDT *v);
struct TableEBLC {
// u16int majorVersion;
// u16int minorVersion;
u32int numSizes;
BitmapSize *bitmapSizes;
};
int read_TableEBLC(Otf *o, TableEBLC *v);
void print_TableEBLC(Biobuf *f, int indent, Otf *o, TableEBLC *v);
struct AttachList {
u16int coverageOffset;
u16int glyphCount;
u16int *attachPointOffsets;
};
int read_AttachList(Otf *o, AttachList *v);
void print_AttachList(Biobuf *f, int indent, Otf *o, AttachList *v);
struct AttachPoint {
u16int pointCount;
u16int *pointIndices;
};
int read_AttachPoint(Otf *o, AttachPoint *v);
void print_AttachPoint(Biobuf *f, int indent, Otf *o, AttachPoint *v);
struct LigCaretList {
u16int coverageOffset;
u16int ligGlyphCount;
u16int *ligGlyphOffsets;
};
int read_LigCaretList(Otf *o, LigCaretList *v);
void print_LigCaretList(Biobuf *f, int indent, Otf *o, LigCaretList *v);
struct LigGlyph {
u16int caretCount;
u16int *caretValueOffsets;
};
int read_LigGlyph(Otf *o, LigGlyph *v);
void print_LigGlyph(Biobuf *f, int indent, Otf *o, LigGlyph *v);
struct CaretValue {
u16int format;
s16int coordinate;
u16int caretValuePointIndex;
u16int deviceOffset;
};
int read_CaretValue(Otf *o, CaretValue *v);
void print_CaretValue(Biobuf *f, int indent, Otf *o, CaretValue *v);
struct ValueRecord {
s16int xPlacement;
s16int yPlacement;
s16int xAdvance;
s16int yAdvance;
u16int xPlaDeviceOffset;
u16int yPlaDeviceOffset;
u16int xAdvDeviceOffset;
u16int yAdvDeviceOffset;
};
int read_ValueRecord(Otf *o, ValueRecord *v);
void print_ValueRecord(Biobuf *f, int indent, Otf *o, ValueRecord *v);
struct SinglePos {
u16int format;
u16int coverageOffset;
u16int valueFormat;
ValueRecord valueRecord;
u16int valueCount;
ValueRecord *valueRecords;
};
int read_SinglePos(Otf *o, SinglePos *v);
void print_SinglePos(Biobuf *f, int indent, Otf *o, SinglePos *v);
struct TableGDEF {
// u16int majorVersion;
u16int minorVersion;
u16int glyphClassDefOffset;
u16int attachListOffset;
u16int ligCaretListOffset;
u16int markAttachClassDefOffset;
u16int markGlyphSetsDefOffset;
u32int itemVarStoreOffset;
};
int read_TableGDEF(Otf *o, TableGDEF *v);
void print_TableGDEF(Biobuf *f, int indent, Otf *o, TableGDEF *v);
struct LangSys {
// u16int lookupOrderOffset;
u16int requiredFeatureIndex;
u16int featureIndexCount;
u16int *featureIndices;
};
int read_LangSys(Otf *o, LangSys *v);
void print_LangSys(Biobuf *f, int indent, Otf *o, LangSys *v);
struct LangSysRecord {
u32int langSysTag;
u16int langSysOffset;
LangSys *langSys;
};
int read_LangSysRecord(Otf *o, LangSysRecord *v);
void print_LangSysRecord(Biobuf *f, int indent, Otf *o, LangSysRecord *v);
struct Script {
u16int defaultLangSysOffset;
u16int langSysCount;
LangSysRecord *langSysRecords;
LangSys *defaultLangSys;
};
int read_Script(Otf *o, Script *v);
void print_Script(Biobuf *f, int indent, Otf *o, Script *v);
struct ScriptRecord {
u32int scriptTag;
u16int scriptOffset;
Script *script;
};
int read_ScriptRecord(Otf *o, ScriptRecord *v);
void print_ScriptRecord(Biobuf *f, int indent, Otf *o, ScriptRecord *v);
struct ScriptList {
u16int scriptCount;
ScriptRecord *scriptRecords;
};
int read_ScriptList(Otf *o, ScriptList *v);
void print_ScriptList(Biobuf *f, int indent, Otf *o, ScriptList *v);
struct Feature {
u16int featureParamsOffset;
u16int lookupIndexCount;
u16int *lookupListIndices;
};
int read_Feature(Otf *o, Feature *v);
void print_Feature(Biobuf *f, int indent, Otf *o, Feature *v);
struct FeatureRecord {
u32int featureTag;
u16int featureOffset;
Feature *feature;
};
int read_FeatureRecord(Otf *o, FeatureRecord *v);
void print_FeatureRecord(Biobuf *f, int indent, Otf *o, FeatureRecord *v);
struct FeatureList {
u16int featureCount;
FeatureRecord *featureRecords;
};
int read_FeatureList(Otf *o, FeatureList *v);
void print_FeatureList(Biobuf *f, int indent, Otf *o, FeatureList *v);
struct Lookup {
u16int lookupType;
u16int lookupFlag;
u16int subTableCount;
u16int *subtableOffsets;
u16int markFilteringSet;
};
int read_Lookup(Otf *o, Lookup *v);
void print_Lookup(Biobuf *f, int indent, Otf *o, Lookup *v);
struct LookupList {
u16int lookupCount;
u16int *lookupOffsets;
};
int read_LookupList(Otf *o, LookupList *v);
void print_LookupList(Biobuf *f, int indent, Otf *o, LookupList *v);
struct TableGPOS {
// u16int majorVersion;
u16int minorVersion;
u16int scriptListOffset;
u16int featureListOffset;
u16int lookupListOffset;
u32int featureVariationsOffset;
ScriptList *scriptList;
FeatureList *featureList;
LookupList *lookupList;
};
int read_TableGPOS(Otf *o, TableGPOS *v);
void print_TableGPOS(Biobuf *f, int indent, Otf *o, TableGPOS *v);
struct TableGSUB {
// u16int majorVersion;
u16int minorVersion;
u16int scriptListOffset;
u16int featureListOffset;
u16int lookupListOffset;
u32int featureVariationsOffset;
ScriptList *scriptList;
FeatureList *featureList;
};
int read_TableGSUB(Otf *o, TableGSUB *v);
void print_TableGSUB(Biobuf *f, int indent, Otf *o, TableGSUB *v);
struct MathValueRecord {
s16int value;
u16int deviceOffset;
};
int read_MathValueRecord(Otf *o, MathValueRecord *v);
void print_MathValueRecord(Biobuf *f, int indent, Otf *o, MathValueRecord *v);
struct MathConstants {
s16int scriptPercentScaleDown;
s16int scriptScriptPercentScaleDown;
u16int delimitedSubFormulaMinHeight;
u16int displayOperatorMinHeight;
MathValueRecord mathLeading;
MathValueRecord axisHeight;
MathValueRecord accentBaseHeight;
MathValueRecord flattenedAccentBaseHeight;
MathValueRecord subscriptShiftDown;
MathValueRecord subscriptTopMax;
MathValueRecord subscriptBaselineDropMin;
MathValueRecord superscriptShiftUp;
MathValueRecord superscriptShiftUpCramped;
MathValueRecord superscriptBottomMin;
MathValueRecord superscriptBaselineDropMax;
MathValueRecord subSuperscriptGapMin;
MathValueRecord superscriptBottomMaxWithSubscript;
MathValueRecord spaceAfterScript;
MathValueRecord upperLimitGapMin;
MathValueRecord upperLimitBaselineRiseMin;
MathValueRecord lowerLimitGapMin;
MathValueRecord lowerLimitBaselineDropMin;
MathValueRecord stackTopShiftUp;
MathValueRecord stackTopDisplayStyleShiftUp;
MathValueRecord stackBottomShiftDown;
MathValueRecord stackBottomDisplayStyleShiftDown;
MathValueRecord stackGapMin;
MathValueRecord stackDisplayStyleGapMin;
MathValueRecord stretchStackTopShiftUp;
MathValueRecord stretchStackBottomShiftDown;
MathValueRecord stretchStackGapAboveMin;
MathValueRecord stretchStackGapBelowMin;
MathValueRecord fractionNumeratorShiftUp;
MathValueRecord fractionNumeratorDisplayStyleShiftUp;
MathValueRecord fractionDenominatorShiftDown;
MathValueRecord fractionDenominatorDisplayStyleShiftDown;
MathValueRecord fractionNumeratorGapMin;
MathValueRecord fractionNumDisplayStyleGapMin;
MathValueRecord fractionRuleThickness;
MathValueRecord fractionDenominatorGapMin;
MathValueRecord fractionDenomDisplayStyleGapMin;
MathValueRecord skewedFractionHorizontalGap;
MathValueRecord skewedFractionVerticalGap;
MathValueRecord overbarVerticalGap;
MathValueRecord overbarRuleThickness;
MathValueRecord overbarExtraAscender;
MathValueRecord underbarVerticalGap;
MathValueRecord underbarRuleThickness;
MathValueRecord underbarExtraDescender;
MathValueRecord radicalVerticalGap;
MathValueRecord radicalDisplayStyleVerticalGap;
MathValueRecord radicalRuleThickness;
MathValueRecord radicalExtraAscender;
MathValueRecord radicalKernBeforeDegree;
MathValueRecord radicalKernAfterDegree;
s16int radicalDegreeBottomRaisePercent;
};
int read_MathConstants(Otf *o, MathConstants *v);
void print_MathConstants(Biobuf *f, int indent, Otf *o, MathConstants *v);
struct MathItalicsCorrectionInfo {
u16int italicsCorrectionCoverageOffset;
u16int italicsCorrectionCount;
MathValueRecord *italicsCorrection;
};
int read_MathItalicsCorrectionInfo(Otf *o, MathItalicsCorrectionInfo *v);
void print_MathItalicsCorrectionInfo(Biobuf *f, int indent, Otf *o, MathItalicsCorrectionInfo *v);
struct MathTopAccentAttachment {
u16int topAccentCoverageOffset;
u16int topAccentAttachmentCount;
MathValueRecord *topAccentAttachment;
};
int read_MathTopAccentAttachment(Otf *o, MathTopAccentAttachment *v);
void print_MathTopAccentAttachment(Biobuf *f, int indent, Otf *o, MathTopAccentAttachment *v);
struct MathKernInfoRecord {
u16int topRightMathKernOffset;
u16int topLeftMathKernOffset;
u16int bottomRightMathKernOffset;
u16int bottomLeftMathKernOffset;
};
int read_MathKernInfoRecord(Otf *o, MathKernInfoRecord *v);
void print_MathKernInfoRecord(Biobuf *f, int indent, Otf *o, MathKernInfoRecord *v);
struct MathKernInfo {
u16int mathKernCoverageOffset;
u16int mathKernCount;
MathKernInfoRecord *mathKernInfoRecords;
};
int read_MathKernInfo(Otf *o, MathKernInfo *v);
void print_MathKernInfo(Biobuf *f, int indent, Otf *o, MathKernInfo *v);
struct MathKern {
u16int heightCount;
MathValueRecord *correctionHeight;
MathValueRecord *kernValues;
};
int read_MathKern(Otf *o, MathKern *v);
void print_MathKern(Biobuf *f, int indent, Otf *o, MathKern *v);
struct Coverage1 {
u16int glyphCount;
u16int *glyphArray;
};
int read_Coverage1(Otf *o, Coverage1 *v);
void print_Coverage1(Biobuf *f, int indent, Otf *o, Coverage1 *v);
struct RangeRecord {
u16int startGlyphID;
u16int endGlyphID;
u16int startCoverageIndex;
};
int read_RangeRecord(Otf *o, RangeRecord *v);
void print_RangeRecord(Biobuf *f, int indent, Otf *o, RangeRecord *v);
struct Coverage2 {
u16int rangeCount;
RangeRecord *rangeRecords;
};
int read_Coverage2(Otf *o, Coverage2 *v);
void print_Coverage2(Biobuf *f, int indent, Otf *o, Coverage2 *v);
struct Coverage {
u16int format;
Coverage1 cov1;
Coverage2 cov2;
};
int read_Coverage(Otf *o, Coverage *v);
void print_Coverage(Biobuf *f, int indent, Otf *o, Coverage *v);
struct MathVariants {
u16int minConnectorOverlap;
u16int vertGlyphCoverageOffset;
u16int horizGlyphCoverageOffset;
u16int vertGlyphCount;
u16int horizGlyphCount;
u16int *vertGlyphConstructionOffsets;
u16int *horizGlyphConstructionOffsets;
Coverage *vertGlyphCoverage;
Coverage *horizGlyphCoverage;
};
int read_MathVariants(Otf *o, MathVariants *v);
void print_MathVariants(Biobuf *f, int indent, Otf *o, MathVariants *v);
struct MathGlyphInfo {
u16int mathItalicsCorrectionInfoOffset;
u16int mathTopAccentAttachmentOffset;
u16int extendedShapeCoverageOffset;
u16int mathKernInfoOffset;
MathItalicsCorrectionInfo *mathItalicsCorrectionInfo;
MathTopAccentAttachment *mathTopAccentAttachment;
MathKernInfo *mathKernInfo;
Coverage *extendedShapeCoverage;
};
int read_MathGlyphInfo(Otf *o, MathGlyphInfo *v);
void print_MathGlyphInfo(Biobuf *f, int indent, Otf *o, MathGlyphInfo *v);
struct MathGlyphVariantRecord {
u16int variantGlyph;
u16int advanceMeasurement;
};
int read_MathGlyphVariantRecord(Otf *o, MathGlyphVariantRecord *v);
void print_MathGlyphVariantRecord(Biobuf *f, int indent, Otf *o, MathGlyphVariantRecord *v);
struct GlyphPart {
u16int glyphID;
u16int startConnectorLength;
u16int endConnectorLength;
u16int fullAdvance;
u16int partFlags;
};
int read_GlyphPart(Otf *o, GlyphPart *v);
void print_GlyphPart(Biobuf *f, int indent, Otf *o, GlyphPart *v);
struct GlyphAssembly {
MathValueRecord italicsCorrection;
u16int partCount;
GlyphPart *partRecords;
};
int read_GlyphAssembly(Otf *o, GlyphAssembly *v);
void print_GlyphAssembly(Biobuf *f, int indent, Otf *o, GlyphAssembly *v);
struct MathGlyphConstruction {
u16int glyphAssemblyOffset;
u16int variantCount;
MathGlyphVariantRecord *mathGlyphVariantRecords;
GlyphAssembly *glyphAssembly;
};
int read_MathGlyphConstruction(Otf *o, MathGlyphConstruction *v);
void print_MathGlyphConstruction(Biobuf *f, int indent, Otf *o, MathGlyphConstruction *v);
struct TableMATH {
// u16int majorVersion;
// u16int minorVersion;
u16int mathConstantsOffset;
u16int mathGlyphInfoOffset;
u16int mathVariantsOffset;
MathConstants *mathConstants;
MathGlyphInfo *mathGlyphInfo;
MathVariants *mathVariants;
};
int read_TableMATH(Otf *o, TableMATH *v);
void print_TableMATH(Biobuf *f, int indent, Otf *o, TableMATH *v);
struct KernPair {
u16int left;
u16int right;
s16int value;
};
int read_KernPair(Otf *o, KernPair *v);
void print_KernPair(Biobuf *f, int indent, Otf *o, KernPair *v);
struct KernSubtable0 {
u16int nPairs;
u16int searchRange;
u16int entrySelector;
u16int rangeShift;
KernPair *kernPairs;
};
int read_KernSubtable0(Otf *o, KernSubtable0 *v);
void print_KernSubtable0(Biobuf *f, int indent, Otf *o, KernSubtable0 *v);
struct KernClass {
u16int firstGlyph;
u16int nGlyphs;
u16int *values;
};
int read_KernClass(Otf *o, KernClass *v);
void print_KernClass(Biobuf *f, int indent, Otf *o, KernClass *v);
struct KernSubtable2 {
u16int rowWidth;
u16int leftClassOffset;
u16int rightClassOffset;
u16int kerningArrayOffset;
KernClass *leftClass;
KernClass *rightClass;
s16int *kerningArray;
};
int read_KernSubtable2(Otf *o, KernSubtable2 *v);
void print_KernSubtable2(Biobuf *f, int indent, Otf *o, KernSubtable2 *v);
struct KernSubtable {
// u16int version;
u16int length;
u16int coverage;
};
int read_KernSubtable(Otf *o, KernSubtable *v);
void print_KernSubtable(Biobuf *f, int indent, Otf *o, KernSubtable *v);
struct TableKern {
// u16int version;
u16int nTables;
KernSubtable *subtables;
};
int read_TableKern(Otf *o, TableKern *v);
void print_TableKern(Biobuf *f, int indent, Otf *o, TableKern *v);
struct TableLoca {
u16int *shortOffsets;
u32int *longOffsets;
};
int read_TableLoca(Otf *o, TableLoca *v);
void print_TableLoca(Biobuf *f, int indent, Otf *o, TableLoca *v);
struct TableOS∕2 {
u16int version;
s16int xAvgCharWidth;
u16int usWeightClass;
u16int usWidthClass;
u16int fsType;
s16int ySubscriptXSize;
s16int ySubscriptYSize;
s16int ySubscriptXOffset;
s16int ySubscriptYOffset;
s16int ySuperscriptXSize;
s16int ySuperscriptYSize;
s16int ySuperscriptXOffset;
s16int ySuperscriptYOffset;
s16int yStrikeoutSize;
s16int yStrikeoutPosition;
s16int sFamilyClass;
u8int panose[10];
u32int ulUnicodeRange1;
u32int ulUnicodeRange2;
u32int ulUnicodeRange3;
u32int ulUnicodeRange4;
u32int achVendID;
u16int fsSelection;
u16int usFirstCharIndex;
u16int usLastCharIndex;
s16int sTypoAscender;
s16int sTypoDescender;
s16int sTypoLineGap;
u16int usWinAscent;
u16int usWinDescent;
u32int ulCodePageRange1;
u32int ulCodePageRange2;
s16int sxHeight;
s16int sCapHeight;
u16int usDefaultChar;
u16int usBreakChar;
u16int usMaxContext;
u16int usLowerOpticalPointSize;
u16int usUpperOpticalPointSize;
};
int read_TableOS∕2(Otf *o, TableOS∕2 *v);
void print_TableOS∕2(Biobuf *f, int indent, Otf *o, TableOS∕2 *v);
struct TableRecord {
u32int tableTag;
// u32int checksum;
u32int offset;
u32int length;
void *parsed;
void (*print)(Biobuf *f, int indent, Otf *o, void *parsed);
};
int read_TableRecord(Otf *o, TableRecord *v);
void print_TableRecord(Biobuf *f, int indent, Otf *o, TableRecord *v);
struct TableDirectory {
u32int sfntVersion;
u16int numTables;
u16int searchRange;
u16int entrySelector;
u16int rangeShift;
TableRecord *tableRecords;
TableCmap *cmap;
TableHead *head;
TableHhea *hhea;
TableMaxp *maxp;
TableHmtx *hmtx;
TablePost *post;
TableName *name;
TableEBDT *ebdt;
TableEBLC *eblc;
TableGDEF *gdef;
TableGPOS *gpos;
TableGSUB *gsub;
TableMATH *math;
TableKern *kern;
TableLoca *loca;
TableOS∕2 *os∕2;
};
int read_TableDirectory(Otf *o, TableDirectory *v);
void print_TableDirectory(Biobuf *f, int indent, Otf *o, TableDirectory *v);
extern int indentΔ;
#pragma varargck type "T" s64int
#pragma varargck type "t" u32int
#pragma varargck type "V" u32int
void otfinit(void);
Otf *otfopen(char *path);
void otfclose(Otf *o);