64a0ec3655
Review URL: https://codereview.appspot.com/6299072 git-svn-id: http://skia.googlecode.com/svn/trunk@4236 2bbb7eff-a529-9590-31e7-b0007b416f81
61 lines
1.4 KiB
C++
61 lines
1.4 KiB
C++
|
|
/*
|
|
* Copyright 2011 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef SkSfntUtils_DEFINED
|
|
#define SkSfntUtils_DEFINED
|
|
|
|
#include "Sk64.h"
|
|
#include "SkFontHost.h"
|
|
|
|
struct SkSfntTable_head {
|
|
SkFixed fVersion;
|
|
SkFixed fRevision;
|
|
uint32_t fCheckSumAdjustment;
|
|
uint32_t fMagicNumber;
|
|
uint16_t fFlags;
|
|
uint16_t fUnitsPerEm;
|
|
Sk64 fDateCreated;
|
|
Sk64 fDateModified;
|
|
int16_t fXMin;
|
|
int16_t fYMin;
|
|
int16_t fXMax;
|
|
int16_t fYMax;
|
|
uint16_t fMacStyle;
|
|
uint16_t fLowestPPEM;
|
|
int16_t fFontDirectionHint;
|
|
int16_t fIndexToLocFormat;
|
|
int16_t fGlyphDataFormat;
|
|
};
|
|
|
|
struct SkSfntTable_maxp {
|
|
SkFixed fVersion;
|
|
uint16_t fNumGlyphs;
|
|
uint16_t fMaxPoints;
|
|
uint16_t fMaxContours;
|
|
uint16_t fMaxComponentPoints;
|
|
uint16_t fMaxComponentContours;
|
|
uint16_t fMaxZones;
|
|
uint16_t fMaxTwilightPoints;
|
|
uint16_t fMaxStorage;
|
|
uint16_t fMaxFunctionDefs;
|
|
uint16_t fMaxInstructionDefs;
|
|
uint16_t fMaxStackElements;
|
|
uint16_t fMaxSizeOfInstructions;
|
|
uint16_t fMaxComponentElements;
|
|
uint16_t fMaxComponentDepth;
|
|
};
|
|
|
|
class SkSfntUtils {
|
|
public:
|
|
static bool ReadTable_head(SkFontID, SkSfntTable_head*);
|
|
static bool ReadTable_maxp(SkFontID, SkSfntTable_maxp*);
|
|
};
|
|
|
|
#endif
|
|
|