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