Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 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 #include "Resources.h" | 8 #include "Resources.h" |
| 9 #include "SkFontConfigParser_android.h" | 9 #include "SkFontConfigParser_android.h" |
| 10 #include "Test.h" | 10 #include "Test.h" |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 | 30 |
| 31 void DumpLoadedFonts(SkTDArray<FontFamily*> fontFamilies) { | 31 void DumpLoadedFonts(SkTDArray<FontFamily*> fontFamilies) { |
| 32 #if SK_DEBUG_FONTS | 32 #if SK_DEBUG_FONTS |
| 33 for (int i = 0; i < fontFamilies.count(); ++i) { | 33 for (int i = 0; i < fontFamilies.count(); ++i) { |
| 34 SkDebugf("Family %d:\n", i); | 34 SkDebugf("Family %d:\n", i); |
| 35 switch(fontFamilies[i]->fVariant) { | 35 switch(fontFamilies[i]->fVariant) { |
| 36 case kElegant_FontVariant: SkDebugf(" elegant\n"); break; | 36 case kElegant_FontVariant: SkDebugf(" elegant\n"); break; |
| 37 case kCompact_FontVariant: SkDebugf(" compact\n"); break; | 37 case kCompact_FontVariant: SkDebugf(" compact\n"); break; |
| 38 default: break; | 38 default: break; |
| 39 } | 39 } |
| 40 if (fontFamilies[i]->fBasePath) { | 40 SkDebugf(" basePath %s\n", fontFamilies[i]->fBasePath.c_str()); |
|
scroggo
2015/02/10 13:59:41
I'm guessing this bit-rotted due to SK_DEBUG_FONTS
bungeman-skia
2015/02/10 15:34:12
I think it might be more due to the fact that I di
| |
| 41 SkDebugf(" basePath %s\n", fontFamilies[i]->fBasePath); | |
| 42 } | |
| 43 if (!fontFamilies[i]->fLanguage.getTag().isEmpty()) { | 41 if (!fontFamilies[i]->fLanguage.getTag().isEmpty()) { |
| 44 SkDebugf(" language %s\n", fontFamilies[i]->fLanguage.getTag().c_st r()); | 42 SkDebugf(" language %s\n", fontFamilies[i]->fLanguage.getTag().c_st r()); |
| 45 } | 43 } |
| 46 for (int j = 0; j < fontFamilies[i]->fNames.count(); ++j) { | 44 for (int j = 0; j < fontFamilies[i]->fNames.count(); ++j) { |
| 47 SkDebugf(" name %s\n", fontFamilies[i]->fNames[j].c_str()); | 45 SkDebugf(" name %s\n", fontFamilies[i]->fNames[j].c_str()); |
| 48 } | 46 } |
| 49 for (int j = 0; j < fontFamilies[i]->fFonts.count(); ++j) { | 47 for (int j = 0; j < fontFamilies[i]->fFonts.count(); ++j) { |
| 50 const FontFileInfo& ffi = fontFamilies[i]->fFonts[j]; | 48 const FontFileInfo& ffi = fontFamilies[i]->fFonts[j]; |
| 51 SkDebugf(" file (%d) %s#%d\n", ffi.fWeight, ffi.fFileName.c_str(), ffi.fIndex); | 49 SkDebugf(" file (%d) %s#%d\n", ffi.fWeight, ffi.fFileName.c_str(), ffi.fIndex); |
| 52 } | 50 } |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 106 ValidateLoadedFonts(v22FontFamilies, "Roboto-Thin.ttf", reporter); | 104 ValidateLoadedFonts(v22FontFamilies, "Roboto-Thin.ttf", reporter); |
| 107 } else { | 105 } else { |
| 108 resourcesMissing = true; | 106 resourcesMissing = true; |
| 109 } | 107 } |
| 110 | 108 |
| 111 if (resourcesMissing) { | 109 if (resourcesMissing) { |
| 112 SkDebugf("---- Resource files missing for FontConfigParser test\n"); | 110 SkDebugf("---- Resource files missing for FontConfigParser test\n"); |
| 113 } | 111 } |
| 114 } | 112 } |
| 115 | 113 |
| OLD | NEW |