gloc.h (824B)
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 5 #ifndef OTS_GLOC_H_ 6 #define OTS_GLOC_H_ 7 8 #include <vector> 9 10 #include "ots.h" 11 #include "graphite.h" 12 13 namespace ots { 14 15 class OpenTypeGLOC : public Table { 16 public: 17 explicit OpenTypeGLOC(Font* font, uint32_t tag) 18 : Table(font, tag, tag) { } 19 20 bool Parse(const uint8_t* data, size_t length); 21 bool Serialize(OTSStream* out); 22 const std::vector<uint32_t>& GetLocations(); 23 24 private: 25 uint32_t version; 26 uint16_t flags; 27 static const uint16_t LONG_FORMAT = 0b1; 28 static const uint16_t ATTRIB_IDS = 0b10; 29 uint16_t numAttribs; 30 std::vector<uint32_t> locations; 31 std::vector<uint16_t> attribIds; 32 }; 33 34 } // namespace ots 35 36 #endif // OTS_GLOC_H_