| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The Android Open Source Project | 2 * Copyright 2011 The Android Open Source Project |
| 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 SKFONTCONFIGPARSER_ANDROID_H_ | 8 #ifndef SKFONTCONFIGPARSER_ANDROID_H_ |
| 9 #define SKFONTCONFIGPARSER_ANDROID_H_ | 9 #define SKFONTCONFIGPARSER_ANDROID_H_ |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 typedef uint32_t FontVariant; | 61 typedef uint32_t FontVariant; |
| 62 | 62 |
| 63 // Must remain trivially movable (can be memmoved). | 63 // Must remain trivially movable (can be memmoved). |
| 64 struct FontFileInfo { | 64 struct FontFileInfo { |
| 65 FontFileInfo() : fIndex(0), fWeight(0), fStyle(Style::kAuto) { } | 65 FontFileInfo() : fIndex(0), fWeight(0), fStyle(Style::kAuto) { } |
| 66 | 66 |
| 67 SkString fFileName; | 67 SkString fFileName; |
| 68 int fIndex; | 68 int fIndex; |
| 69 int fWeight; | 69 int fWeight; |
| 70 enum class Style { kAuto, kNormal, kItalic } fStyle; | 70 enum class Style { kAuto, kNormal, kItalic } fStyle; |
| 71 struct Axis { |
| 72 Axis() : fTag(SkSetFourByteTag('\0','\0','\0','\0')), fValue(0) { } |
| 73 SkFourByteTag fTag; |
| 74 SkFixed fValue; |
| 75 }; |
| 76 SkTArray<Axis, true> fAxes; |
| 71 }; | 77 }; |
| 72 | 78 |
| 73 /** | 79 /** |
| 74 * A font family provides one or more names for a collection of fonts, each of | 80 * A font family provides one or more names for a collection of fonts, each of |
| 75 * which has a different style (normal, italic) or weight (thin, light, bold, | 81 * which has a different style (normal, italic) or weight (thin, light, bold, |
| 76 * etc). | 82 * etc). |
| 77 * Some fonts may occur in compact variants for use in the user interface. | 83 * Some fonts may occur in compact variants for use in the user interface. |
| 78 * Android distinguishes "fallback" fonts to support non-ASCII character sets. | 84 * Android distinguishes "fallback" fonts to support non-ASCII character sets. |
| 79 */ | 85 */ |
| 80 struct FontFamily { | 86 struct FontFamily { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 102 /** Parses font configuration files and appends result to fontFamilies. */ | 108 /** Parses font configuration files and appends result to fontFamilies. */ |
| 103 void GetCustomFontFamilies(SkTDArray<FontFamily*>& fontFamilies, | 109 void GetCustomFontFamilies(SkTDArray<FontFamily*>& fontFamilies, |
| 104 const SkString& basePath, | 110 const SkString& basePath, |
| 105 const char* fontsXml, | 111 const char* fontsXml, |
| 106 const char* fallbackFontsXml, | 112 const char* fallbackFontsXml, |
| 107 const char* langFallbackFontsDir = NULL); | 113 const char* langFallbackFontsDir = NULL); |
| 108 | 114 |
| 109 } // SkFontConfigParser namespace | 115 } // SkFontConfigParser namespace |
| 110 | 116 |
| 111 #endif /* SKFONTCONFIGPARSER_ANDROID_H_ */ | 117 #endif /* SKFONTCONFIGPARSER_ANDROID_H_ */ |
| OLD | NEW |