1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/src/sfnt/SkOTTable_hhea.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,56 @@ 1.4 +/* 1.5 + * Copyright 2012 Google Inc. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license that can be 1.8 + * found in the LICENSE file. 1.9 + */ 1.10 + 1.11 +#ifndef SkOTTable_hhea_DEFINED 1.12 +#define SkOTTable_hhea_DEFINED 1.13 + 1.14 +#include "SkEndian.h" 1.15 +#include "SkOTTableTypes.h" 1.16 +#include "SkTypedEnum.h" 1.17 + 1.18 +#pragma pack(push, 1) 1.19 + 1.20 +struct SkOTTableHorizontalHeader { 1.21 + static const SK_OT_CHAR TAG0 = 'h'; 1.22 + static const SK_OT_CHAR TAG1 = 'h'; 1.23 + static const SK_OT_CHAR TAG2 = 'e'; 1.24 + static const SK_OT_CHAR TAG3 = 'a'; 1.25 + static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTableHorizontalHeader>::value; 1.26 + 1.27 + SK_OT_Fixed version; 1.28 + static const SK_OT_Fixed version1 = SkTEndian_SwapBE32(0x00010000); 1.29 + SK_OT_FWORD Ascender; 1.30 + SK_OT_FWORD Descender; 1.31 + SK_OT_FWORD LineGap; 1.32 + SK_OT_UFWORD advanceWidthMax; 1.33 + SK_OT_FWORD minLeftSideBearing; 1.34 + SK_OT_FWORD minRightSideBearing; 1.35 + SK_OT_FWORD xMaxExtent; 1.36 + SK_OT_SHORT caretSlopeRise; 1.37 + SK_OT_SHORT caretSlopeRun; 1.38 + SK_OT_SHORT caretOffset; 1.39 + SK_OT_SHORT Reserved24; 1.40 + SK_OT_SHORT Reserved26; 1.41 + SK_OT_SHORT Reserved28; 1.42 + SK_OT_SHORT Reserved30; 1.43 + struct MetricDataFormat { 1.44 + SK_TYPED_ENUM(Value, SK_OT_SHORT, 1.45 + ((CurrentFormat, SkTEndian_SwapBE16(0))) 1.46 + SK_SEQ_END, 1.47 + (value)SK_SEQ_END) 1.48 + } metricDataFormat; 1.49 + SK_OT_USHORT numberOfHMetrics; 1.50 +}; 1.51 + 1.52 +#pragma pack(pop) 1.53 + 1.54 + 1.55 +#include <stddef.h> 1.56 +SK_COMPILE_ASSERT(offsetof(SkOTTableHorizontalHeader, numberOfHMetrics) == 34, SkOTTableHorizontalHeader_numberOfHMetrics_not_at_34); 1.57 +SK_COMPILE_ASSERT(sizeof(SkOTTableHorizontalHeader) == 36, sizeof_SkOTTableHorizontalHeader_not_36); 1.58 + 1.59 +#endif