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_GASP_H_ 6 #define OTS_GASP_H_ 7 8 #include <new> 9 #include <utility> 10 #include <vector> 11 12 #include "ots.h" 13 14 namespace ots { 15 16 class OpenTypeGASP : public Table { 17 public: OpenTypeGASP(Font * font,uint32_t tag)18 explicit OpenTypeGASP(Font *font, uint32_t tag) 19 : Table(font, tag, tag) { } 20 21 bool Parse(const uint8_t *data, size_t length); 22 bool Serialize(OTSStream *out); 23 24 private: 25 uint16_t version; 26 // A array of (max PPEM, GASP behavior) pairs. 27 std::vector<std::pair<uint16_t, uint16_t> > gasp_ranges; 28 }; 29 30 } // namespace ots 31 32 #endif // OTS_GASP_H_ 33