| Index: src/ports/SkFontConfigParser_android.h
|
| diff --git a/src/ports/FontHostConfiguration_android.h b/src/ports/SkFontConfigParser_android.h
|
| similarity index 50%
|
| copy from src/ports/FontHostConfiguration_android.h
|
| copy to src/ports/SkFontConfigParser_android.h
|
| index 71eed579136e5e8590784f34c4995558fad3928c..c5cd3eb8b7390cbdd5214cf52af4a4803d269d96 100644
|
| --- a/src/ports/FontHostConfiguration_android.h
|
| +++ b/src/ports/SkFontConfigParser_android.h
|
| @@ -5,42 +5,51 @@
|
| * found in the LICENSE file.
|
| */
|
|
|
| -#ifndef FONTHOSTCONFIGURATION_ANDROID_H_
|
| -#define FONTHOSTCONFIGURATION_ANDROID_H_
|
| +#ifndef SKFONTCONFIGPARSER_ANDROID_H_
|
| +#define SKFONTCONFIGPARSER_ANDROID_H_
|
|
|
| +#include "SkTypes.h"
|
| +
|
| +#include "SkPaintOptionsAndroid.h"
|
| #include "SkTDArray.h"
|
|
|
| +struct FontFileInfo {
|
| + FontFileInfo() : fFileName(NULL) {}
|
| +
|
| + const char* fFileName;
|
| + SkPaintOptionsAndroid fPaintOptions;
|
| +};
|
| +
|
| /**
|
| * 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;
|
| - int order;
|
| + FontFamily() : fIsFallbackFont(false), order(-1) {}
|
| +
|
| + SkTDArray<const char*> fNames;
|
| + SkTDArray<FontFileInfo*> fFontFiles;
|
| + bool fIsFallbackFont;
|
| + int order; // only used internally by SkFontConfigParser
|
| };
|
|
|
| +namespace SkFontConfigParser {
|
| +
|
| /**
|
| * Parses all system font configuration files and returns the results in an
|
| * array of FontFamily structures.
|
| */
|
| -void getFontFamilies(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);
|
| +void GetFontFamilies(SkTDArray<FontFamily*> &fontFamilies);
|
|
|
| /**
|
| * Parses all test font configuration files and returns the results in an
|
| * array of FontFamily structures.
|
| */
|
| -void getTestFontFamilies(SkTDArray<FontFamily*> &fontFamilies,
|
| +void GetTestFontFamilies(SkTDArray<FontFamily*> &fontFamilies,
|
| const char* testMainConfigFile,
|
| const char* testFallbackConfigFile);
|
|
|
| @@ -49,6 +58,8 @@ struct AndroidLocale {
|
| char region[3];
|
| };
|
|
|
| -void getLocale(AndroidLocale &locale);
|
| +void GetLocale(AndroidLocale &locale);
|
| +
|
| +} // SkFontConfigParser namespace
|
|
|
| -#endif /* FONTHOSTCONFIGURATION_ANDROID_H_ */
|
| +#endif /* SKFONTCONFIGPARSER_ANDROID_H_ */
|
|
|