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

Side by Side Diff: src/sfnt/SkOTTable_OS_2_V1.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_V0.h ('k') | src/sfnt/SkOTTable_OS_2_V2.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_V1_DEFINED 8 #ifndef SkOTTable_OS_2_V1_DEFINED
9 #define SkOTTable_OS_2_V1_DEFINED 9 #define SkOTTable_OS_2_V1_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 struct SkOTTableOS2_V1 { 18 struct SkOTTableOS2_V1 {
20 SK_OT_USHORT version; 19 SK_OT_USHORT version;
21 static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(1); 20 static const SK_OT_USHORT VERSION = SkTEndian_SwapBE16(1);
22 21
23 SK_OT_SHORT xAvgCharWidth; 22 SK_OT_SHORT xAvgCharWidth;
24 struct WeightClass { 23 struct WeightClass {
25 SK_TYPED_ENUM(Value, SK_OT_USHORT, 24 enum Value : SK_OT_USHORT {
26 ((Thin, SkTEndian_SwapBE16(100))) 25 Thin = SkTEndian_SwapBE16(100),
27 ((ExtraLight, SkTEndian_SwapBE16(200))) 26 ExtraLight = SkTEndian_SwapBE16(200),
28 ((Light, SkTEndian_SwapBE16(300))) 27 Light = SkTEndian_SwapBE16(300),
29 ((Normal, SkTEndian_SwapBE16(400))) 28 Normal = SkTEndian_SwapBE16(400),
30 ((Medium, SkTEndian_SwapBE16(500))) 29 Medium = SkTEndian_SwapBE16(500),
31 ((SemiBold, SkTEndian_SwapBE16(600))) 30 SemiBold = SkTEndian_SwapBE16(600),
32 ((Bold, SkTEndian_SwapBE16(700))) 31 Bold = SkTEndian_SwapBE16(700),
33 ((ExtraBold, SkTEndian_SwapBE16(800))) 32 ExtraBold = SkTEndian_SwapBE16(800),
34 ((Black, SkTEndian_SwapBE16(900))) 33 Black = SkTEndian_SwapBE16(900),
35 SK_SEQ_END, 34 };
36 SK_SEQ_END)
37 SK_OT_USHORT value; 35 SK_OT_USHORT value;
38 } usWeightClass; 36 } usWeightClass;
39 struct WidthClass { 37 struct WidthClass {
40 SK_TYPED_ENUM(Value, SK_OT_USHORT, 38 enum Value : SK_OT_USHORT {
41 ((UltraCondensed, SkTEndian_SwapBE16(1))) 39 UltraCondensed = SkTEndian_SwapBE16(1),
42 ((ExtraCondensed, SkTEndian_SwapBE16(2))) 40 ExtraCondensed = SkTEndian_SwapBE16(2),
43 ((Condensed, SkTEndian_SwapBE16(3))) 41 Condensed = SkTEndian_SwapBE16(3),
44 ((SemiCondensed, SkTEndian_SwapBE16(4))) 42 SemiCondensed = SkTEndian_SwapBE16(4),
45 ((Medium, SkTEndian_SwapBE16(5))) 43 Medium = SkTEndian_SwapBE16(5),
46 ((SemiExpanded, SkTEndian_SwapBE16(6))) 44 SemiExpanded = SkTEndian_SwapBE16(6),
47 ((Expanded, SkTEndian_SwapBE16(7))) 45 Expanded = SkTEndian_SwapBE16(7),
48 ((ExtraExpanded, SkTEndian_SwapBE16(8))) 46 ExtraExpanded = SkTEndian_SwapBE16(8),
49 ((UltraExpanded, SkTEndian_SwapBE16(9))) 47 UltraExpanded = SkTEndian_SwapBE16(9),
50 SK_SEQ_END, 48 } value;
51 (value)SK_SEQ_END)
52 } usWidthClass; 49 } usWidthClass;
53 union Type { 50 union Type {
54 struct Field { 51 struct Field {
55 //8-15 52 //8-15
56 SK_OT_BYTE_BITFIELD( 53 SK_OT_BYTE_BITFIELD(
57 Reserved08, 54 Reserved08,
58 Reserved09, 55 Reserved09,
59 Reserved10, 56 Reserved10,
60 Reserved11, 57 Reserved11,
61 Reserved12, 58 Reserved12,
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 } raw; 506 } raw;
510 } ulCodePageRange; 507 } ulCodePageRange;
511 }; 508 };
512 509
513 #pragma pack(pop) 510 #pragma pack(pop)
514 511
515 512
516 static_assert(sizeof(SkOTTableOS2_V1) == 86, "sizeof_SkOTTableOS2_V1_not_86"); 513 static_assert(sizeof(SkOTTableOS2_V1) == 86, "sizeof_SkOTTableOS2_V1_not_86");
517 514
518 #endif 515 #endif
OLDNEW
« no previous file with comments | « src/sfnt/SkOTTable_OS_2_V0.h ('k') | src/sfnt/SkOTTable_OS_2_V2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698