From 9e3c08db40b8916968b9f30096c7be3f00ce9647 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:44:51 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- gfx/ots/src/hdmx.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 gfx/ots/src/hdmx.h (limited to 'gfx/ots/src/hdmx.h') diff --git a/gfx/ots/src/hdmx.h b/gfx/ots/src/hdmx.h new file mode 100644 index 0000000000..5d323dd7e7 --- /dev/null +++ b/gfx/ots/src/hdmx.h @@ -0,0 +1,38 @@ +// Copyright (c) 2009-2017 The OTS Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef OTS_HDMX_H_ +#define OTS_HDMX_H_ + +#include + +#include "ots.h" + +namespace ots { + +struct OpenTypeHDMXDeviceRecord { + uint8_t pixel_size; + uint8_t max_width; + std::vector widths; +}; + +class OpenTypeHDMX : public Table { + public: + explicit OpenTypeHDMX(Font *font, uint32_t tag) + : Table(font, tag, tag) { } + + bool Parse(const uint8_t *data, size_t length); + bool Serialize(OTSStream *out); + bool ShouldSerialize(); + + private: + uint16_t version; + int32_t size_device_record; + int32_t pad_len; + std::vector records; +}; + +} // namespace ots + +#endif -- cgit v1.2.3