#include "gsub.h"
#include <limits>
#include <vector>
#include "layout.h"
#include "maxp.h"
#define TABLE_NAME …
namespace {
const size_t kGsubHeaderSize_1_0 = …;
const size_t kGsubHeaderSize_1_1 = …;
enum GSUB_TYPE { … };
bool ParseSingleSubstitution(const ots::Font *font,
const uint8_t *data, const size_t length);
bool ParseMutipleSubstitution(const ots::Font *font,
const uint8_t *data, const size_t length);
bool ParseAlternateSubstitution(const ots::Font *font,
const uint8_t *data, const size_t length);
bool ParseLigatureSubstitution(const ots::Font *font,
const uint8_t *data, const size_t length);
bool ParseContextSubstitution(const ots::Font *font,
const uint8_t *data, const size_t length);
bool ParseChainingContextSubstitution(const ots::Font *font,
const uint8_t *data,
const size_t length);
bool ParseExtensionSubstitution(const ots::Font *font,
const uint8_t *data, const size_t length);
bool ParseReverseChainingContextSingleSubstitution(
const ots::Font *font, const uint8_t *data, const size_t length);
const ots::LookupSubtableParser::TypeParser kGsubTypeParsers[] = …;
const ots::LookupSubtableParser kGsubLookupSubtableParser = …;
bool ParseSingleSubstitution(const ots::Font *font,
const uint8_t *data, const size_t length) { … }
bool ParseSequenceTable(const ots::Font *font,
const uint8_t *data, const size_t length,
const uint16_t num_glyphs) { … }
bool ParseMutipleSubstitution(const ots::Font *font,
const uint8_t *data, const size_t length) { … }
bool ParseAlternateSetTable(const ots::Font *font,
const uint8_t *data, const size_t length,
const uint16_t num_glyphs) { … }
bool ParseAlternateSubstitution(const ots::Font *font,
const uint8_t *data, const size_t length) { … }
bool ParseLigatureTable(const ots::Font *font,
const uint8_t *data, const size_t length,
const uint16_t num_glyphs) { … }
bool ParseLigatureSetTable(const ots::Font *font,
const uint8_t *data, const size_t length,
const uint16_t num_glyphs) { … }
bool ParseLigatureSubstitution(const ots::Font *font,
const uint8_t *data, const size_t length) { … }
bool ParseContextSubstitution(const ots::Font *font,
const uint8_t *data, const size_t length) { … }
bool ParseChainingContextSubstitution(const ots::Font *font,
const uint8_t *data,
const size_t length) { … }
bool ParseExtensionSubstitution(const ots::Font *font,
const uint8_t *data, const size_t length) { … }
bool ParseReverseChainingContextSingleSubstitution(
const ots::Font *font, const uint8_t *data, const size_t length) { … }
}
namespace ots {
bool OpenTypeGSUB::Parse(const uint8_t *data, size_t length) { … }
bool OpenTypeGSUB::Serialize(OTSStream *out) { … }
}
#undef TABLE_NAME