gdef.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #ifndef OTS_GDEF_H_
  5. #define OTS_GDEF_H_
  6. #include "ots.h"
  7. namespace ots {
  8. class OpenTypeGDEF : public Table {
  9. public:
  10. explicit OpenTypeGDEF(Font *font, uint32_t tag)
  11. : Table(font, tag, tag),
  12. version_2(false),
  13. has_glyph_class_def(false),
  14. has_mark_attachment_class_def(false),
  15. has_mark_glyph_sets_def(false),
  16. num_mark_glyph_sets(0),
  17. m_data(NULL),
  18. m_length(0),
  19. m_num_glyphs(0) {
  20. }
  21. bool Parse(const uint8_t *data, size_t length);
  22. bool Serialize(OTSStream *out);
  23. bool version_2;
  24. bool has_glyph_class_def;
  25. bool has_mark_attachment_class_def;
  26. bool has_mark_glyph_sets_def;
  27. uint16_t num_mark_glyph_sets;
  28. private:
  29. bool ParseAttachListTable(const uint8_t *data, size_t length);
  30. bool ParseLigCaretListTable(const uint8_t *data, size_t length);
  31. bool ParseMarkGlyphSetsDefTable(const uint8_t *data, size_t length);
  32. const uint8_t *m_data;
  33. size_t m_length;
  34. uint16_t m_num_glyphs;
  35. };
  36. } // namespace ots
  37. #endif