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 #include "SkFixed.h" |
12 | 13 |
13 class SK_API SkFontStyle { | 14 class SK_API SkFontStyle { |
14 public: | 15 public: |
| 16 struct Axis { |
| 17 Axis() : tag(SkSetFourByteTag('\0','\0','\0','\0')), value(0) { } |
| 18 SkFourByteTag tag; |
| 19 SkFixed value; |
| 20 }; |
| 21 |
15 enum Weight { | 22 enum Weight { |
16 kThin_Weight = 100, | 23 kThin_Weight = 100, |
17 kExtraLight_Weight = 200, | 24 kExtraLight_Weight = 200, |
18 kLight_Weight = 300, | 25 kLight_Weight = 300, |
19 kNormal_Weight = 400, | 26 kNormal_Weight = 400, |
20 kMedium_Weight = 500, | 27 kMedium_Weight = 500, |
21 kSemiBold_Weight = 600, | 28 kSemiBold_Weight = 600, |
22 kBold_Weight = 700, | 29 kBold_Weight = 700, |
23 kExtraBold_Weight = 800, | 30 kExtraBold_Weight = 800, |
24 kBlack_Weight = 900 | 31 kBlack_Weight = 900 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 struct { | 70 struct { |
64 uint16_t fWeight; // 100 .. 900 | 71 uint16_t fWeight; // 100 .. 900 |
65 uint8_t fWidth; // 1 .. 9 | 72 uint8_t fWidth; // 1 .. 9 |
66 uint8_t fSlant; // 0 .. 2 | 73 uint8_t fSlant; // 0 .. 2 |
67 } fR; | 74 } fR; |
68 uint32_t fU32; | 75 uint32_t fU32; |
69 } fUnion; | 76 } fUnion; |
70 }; | 77 }; |
71 | 78 |
72 #endif | 79 #endif |
OLD | NEW |