Coverage Report

Created: 2025-07-18 06:54

/src/ots/src/vorg.h
Line
Count
Source
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_VORG_H_
6
#define OTS_VORG_H_
7
8
#include <vector>
9
10
#include "ots.h"
11
12
namespace ots {
13
14
struct OpenTypeVORGMetrics {
15
  uint16_t glyph_index;
16
  int16_t vert_origin_y;
17
};
18
19
class OpenTypeVORG : public Table {
20
 public:
21
  explicit OpenTypeVORG(Font *font, uint32_t tag)
22
879
      : Table(font, tag, tag) { }
23
24
  bool Parse(const uint8_t *data, size_t length);
25
  bool Serialize(OTSStream *out);
26
  bool ShouldSerialize();
27
28
 private:
29
  uint16_t major_version;
30
  uint16_t minor_version;
31
  int16_t default_vert_origin_y;
32
  std::vector<OpenTypeVORGMetrics> metrics;
33
};
34
35
}  // namespace ots
36
37
#endif  // OTS_VORG_H_