| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 SkFontStyle_DEFINED | 8 #ifndef SkFontStyle_DEFINED |
| 9 #define SkFontStyle_DEFINED | 9 #define SkFontStyle_DEFINED |
| 10 | 10 |
| 11 #include "SkTypes.h" | 11 #include "SkTypes.h" |
| 12 | 12 |
| 13 class SK_API SkFontStyle { | 13 class SK_API SkFontStyle { |
| 14 public: | 14 public: |
| 15 enum Weight { | 15 enum Weight { |
| 16 kInvisible_Weight = 0, | 16 kInvisible_Weight = 0, |
| 17 kThin_Weight = 100, | 17 kThin_Weight = 100, |
| 18 kExtraLight_Weight = 200, | 18 kExtraLight_Weight = 200, |
| 19 kLight_Weight = 300, | 19 kLight_Weight = 300, |
| 20 kNormal_Weight = 400, | 20 kNormal_Weight = 400, |
| 21 kMedium_Weight = 500, | 21 kMedium_Weight = 500, |
| 22 kSemiBold_Weight = 600, | 22 kSemiBold_Weight = 600, |
| 23 kBold_Weight = 700, | 23 kBold_Weight = 700, |
| 24 kExtraBold_Weight = 800, | 24 kExtraBold_Weight = 800, |
| 25 kBlack_Weight = 900, | 25 kBlack_Weight = 900, |
| 26 kExtraBlack_Weight = 1000 | 26 kExtraBlack_Weight = 1000, |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 enum Width { | 29 enum Width { |
| 30 kUltraCondensed_Width = 1, | 30 kUltraCondensed_Width = 1, |
| 31 kExtraCondensed_Width = 2, | 31 kExtraCondensed_Width = 2, |
| 32 kCondensed_Width = 3, | 32 kCondensed_Width = 3, |
| 33 kSemiCondensed_Width = 4, | 33 kSemiCondensed_Width = 4, |
| 34 kNormal_Width = 5, | 34 kNormal_Width = 5, |
| 35 kSemiExpanded_Width = 6, | 35 kSemiExpanded_Width = 6, |
| 36 kExpanded_Width = 7, | 36 kExpanded_Width = 7, |
| 37 kExtraExpanded_Width = 8, | 37 kExtraExpanded_Width = 8, |
| 38 kUltaExpanded_Width = 9 | 38 kUltraExpanded_Width = 9, |
| 39 kUltaExpanded_Width = 9, // deprecated, typo |
| 39 }; | 40 }; |
| 40 | 41 |
| 41 enum Slant { | 42 enum Slant { |
| 42 kUpright_Slant, | 43 kUpright_Slant, |
| 43 kItalic_Slant, | 44 kItalic_Slant, |
| 44 kOblique_Slant, | 45 kOblique_Slant, |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 SkFontStyle(); | 48 SkFontStyle(); |
| 48 SkFontStyle(int weight, int width, Slant); | 49 SkFontStyle(int weight, int width, Slant); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 62 struct { | 63 struct { |
| 63 uint16_t fWeight; // 100 .. 900 | 64 uint16_t fWeight; // 100 .. 900 |
| 64 uint8_t fWidth; // 1 .. 9 | 65 uint8_t fWidth; // 1 .. 9 |
| 65 uint8_t fSlant; // 0 .. 2 | 66 uint8_t fSlant; // 0 .. 2 |
| 66 } fR; | 67 } fR; |
| 67 uint32_t fU32; | 68 uint32_t fU32; |
| 68 } fUnion; | 69 } fUnion; |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 #endif | 72 #endif |
| OLD | NEW |