#include "gpos.h"
#include <limits>
#include <vector>
#include "layout.h"
#include "maxp.h"
#define TABLE_NAME …
namespace {
enum GPOS_TYPE { … };
const unsigned kGposHeaderSize_1_0 = …;
const unsigned kGposHeaderSize_1_1 = …;
const uint16_t kMaxAnchorFormat = …;
bool ParseSingleAdjustment(const ots::Font *font,
const uint8_t *data, const size_t length);
bool ParsePairAdjustment(const ots::Font *font,
const uint8_t *data, const size_t length);
bool ParseCursiveAttachment(const ots::Font *font,
const uint8_t *data, const size_t length);
bool ParseMarkToBaseAttachment(const ots::Font *font,
const uint8_t *data, const size_t length);
bool ParseMarkToLigatureAttachment(const ots::Font *font,
const uint8_t *data, const size_t length);
bool ParseMarkToMarkAttachment(const ots::Font *font,
const uint8_t *data, const size_t length);
bool ParseContextPositioning(const ots::Font *font,
const uint8_t *data, const size_t length);
bool ParseChainedContextPositioning(const ots::Font *font,
const uint8_t *data, const size_t length);
bool ParseExtensionPositioning(const ots::Font *font,
const uint8_t *data, const size_t length);
const ots::LookupSubtableParser::TypeParser kGposTypeParsers[] = …;
const ots::LookupSubtableParser kGposLookupSubtableParser = …;
size_t CalcValueRecordSize(const uint16_t value_format) { … }
bool ParseValueRecord(const ots::Font *font,
ots::Buffer* subtable,
const uint16_t value_format) { … }
bool ParseAnchorTable(const ots::Font *font,
const uint8_t *data, const size_t length) { … }
bool ParseMarkArrayTable(const ots::Font *font,
const uint8_t *data, const size_t length) { … }
bool ParseSingleAdjustment(const ots::Font *font, const uint8_t *data,
const size_t length) { … }
bool ParsePairSetTable(const ots::Font *font,
const uint8_t *data, const size_t length,
const uint16_t value_format1,
const uint16_t value_format2,
const uint16_t num_glyphs) { … }
bool ParsePairPosFormat1(const ots::Font *font,
const uint8_t *data, const size_t length,
const uint16_t value_format1,
const uint16_t value_format2,
const uint16_t num_glyphs) { … }
bool ParsePairPosFormat2(const ots::Font *font,
const uint8_t *data, const size_t length,
const uint16_t value_format1,
const uint16_t value_format2,
const uint16_t num_glyphs) { … }
bool ParsePairAdjustment(const ots::Font *font, const uint8_t *data,
const size_t length) { … }
bool ParseCursiveAttachment(const ots::Font *font, const uint8_t *data,
const size_t length) { … }
bool ParseAnchorArrayTable(const ots::Font *font,
const uint8_t *data, const size_t length,
const uint16_t class_count) { … }
bool ParseLigatureArrayTable(const ots::Font *font,
const uint8_t *data, const size_t length,
const uint16_t class_count) { … }
bool ParseMarkToAttachmentSubtables(const ots::Font *font,
const uint8_t *data, const size_t length,
const GPOS_TYPE type) { … }
bool ParseMarkToBaseAttachment(const ots::Font *font,
const uint8_t *data, const size_t length) { … }
bool ParseMarkToLigatureAttachment(const ots::Font *font,
const uint8_t *data, const size_t length) { … }
bool ParseMarkToMarkAttachment(const ots::Font *font,
const uint8_t *data, const size_t length) { … }
bool ParseContextPositioning(const ots::Font *font,
const uint8_t *data, const size_t length) { … }
bool ParseChainedContextPositioning(const ots::Font *font,
const uint8_t *data, const size_t length) { … }
bool ParseExtensionPositioning(const ots::Font *font,
const uint8_t *data, const size_t length) { … }
}
namespace ots {
bool OpenTypeGPOS::Parse(const uint8_t *data, size_t length) { … }
bool OpenTypeGPOS::Serialize(OTSStream *out) { … }
}
#undef TABLE_NAME