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.
10 // hhea - Horizontal Header
11 // http://www.microsoft.com/typography/otspec/hhea.htm
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
);