aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sfnt/SkIBMFamilyClass.h
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2016-08-17 10:59:30 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-17 10:59:30 -0700
commit4f81caf16995679adc05131823e209bf12844d3c (patch)
tree88e258e36dfcd4f8f6fa141294681970bb47a73b /src/sfnt/SkIBMFamilyClass.h
parent138c26300f2686175f68b5a3528133f5c9edb596 (diff)
Move FamilyClass and Panose enums to enum class.
The IBMFamilyClass and Panose structures are obvious candidates for simplification now that it is no longer necessary to nest enums inside structs to avoid name clashes. Review-Url: https://codereview.chromium.org/2253543004
Diffstat (limited to 'src/sfnt/SkIBMFamilyClass.h')
-rw-r--r--src/sfnt/SkIBMFamilyClass.h204
1 files changed, 92 insertions, 112 deletions
diff --git a/src/sfnt/SkIBMFamilyClass.h b/src/sfnt/SkIBMFamilyClass.h
index 190952b084..b95c91efbb 100644
--- a/src/sfnt/SkIBMFamilyClass.h
+++ b/src/sfnt/SkIBMFamilyClass.h
@@ -13,7 +13,7 @@
#pragma pack(push, 1)
struct SkIBMFamilyClass {
- enum Class : SK_OT_BYTE {
+ enum class Class : SK_OT_BYTE {
NoClassification = 0,
OldstyleSerifs = 1,
TransitionalSerifs = 2,
@@ -30,126 +30,106 @@ struct SkIBMFamilyClass {
//13-15 reserved for future use
} familyClass;
union SubClass {
- struct OldstyleSerifs {
- enum Value : SK_OT_BYTE {
- NoClassification = 0,
- IBMRoundedLegibility = 1,
- Garalde = 2,
- Venetian = 3,
- ModifiedVenetian = 4,
- DutchModern = 5,
- DutchTraditional = 6,
- Contemporary = 7,
- Calligraphic = 8,
- //9-14 reserved for future use
- Miscellaneous = 15,
- } value;
+ enum class OldstyleSerifs : SK_OT_BYTE {
+ NoClassification = 0,
+ IBMRoundedLegibility = 1,
+ Garalde = 2,
+ Venetian = 3,
+ ModifiedVenetian = 4,
+ DutchModern = 5,
+ DutchTraditional = 6,
+ Contemporary = 7,
+ Calligraphic = 8,
+ //9-14 reserved for future use
+ Miscellaneous = 15,
} oldstyleSerifs;
- struct TransitionalSerifs {
- enum Value : SK_OT_BYTE {
- NoClassification = 0,
- DirectLine = 1,
- Script = 2,
- //3-14 reserved for future use
- Miscellaneous = 15,
- } value;
+ enum class TransitionalSerifs : SK_OT_BYTE {
+ NoClassification = 0,
+ DirectLine = 1,
+ Script = 2,
+ //3-14 reserved for future use
+ Miscellaneous = 15,
} transitionalSerifs;
- struct ModernSerifs {
- enum Value : SK_OT_BYTE {
- NoClassification = 0,
- Italian = 1,
- Script = 2,
- //3-14 reserved for future use
- Miscellaneous = 15,
- } value;
+ enum class ModernSerifs : SK_OT_BYTE {
+ NoClassification = 0,
+ Italian = 1,
+ Script = 2,
+ //3-14 reserved for future use
+ Miscellaneous = 15,
} modernSerifs;
- struct ClarendonSerifs {
- enum Value : SK_OT_BYTE {
- NoClassification = 0,
- Clarendon = 1,
- Modern = 2,
- Traditional = 3,
- Newspaper = 4,
- StubSerif = 5,
- Monotone = 6,
- Typewriter = 7,
- //8-14 reserved for future use
- Miscellaneous = 15,
- } value;
+ enum class ClarendonSerifs : SK_OT_BYTE {
+ NoClassification = 0,
+ Clarendon = 1,
+ Modern = 2,
+ Traditional = 3,
+ Newspaper = 4,
+ StubSerif = 5,
+ Monotone = 6,
+ Typewriter = 7,
+ //8-14 reserved for future use
+ Miscellaneous = 15,
} clarendonSerifs;
- struct SlabSerifs {
- enum Value : SK_OT_BYTE {
- NoClassification = 0,
- Monotone = 1,
- Humanist = 2,
- Geometric = 3,
- Swiss = 4,
- Typewriter = 5,
- //6-14 reserved for future use
- Miscellaneous = 15,
- } value;
+ enum class SlabSerifs : SK_OT_BYTE {
+ NoClassification = 0,
+ Monotone = 1,
+ Humanist = 2,
+ Geometric = 3,
+ Swiss = 4,
+ Typewriter = 5,
+ //6-14 reserved for future use
+ Miscellaneous = 15,
} slabSerifs;
- struct FreeformSerifs {
- enum Value : SK_OT_BYTE {
- NoClassification = 0,
- Modern = 1,
- //2-14 reserved for future use
- Miscellaneous = 15,
- } value;
+ enum class FreeformSerifs : SK_OT_BYTE {
+ NoClassification = 0,
+ Modern = 1,
+ //2-14 reserved for future use
+ Miscellaneous = 15,
} freeformSerifs;
- struct SansSerif {
- enum Value : SK_OT_BYTE {
- NoClassification = 0,
- IBMNeoGrotesqueGothic = 1,
- Humanist = 2,
- LowXRoundGeometric = 3,
- HighXRoundGeometric = 4,
- NeoGrotesqueGothic = 5,
- ModifiedNeoGrotesqueGothic = 6,
- //7-8 reserved for future use
- TypewriterGothic = 9,
- Matrix = 10,
- //11-14 reserved for future use
- Miscellaneous = 15,
- } value;
+ enum class SansSerif : SK_OT_BYTE {
+ NoClassification = 0,
+ IBMNeoGrotesqueGothic = 1,
+ Humanist = 2,
+ LowXRoundGeometric = 3,
+ HighXRoundGeometric = 4,
+ NeoGrotesqueGothic = 5,
+ ModifiedNeoGrotesqueGothic = 6,
+ //7-8 reserved for future use
+ TypewriterGothic = 9,
+ Matrix = 10,
+ //11-14 reserved for future use
+ Miscellaneous = 15,
} sansSerif;
- struct Ornamentals {
- enum Value : SK_OT_BYTE {
- NoClassification = 0,
- Engraver = 1,
- BlackLetter = 2,
- Decorative = 3,
- ThreeDimensional = 4,
- //5-14 reserved for future use
- Miscellaneous = 15,
- } value;
+ enum class Ornamentals : SK_OT_BYTE {
+ NoClassification = 0,
+ Engraver = 1,
+ BlackLetter = 2,
+ Decorative = 3,
+ ThreeDimensional = 4,
+ //5-14 reserved for future use
+ Miscellaneous = 15,
} ornamentals;
- struct Scripts {
- enum Value : SK_OT_BYTE {
- NoClassification = 0,
- Uncial = 1,
- Brush_Joined = 2,
- Formal_Joined = 3,
- Monotone_Joined = 4,
- Calligraphic = 5,
- Brush_Unjoined = 6,
- Formal_Unjoined = 7,
- Monotone_Unjoined = 8,
- //9-14 reserved for future use
- Miscellaneous = 15,
- } value;
+ enum class Scripts : SK_OT_BYTE {
+ NoClassification = 0,
+ Uncial = 1,
+ Brush_Joined = 2,
+ Formal_Joined = 3,
+ Monotone_Joined = 4,
+ Calligraphic = 5,
+ Brush_Unjoined = 6,
+ Formal_Unjoined = 7,
+ Monotone_Unjoined = 8,
+ //9-14 reserved for future use
+ Miscellaneous = 15,
} scripts;
- struct Symbolic {
- enum Value : SK_OT_BYTE {
- NoClassification = 0,
- //1-2 reserved for future use
- MixedSerif = 3,
- //4-5 reserved for future use
- OldstyleSerif = 6,
- NeoGrotesqueSansSerif = 7,
- //8-14 reserved for future use
- Miscellaneous = 15,
- } value;
+ enum class Symbolic : SK_OT_BYTE {
+ NoClassification = 0,
+ //1-2 reserved for future use
+ MixedSerif = 3,
+ //4-5 reserved for future use
+ OldstyleSerif = 6,
+ NeoGrotesqueSansSerif = 7,
+ //8-14 reserved for future use
+ Miscellaneous = 15,
} symbolic;
} familySubClass;
};