gsub.h (1122B)
1 // Copyright (c) 2011-2017 The OTS Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef OTS_GSUB_H_ 6 #define OTS_GSUB_H_ 7 8 #include "ots.h" 9 #include "layout.h" 10 11 namespace ots { 12 13 class OpenTypeGSUB : public OpenTypeLayoutTable { 14 public: 15 explicit OpenTypeGSUB(Font *font, uint32_t tag) 16 : OpenTypeLayoutTable(font, tag, tag) { } 17 18 private: 19 bool ValidLookupSubtableType(uint16_t lookup_type, 20 bool extension = false) const; 21 bool ParseLookupSubtable(const uint8_t *data, const size_t length, 22 const uint16_t lookup_type); 23 24 bool ParseSingleSubstitution(const uint8_t *data, const size_t length); 25 bool ParseMutipleSubstitution(const uint8_t *data, const size_t length); 26 bool ParseAlternateSubstitution(const uint8_t *data, const size_t length); 27 bool ParseLigatureSubstitution(const uint8_t *data, const size_t length); 28 bool ParseReverseChainingContextSingleSubstitution(const uint8_t *data, const size_t length); 29 }; 30 31 } // namespace ots 32 33 #endif // OTS_GSUB_H_