Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Side by Side Diff: src/sfnt/SkOTTable_OS_2_VA.h

Issue 2254513002: Remove SkPreprocessorSeq.h and SkTypedEnum.h. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/sfnt/SkOTTable_OS_2_V4.h ('k') | src/sfnt/SkOTTable_gasp.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkOTTable_OS_2_VA_DEFINED 8 #ifndef SkOTTable_OS_2_VA_DEFINED
9 #define SkOTTable_OS_2_VA_DEFINED 9 #define SkOTTable_OS_2_VA_DEFINED
10 10
11 #include "SkEndian.h" 11 #include "SkEndian.h"
12 #include "SkIBMFamilyClass.h" 12 #include "SkIBMFamilyClass.h"
13 #include "SkOTTableTypes.h" 13 #include "SkOTTableTypes.h"
14 #include "SkPanose.h" 14 #include "SkPanose.h"
15 #include "SkTypedEnum.h"
16 15
17 #pragma pack(push, 1) 16 #pragma pack(push, 1)
18 17
19 //Original V0 TT 18 //Original V0 TT
20 struct SkOTTableOS2_VA { 19 struct SkOTTableOS2_VA {
21 SK_OT_USHORT version; 20 SK_OT_USHORT version;
22 //SkOTTableOS2_VA::VERSION and SkOTTableOS2_V0::VERSION are both 0. 21 //SkOTTableOS2_VA::VERSION and SkOTTableOS2_V0::VERSION are both 0.
23 //The only way to differentiate these two versions is by the size of the tab le. 22 //The only way to differentiate these two versions is by the size of the tab le.
24 static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(0); 23 static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(0);
25 24
26 SK_OT_SHORT xAvgCharWidth; 25 SK_OT_SHORT xAvgCharWidth;
27 struct WeightClass { 26 struct WeightClass {
28 SK_TYPED_ENUM(Value, SK_OT_USHORT, 27 enum Value : SK_OT_USHORT {
29 ((UltraLight, SkTEndian_SwapBE16(1))) 28 UltraLight = SkTEndian_SwapBE16(1),
30 ((ExtraLight, SkTEndian_SwapBE16(2))) 29 ExtraLight = SkTEndian_SwapBE16(2),
31 ((Light, SkTEndian_SwapBE16(3))) 30 Light = SkTEndian_SwapBE16(3),
32 ((SemiLight, SkTEndian_SwapBE16(4))) 31 SemiLight = SkTEndian_SwapBE16(4),
33 ((Medium, SkTEndian_SwapBE16(5))) 32 Medium = SkTEndian_SwapBE16(5),
34 ((SemiBold, SkTEndian_SwapBE16(6))) 33 SemiBold = SkTEndian_SwapBE16(6),
35 ((Bold, SkTEndian_SwapBE16(7))) 34 Bold = SkTEndian_SwapBE16(7),
36 ((ExtraBold, SkTEndian_SwapBE16(8))) 35 ExtraBold = SkTEndian_SwapBE16(8),
37 ((UltraBold, SkTEndian_SwapBE16(9))) 36 UltraBold = SkTEndian_SwapBE16(9),
38 SK_SEQ_END, 37 SK_SEQ_END,
39 (value)SK_SEQ_END) 38 } value;
40 } usWeightClass; 39 } usWeightClass;
41 struct WidthClass { 40 struct WidthClass {
42 SK_TYPED_ENUM(Value, SK_OT_USHORT, 41 enum Value : SK_OT_USHORT {
43 ((UltraCondensed, SkTEndian_SwapBE16(1))) 42 UltraCondensed = SkTEndian_SwapBE16(1),
44 ((ExtraCondensed, SkTEndian_SwapBE16(2))) 43 ExtraCondensed = SkTEndian_SwapBE16(2),
45 ((Condensed, SkTEndian_SwapBE16(3))) 44 Condensed = SkTEndian_SwapBE16(3),
46 ((SemiCondensed, SkTEndian_SwapBE16(4))) 45 SemiCondensed = SkTEndian_SwapBE16(4),
47 ((Medium, SkTEndian_SwapBE16(5))) 46 Medium = SkTEndian_SwapBE16(5),
48 ((SemiExpanded, SkTEndian_SwapBE16(6))) 47 SemiExpanded = SkTEndian_SwapBE16(6),
49 ((Expanded, SkTEndian_SwapBE16(7))) 48 Expanded = SkTEndian_SwapBE16(7),
50 ((ExtraExpanded, SkTEndian_SwapBE16(8))) 49 ExtraExpanded = SkTEndian_SwapBE16(8),
51 ((UltraExpanded, SkTEndian_SwapBE16(9))) 50 UltraExpanded = SkTEndian_SwapBE16(9),
52 SK_SEQ_END, 51 SK_SEQ_END,
53 (value)SK_SEQ_END) 52 } value;
54 } usWidthClass; 53 } usWidthClass;
55 union Type { 54 union Type {
56 struct Field { 55 struct Field {
57 //8-15 56 //8-15
58 SK_OT_BYTE_BITFIELD( 57 SK_OT_BYTE_BITFIELD(
59 Reserved08, 58 Reserved08,
60 Reserved09, 59 Reserved09,
61 Reserved10, 60 Reserved10,
62 Reserved11, 61 Reserved11,
63 Reserved12, 62 Reserved12,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 SK_OT_USHORT usFirstCharIndex; 132 SK_OT_USHORT usFirstCharIndex;
134 SK_OT_USHORT usLastCharIndex; 133 SK_OT_USHORT usLastCharIndex;
135 }; 134 };
136 135
137 #pragma pack(pop) 136 #pragma pack(pop)
138 137
139 138
140 static_assert(sizeof(SkOTTableOS2_VA) == 68, "sizeof_SkOTTableOS2_VA_not_68"); 139 static_assert(sizeof(SkOTTableOS2_VA) == 68, "sizeof_SkOTTableOS2_VA_not_68");
141 140
142 #endif 141 #endif
OLDNEW
« no previous file with comments | « src/sfnt/SkOTTable_OS_2_V4.h ('k') | src/sfnt/SkOTTable_gasp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698