| Index: tests/FontConfigParser.cpp
|
| diff --git a/tests/FontConfigParser.cpp b/tests/FontConfigParser.cpp
|
| index 744a41e5f2900c770ec4e6c1a620796beed53dbe..dfc8093f2a0077526e9e7ed68596b6d3ddc434d9 100644
|
| --- a/tests/FontConfigParser.cpp
|
| +++ b/tests/FontConfigParser.cpp
|
| @@ -6,9 +6,12 @@
|
| */
|
|
|
| #include "Resources.h"
|
| +#include "SkCommandLineFlags.h"
|
| #include "SkFontConfigParser_android.h"
|
| #include "Test.h"
|
|
|
| +DECLARE_bool(verboseFontMgr);
|
| +
|
| int CountFallbacks(SkTDArray<FontFamily*> fontFamilies) {
|
| int countOfFallbackFonts = 0;
|
| for (int i = 0; i < fontFamilies.count(); i++) {
|
| @@ -29,7 +32,10 @@ void ValidateLoadedFonts(SkTDArray<FontFamily*> fontFamilies, const char* firstE
|
| }
|
|
|
| void DumpLoadedFonts(SkTDArray<FontFamily*> fontFamilies) {
|
| -#if SK_DEBUG_FONTS
|
| + if (!FLAGS_verboseFontMgr) {
|
| + return;
|
| + }
|
| +
|
| for (int i = 0; i < fontFamilies.count(); ++i) {
|
| SkDebugf("Family %d:\n", i);
|
| switch(fontFamilies[i]->fVariant) {
|
| @@ -37,9 +43,7 @@ void DumpLoadedFonts(SkTDArray<FontFamily*> fontFamilies) {
|
| case kCompact_FontVariant: SkDebugf(" compact\n"); break;
|
| default: break;
|
| }
|
| - if (fontFamilies[i]->fBasePath) {
|
| - SkDebugf(" basePath %s\n", fontFamilies[i]->fBasePath);
|
| - }
|
| + SkDebugf(" basePath %s\n", fontFamilies[i]->fBasePath.c_str());
|
| if (!fontFamilies[i]->fLanguage.getTag().isEmpty()) {
|
| SkDebugf(" language %s\n", fontFamilies[i]->fLanguage.getTag().c_str());
|
| }
|
| @@ -51,7 +55,6 @@ void DumpLoadedFonts(SkTDArray<FontFamily*> fontFamilies) {
|
| SkDebugf(" file (%d) %s#%d\n", ffi.fWeight, ffi.fFileName.c_str(), ffi.fIndex);
|
| }
|
| }
|
| -#endif // SK_DEBUG_FONTS
|
| }
|
|
|
| DEF_TEST(FontConfigParserAndroid, reporter) {
|
|
|