Bug 1785744 [wpt PR 35504] - Recalc style for elements where :toggle() pseudo-class...
[gecko.git] / gfx / ots / src / gasp.h
blobce9e987aad8271488de7e27b3149ef51aa23f384
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.
5 #ifndef OTS_GASP_H_
6 #define OTS_GASP_H_
8 #include <new>
9 #include <utility>
10 #include <vector>
12 #include "ots.h"
14 namespace ots {
16 class OpenTypeGASP : public Table {
17 public:
18 explicit OpenTypeGASP(Font *font, uint32_t tag)
19 : Table(font, tag, tag) { }
21 bool Parse(const uint8_t *data, size_t length);
22 bool Serialize(OTSStream *out);
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;
30 } // namespace ots
32 #endif // OTS_GASP_H_