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