| OLD | NEW |
| 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 SkIBMFamilyClass_DEFINED | 8 #ifndef SkIBMFamilyClass_DEFINED |
| 9 #define SkIBMFamilyClass_DEFINED | 9 #define SkIBMFamilyClass_DEFINED |
| 10 | 10 |
| 11 #include "SkOTTableTypes.h" | 11 #include "SkOTTableTypes.h" |
| 12 #include "SkTypedEnum.h" | |
| 13 | 12 |
| 14 #pragma pack(push, 1) | 13 #pragma pack(push, 1) |
| 15 | 14 |
| 16 struct SkIBMFamilyClass { | 15 struct SkIBMFamilyClass { |
| 17 SK_TYPED_ENUM(Class, SK_OT_BYTE, | 16 enum Class : SK_OT_BYTE { |
| 18 ((NoClassification, 0)) | 17 NoClassification = 0, |
| 19 ((OldstyleSerifs, 1)) | 18 OldstyleSerifs = 1, |
| 20 ((TransitionalSerifs, 2)) | 19 TransitionalSerifs = 2, |
| 21 ((ModernSerifs, 3)) | 20 ModernSerifs = 3, |
| 22 ((ClarendonSerifs, 4)) | 21 ClarendonSerifs = 4, |
| 23 ((SlabSerifs, 5)) | 22 SlabSerifs = 5, |
| 24 //6 reserved for future use | 23 //6 reserved for future use |
| 25 ((FreeformSerifs, 7)) | 24 FreeformSerifs = 7, |
| 26 ((SansSerif, 8)) | 25 SansSerif = 8, |
| 27 ((Ornamentals, 9)) | 26 Ornamentals = 9, |
| 28 ((Scripts, 10)) | 27 Scripts = 10, |
| 29 //11 reserved for future use | 28 //11 reserved for future use |
| 30 ((Symbolic, 12)) | 29 Symbolic = 12, |
| 31 //13-15 reserved for future use | 30 //13-15 reserved for future use |
| 32 SK_SEQ_END, | 31 } familyClass; |
| 33 (familyClass)SK_SEQ_END) | |
| 34 union SubClass { | 32 union SubClass { |
| 35 struct OldstyleSerifs { | 33 struct OldstyleSerifs { |
| 36 SK_TYPED_ENUM(Value, SK_OT_BYTE, | 34 enum Value : SK_OT_BYTE { |
| 37 ((NoClassification, 0)) | 35 NoClassification = 0, |
| 38 ((IBMRoundedLegibility, 1)) | 36 IBMRoundedLegibility = 1, |
| 39 ((Garalde, 2)) | 37 Garalde = 2, |
| 40 ((Venetian, 3)) | 38 Venetian = 3, |
| 41 ((ModifiedVenetian, 4)) | 39 ModifiedVenetian = 4, |
| 42 ((DutchModern, 5)) | 40 DutchModern = 5, |
| 43 ((DutchTraditional, 6)) | 41 DutchTraditional = 6, |
| 44 ((Contemporary, 7)) | 42 Contemporary = 7, |
| 45 ((Calligraphic, 8)) | 43 Calligraphic = 8, |
| 46 //9-14 reserved for future use | 44 //9-14 reserved for future use |
| 47 ((Miscellaneous, 15)) | 45 Miscellaneous = 15, |
| 48 SK_SEQ_END, | 46 } value; |
| 49 (value)SK_SEQ_END) | |
| 50 } oldstyleSerifs; | 47 } oldstyleSerifs; |
| 51 struct TransitionalSerifs { | 48 struct TransitionalSerifs { |
| 52 SK_TYPED_ENUM(Value, SK_OT_BYTE, | 49 enum Value : SK_OT_BYTE { |
| 53 ((NoClassification, 0)) | 50 NoClassification = 0, |
| 54 ((DirectLine, 1)) | 51 DirectLine = 1, |
| 55 ((Script, 2)) | 52 Script = 2, |
| 56 //3-14 reserved for future use | 53 //3-14 reserved for future use |
| 57 ((Miscellaneous, 15)) | 54 Miscellaneous = 15, |
| 58 SK_SEQ_END, | 55 } value; |
| 59 (value)SK_SEQ_END) | |
| 60 } transitionalSerifs; | 56 } transitionalSerifs; |
| 61 struct ModernSerifs { | 57 struct ModernSerifs { |
| 62 SK_TYPED_ENUM(Value, SK_OT_BYTE, | 58 enum Value : SK_OT_BYTE { |
| 63 ((NoClassification, 0)) | 59 NoClassification = 0, |
| 64 ((Italian, 1)) | 60 Italian = 1, |
| 65 ((Script, 2)) | 61 Script = 2, |
| 66 //3-14 reserved for future use | 62 //3-14 reserved for future use |
| 67 ((Miscellaneous, 15)) | 63 Miscellaneous = 15, |
| 68 SK_SEQ_END, | 64 } value; |
| 69 (value)SK_SEQ_END) | |
| 70 } modernSerifs; | 65 } modernSerifs; |
| 71 struct ClarendonSerifs { | 66 struct ClarendonSerifs { |
| 72 SK_TYPED_ENUM(Value, SK_OT_BYTE, | 67 enum Value : SK_OT_BYTE { |
| 73 ((NoClassification, 0)) | 68 NoClassification = 0, |
| 74 ((Clarendon, 1)) | 69 Clarendon = 1, |
| 75 ((Modern, 2)) | 70 Modern = 2, |
| 76 ((Traditional, 3)) | 71 Traditional = 3, |
| 77 ((Newspaper, 4)) | 72 Newspaper = 4, |
| 78 ((StubSerif, 5)) | 73 StubSerif = 5, |
| 79 ((Monotone, 6)) | 74 Monotone = 6, |
| 80 ((Typewriter, 7)) | 75 Typewriter = 7, |
| 81 //8-14 reserved for future use | 76 //8-14 reserved for future use |
| 82 ((Miscellaneous, 15)) | 77 Miscellaneous = 15, |
| 83 SK_SEQ_END, | 78 } value; |
| 84 (value)SK_SEQ_END) | |
| 85 } clarendonSerifs; | 79 } clarendonSerifs; |
| 86 struct SlabSerifs { | 80 struct SlabSerifs { |
| 87 SK_TYPED_ENUM(Value, SK_OT_BYTE, | 81 enum Value : SK_OT_BYTE { |
| 88 ((NoClassification, 0)) | 82 NoClassification = 0, |
| 89 ((Monotone, 1)) | 83 Monotone = 1, |
| 90 ((Humanist, 2)) | 84 Humanist = 2, |
| 91 ((Geometric, 3)) | 85 Geometric = 3, |
| 92 ((Swiss, 4)) | 86 Swiss = 4, |
| 93 ((Typewriter, 5)) | 87 Typewriter = 5, |
| 94 //6-14 reserved for future use | 88 //6-14 reserved for future use |
| 95 ((Miscellaneous, 15)) | 89 Miscellaneous = 15, |
| 96 SK_SEQ_END, | 90 } value; |
| 97 (value)SK_SEQ_END) | |
| 98 } slabSerifs; | 91 } slabSerifs; |
| 99 struct FreeformSerifs { | 92 struct FreeformSerifs { |
| 100 SK_TYPED_ENUM(Value, SK_OT_BYTE, | 93 enum Value : SK_OT_BYTE { |
| 101 ((NoClassification, 0)) | 94 NoClassification = 0, |
| 102 ((Modern, 1)) | 95 Modern = 1, |
| 103 //2-14 reserved for future use | 96 //2-14 reserved for future use |
| 104 ((Miscellaneous, 15)) | 97 Miscellaneous = 15, |
| 105 SK_SEQ_END, | 98 } value; |
| 106 (value)SK_SEQ_END) | |
| 107 } freeformSerifs; | 99 } freeformSerifs; |
| 108 struct SansSerif { | 100 struct SansSerif { |
| 109 SK_TYPED_ENUM(Value, SK_OT_BYTE, | 101 enum Value : SK_OT_BYTE { |
| 110 ((NoClassification, 0)) | 102 NoClassification = 0, |
| 111 ((IBMNeoGrotesqueGothic, 1)) | 103 IBMNeoGrotesqueGothic = 1, |
| 112 ((Humanist, 2)) | 104 Humanist = 2, |
| 113 ((LowXRoundGeometric, 3)) | 105 LowXRoundGeometric = 3, |
| 114 ((HighXRoundGeometric, 4)) | 106 HighXRoundGeometric = 4, |
| 115 ((NeoGrotesqueGothic, 5)) | 107 NeoGrotesqueGothic = 5, |
| 116 ((ModifiedNeoGrotesqueGothic, 6)) | 108 ModifiedNeoGrotesqueGothic = 6, |
| 117 //7-8 reserved for future use | 109 //7-8 reserved for future use |
| 118 ((TypewriterGothic, 9)) | 110 TypewriterGothic = 9, |
| 119 ((Matrix, 10)) | 111 Matrix = 10, |
| 120 //11-14 reserved for future use | 112 //11-14 reserved for future use |
| 121 ((Miscellaneous, 15)) | 113 Miscellaneous = 15, |
| 122 SK_SEQ_END, | 114 } value; |
| 123 (value)SK_SEQ_END) | |
| 124 } sansSerif; | 115 } sansSerif; |
| 125 struct Ornamentals { | 116 struct Ornamentals { |
| 126 SK_TYPED_ENUM(Value, SK_OT_BYTE, | 117 enum Value : SK_OT_BYTE { |
| 127 ((NoClassification, 0)) | 118 NoClassification = 0, |
| 128 ((Engraver, 1)) | 119 Engraver = 1, |
| 129 ((BlackLetter, 2)) | 120 BlackLetter = 2, |
| 130 ((Decorative, 3)) | 121 Decorative = 3, |
| 131 ((ThreeDimensional, 4)) | 122 ThreeDimensional = 4, |
| 132 //5-14 reserved for future use | 123 //5-14 reserved for future use |
| 133 ((Miscellaneous, 15)) | 124 Miscellaneous = 15, |
| 134 SK_SEQ_END, | 125 } value; |
| 135 (value)SK_SEQ_END) | |
| 136 } ornamentals; | 126 } ornamentals; |
| 137 struct Scripts { | 127 struct Scripts { |
| 138 SK_TYPED_ENUM(Value, SK_OT_BYTE, | 128 enum Value : SK_OT_BYTE { |
| 139 ((NoClassification, 0)) | 129 NoClassification = 0, |
| 140 ((Uncial, 1)) | 130 Uncial = 1, |
| 141 ((Brush_Joined, 2)) | 131 Brush_Joined = 2, |
| 142 ((Formal_Joined, 3)) | 132 Formal_Joined = 3, |
| 143 ((Monotone_Joined, 4)) | 133 Monotone_Joined = 4, |
| 144 ((Calligraphic, 5)) | 134 Calligraphic = 5, |
| 145 ((Brush_Unjoined, 6)) | 135 Brush_Unjoined = 6, |
| 146 ((Formal_Unjoined, 7)) | 136 Formal_Unjoined = 7, |
| 147 ((Monotone_Unjoined, 8)) | 137 Monotone_Unjoined = 8, |
| 148 //9-14 reserved for future use | 138 //9-14 reserved for future use |
| 149 ((Miscellaneous, 15)) | 139 Miscellaneous = 15, |
| 150 SK_SEQ_END, | 140 } value; |
| 151 (value)SK_SEQ_END) | |
| 152 } scripts; | 141 } scripts; |
| 153 struct Symbolic { | 142 struct Symbolic { |
| 154 SK_TYPED_ENUM(Value, SK_OT_BYTE, | 143 enum Value : SK_OT_BYTE { |
| 155 ((NoClassification, 0)) | 144 NoClassification = 0, |
| 156 //1-2 reserved for future use | 145 //1-2 reserved for future use |
| 157 ((MixedSerif, 3)) | 146 MixedSerif = 3, |
| 158 //4-5 reserved for future use | 147 //4-5 reserved for future use |
| 159 ((OldstyleSerif, 6)) | 148 OldstyleSerif = 6, |
| 160 ((NeoGrotesqueSansSerif, 7)) | 149 NeoGrotesqueSansSerif = 7, |
| 161 //8-14 reserved for future use | 150 //8-14 reserved for future use |
| 162 ((Miscellaneous, 15)) | 151 Miscellaneous = 15, |
| 163 SK_SEQ_END, | 152 } value; |
| 164 (value)SK_SEQ_END) | |
| 165 } symbolic; | 153 } symbolic; |
| 166 } familySubClass; | 154 } familySubClass; |
| 167 }; | 155 }; |
| 168 | 156 |
| 169 #pragma pack(pop) | 157 #pragma pack(pop) |
| 170 | 158 |
| 171 | 159 |
| 172 static_assert(sizeof(SkIBMFamilyClass) == 2, "sizeof_SkIBMFamilyClass_not_2"); | 160 static_assert(sizeof(SkIBMFamilyClass) == 2, "sizeof_SkIBMFamilyClass_not_2"); |
| 173 | 161 |
| 174 #endif | 162 #endif |
| OLD | NEW |