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