post.h 771 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright (c) 2009-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_POST_H_
  5. #define OTS_POST_H_
  6. #include "ots.h"
  7. #include <map>
  8. #include <string>
  9. #include <vector>
  10. namespace ots {
  11. class OpenTypePOST : public Table {
  12. public:
  13. explicit OpenTypePOST(Font *font, uint32_t tag)
  14. : Table(font, tag, tag) { }
  15. bool Parse(const uint8_t *data, size_t length);
  16. bool Serialize(OTSStream *out);
  17. private:
  18. uint32_t version;
  19. uint32_t italic_angle;
  20. int16_t underline;
  21. int16_t underline_thickness;
  22. uint32_t is_fixed_pitch;
  23. std::vector<uint16_t> glyph_name_index;
  24. std::vector<std::string> names;
  25. };
  26. } // namespace ots
  27. #endif // OTS_POST_H_