1cb93a386Sopenharmony_ci/* 2cb93a386Sopenharmony_ci * Copyright 2012 Google Inc. 3cb93a386Sopenharmony_ci * 4cb93a386Sopenharmony_ci * Use of this source code is governed by a BSD-style license that can be 5cb93a386Sopenharmony_ci * found in the LICENSE file. 6cb93a386Sopenharmony_ci */ 7cb93a386Sopenharmony_ci 8cb93a386Sopenharmony_ci#ifndef SkOTTable_hhea_DEFINED 9cb93a386Sopenharmony_ci#define SkOTTable_hhea_DEFINED 10cb93a386Sopenharmony_ci 11cb93a386Sopenharmony_ci#include "src/core/SkEndian.h" 12cb93a386Sopenharmony_ci#include "src/sfnt/SkOTTableTypes.h" 13cb93a386Sopenharmony_ci 14cb93a386Sopenharmony_ci#pragma pack(push, 1) 15cb93a386Sopenharmony_ci 16cb93a386Sopenharmony_cistruct SkOTTableHorizontalHeader { 17cb93a386Sopenharmony_ci static const SK_OT_CHAR TAG0 = 'h'; 18cb93a386Sopenharmony_ci static const SK_OT_CHAR TAG1 = 'h'; 19cb93a386Sopenharmony_ci static const SK_OT_CHAR TAG2 = 'e'; 20cb93a386Sopenharmony_ci static const SK_OT_CHAR TAG3 = 'a'; 21cb93a386Sopenharmony_ci static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTableHorizontalHeader>::value; 22cb93a386Sopenharmony_ci 23cb93a386Sopenharmony_ci SK_OT_Fixed version; 24cb93a386Sopenharmony_ci static const SK_OT_Fixed version1 = SkTEndian_SwapBE32(0x00010000); 25cb93a386Sopenharmony_ci SK_OT_FWORD Ascender; 26cb93a386Sopenharmony_ci SK_OT_FWORD Descender; 27cb93a386Sopenharmony_ci SK_OT_FWORD LineGap; 28cb93a386Sopenharmony_ci SK_OT_UFWORD advanceWidthMax; 29cb93a386Sopenharmony_ci SK_OT_FWORD minLeftSideBearing; 30cb93a386Sopenharmony_ci SK_OT_FWORD minRightSideBearing; 31cb93a386Sopenharmony_ci SK_OT_FWORD xMaxExtent; 32cb93a386Sopenharmony_ci SK_OT_SHORT caretSlopeRise; 33cb93a386Sopenharmony_ci SK_OT_SHORT caretSlopeRun; 34cb93a386Sopenharmony_ci SK_OT_SHORT caretOffset; 35cb93a386Sopenharmony_ci SK_OT_SHORT Reserved24; 36cb93a386Sopenharmony_ci SK_OT_SHORT Reserved26; 37cb93a386Sopenharmony_ci SK_OT_SHORT Reserved28; 38cb93a386Sopenharmony_ci SK_OT_SHORT Reserved30; 39cb93a386Sopenharmony_ci struct MetricDataFormat { 40cb93a386Sopenharmony_ci enum Value : SK_OT_SHORT { 41cb93a386Sopenharmony_ci CurrentFormat = SkTEndian_SwapBE16(0), 42cb93a386Sopenharmony_ci } value; 43cb93a386Sopenharmony_ci } metricDataFormat; 44cb93a386Sopenharmony_ci SK_OT_USHORT numberOfHMetrics; 45cb93a386Sopenharmony_ci}; 46cb93a386Sopenharmony_ci 47cb93a386Sopenharmony_ci#pragma pack(pop) 48cb93a386Sopenharmony_ci 49cb93a386Sopenharmony_ci 50cb93a386Sopenharmony_ci#include <stddef.h> 51cb93a386Sopenharmony_cistatic_assert(offsetof(SkOTTableHorizontalHeader, numberOfHMetrics) == 34, "SkOTTableHorizontalHeader_numberOfHMetrics_not_at_34"); 52cb93a386Sopenharmony_cistatic_assert(sizeof(SkOTTableHorizontalHeader) == 36, "sizeof_SkOTTableHorizontalHeader_not_36"); 53cb93a386Sopenharmony_ci 54cb93a386Sopenharmony_ci#endif 55