| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright 2011 The Android Open Source Project | |
| 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 FONTHOSTCONFIGURATION_ANDROID_H_ | |
| 9 #define FONTHOSTCONFIGURATION_ANDROID_H_ | |
| 10 | |
| 11 #include "SkTDArray.h" | |
| 12 | |
| 13 /** | |
| 14 * The FontFamily data structure is created during parsing and handed back to | |
| 15 * Skia to fold into its representation of font families. fNames is the list of | |
| 16 * font names that alias to a font family. fFileNames is the list of font | |
| 17 * filenames for the family. Order is the priority order for the font. This is | |
| 18 * used internally to determine the order in which to place fallback fonts as | |
| 19 * they are read from the configuration files. | |
| 20 */ | |
| 21 struct FontFamily { | |
| 22 SkTDArray<const char*> fNames; | |
| 23 SkTDArray<const char*> fFileNames; | |
| 24 int order; | |
| 25 }; | |
| 26 | |
| 27 /** | |
| 28 * Parses all system font configuration files and returns the results in an | |
| 29 * array of FontFamily structures. | |
| 30 */ | |
| 31 void getFontFamilies(SkTDArray<FontFamily*> &fontFamilies); | |
| 32 | |
| 33 /** | |
| 34 * Parse the fallback and vendor system font configuration files and return the | |
| 35 * results in an array of FontFamily structures. | |
| 36 */ | |
| 37 void getFallbackFontFamilies(SkTDArray<FontFamily*> &fallbackFonts); | |
| 38 | |
| 39 /** | |
| 40 * Parses all test font configuration files and returns the results in an | |
| 41 * array of FontFamily structures. | |
| 42 */ | |
| 43 void getTestFontFamilies(SkTDArray<FontFamily*> &fontFamilies, | |
| 44 const char* testMainConfigFile, | |
| 45 const char* testFallbackConfigFile); | |
| 46 | |
| 47 struct AndroidLocale { | |
| 48 char language[3]; | |
| 49 char region[3]; | |
| 50 }; | |
| 51 | |
| 52 void getLocale(AndroidLocale &locale); | |
| 53 | |
| 54 #endif /* FONTHOSTCONFIGURATION_ANDROID_H_ */ | |
| OLD | NEW |