1 2 #ifndef SkSfntUtils_DEFINED 3 #define SkSfntUtils_DEFINED 4 5 #include "SkFontHost.h" 6 7 struct SkSfntTable_head { 8 SkFixed fVersion; 9 SkFixed fRevision; 10 uint32_t fCheckSumAdjustment; 11 uint32_t fMagicNumber; 12 uint16_t fFlags; 13 uint16_t fUnitsPerEm; 14 Sk64 fDateCreated; 15 Sk64 fDateModified; 16 int16_t fXMin; 17 int16_t fYMin; 18 int16_t fXMax; 19 int16_t fYMax; 20 uint16_t fMacStyle; 21 uint16_t fLowestPPEM; 22 int16_t fFontDirectionHint; 23 int16_t fIndexToLocFormat; 24 int16_t fGlyphDataFormat; 25 }; 26 27 struct SkSfntTable_maxp { 28 SkFixed fVersion; 29 uint16_t fNumGlyphs; 30 uint16_t fMaxPoints; 31 uint16_t fMaxContours; 32 uint16_t fMaxComponentPoints; 33 uint16_t fMaxComponentContours; 34 uint16_t fMaxZones; 35 uint16_t fMaxTwilightPoints; 36 uint16_t fMaxStorage; 37 uint16_t fMaxFunctionDefs; 38 uint16_t fMaxInstructionDefs; 39 uint16_t fMaxStackElements; 40 uint16_t fMaxSizeOfInstructions; 41 uint16_t fMaxComponentElements; 42 uint16_t fMaxComponentDepth; 43 }; 44 45 class SkSfntUtils { 46 public: 47 static bool ReadTable_head(SkFontID, SkSfntTable_head*); 48 static bool ReadTable_maxp(SkFontID, SkSfntTable_maxp*); 49 }; 50 51 #endif 52 53