Bug 1785744 [wpt PR 35504] - Recalc style for elements where :toggle() pseudo-class...
[gecko.git] / gfx / ots / src / hhea.cc
blob55b2753bf99ef530aae572089977b4b96cf5ef7a
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 #include "hhea.h"
7 #include "head.h"
8 #include "maxp.h"
10 // hhea - Horizontal Header
11 // http://www.microsoft.com/typography/otspec/hhea.htm
13 namespace ots {
15 bool OpenTypeHHEA::Parse(const uint8_t *data, size_t length) {
16 Buffer table(data, length);
18 if (!table.ReadU32(&this->version)) {
19 return Error("Failed to read table version");
21 if (this->version >> 16 != 1) {
22 return Error("Unsupported majorVersion: %d", this->version >> 16);
25 return OpenTypeMetricsHeader::Parse(data, length);
28 } // namespace ots