aboutsummaryrefslogtreecommitdiffstats
path: root/src/ports/FontHostConfiguration_android.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ports/FontHostConfiguration_android.h')
-rw-r--r--src/ports/FontHostConfiguration_android.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/ports/FontHostConfiguration_android.h b/src/ports/FontHostConfiguration_android.h
index 2441f0e..6734b08 100644
--- a/src/ports/FontHostConfiguration_android.h
+++ b/src/ports/FontHostConfiguration_android.h
@@ -17,19 +17,33 @@
#ifndef FONTHOSTCONFIGURATION_ANDROID_H_
#define FONTHOSTCONFIGURATION_ANDROID_H_
+#include "SkTypes.h"
+
+#include "SkLanguage.h"
+#include "SkPaint.h"
#include "SkTDArray.h"
+struct FontFileInfo {
+ FontFileInfo() : fFileName(NULL), fVariant(SkPaint::kDefault_Variant),
+ fLanguage() {
+ }
+
+ const char* fFileName;
+ SkPaint::FontVariant fVariant;
+ SkLanguage fLanguage;
+};
+
/**
* The FontFamily data structure is created during parsing and handed back to
* Skia to fold into its representation of font families. fNames is the list of
- * font names that alias to a font family. fFileNames is the list of font
- * filenames for the family. Order is the priority order for the font. This is
+ * font names that alias to a font family. fontFileArray is the list of information
+ * about each file. Order is the priority order for the font. This is
* used internally to determine the order in which to place fallback fonts as
* they are read from the configuration files.
*/
struct FontFamily {
- SkTDArray<const char*> fNames;
- SkTDArray<const char*> fFileNames;
+ SkTDArray<const char*> fNames;
+ SkTDArray<FontFileInfo*> fFontFileArray;
int order;
};
@@ -45,15 +59,10 @@ void getFontFamilies(SkTDArray<FontFamily*> &fontFamilies);
*/
void getSystemFontFamilies(SkTDArray<FontFamily*> &fontFamilies);
-
/**
* Parse the fallback and vendor system font configuration files and return the
* results in an array of FontFamily structures.
*/
void getFallbackFontFamilies(SkTDArray<FontFamily*> &fallbackFonts);
-#if !defined(SK_BUILD_FOR_ANDROID_NDK)
- void getLocale(char* language, char* region);
-#endif
-
#endif /* FONTHOSTCONFIGURATION_ANDROID_H_ */