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 "SkCommandLineFlags.h" | 9 #include "SkCommandLineFlags.h" |
10 #include "SkFontMgr_android_parser.h" | 10 #include "SkFontMgr_android_parser.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } else { | 180 } else { |
181 resourcesMissing = true; | 181 resourcesMissing = true; |
182 } | 182 } |
183 v17FontFamilies.deleteAll(); | 183 v17FontFamilies.deleteAll(); |
184 | 184 |
185 | 185 |
186 SkTDArray<FontFamily*> v22FontFamilies; | 186 SkTDArray<FontFamily*> v22FontFamilies; |
187 SkFontMgr_Android_Parser::GetCustomFontFamilies(v22FontFamilies, | 187 SkFontMgr_Android_Parser::GetCustomFontFamilies(v22FontFamilies, |
188 SkString("/custom/font/path/"), | 188 SkString("/custom/font/path/"), |
189 GetResourcePath("android_fonts/v22/fonts.xml").c_str(), | 189 GetResourcePath("android_fonts/v22/fonts.xml").c_str(), |
190 NULL); | 190 nullptr); |
191 | 191 |
192 if (v22FontFamilies.count() > 0) { | 192 if (v22FontFamilies.count() > 0) { |
193 REPORTER_ASSERT(reporter, v22FontFamilies.count() == 54); | 193 REPORTER_ASSERT(reporter, v22FontFamilies.count() == 54); |
194 REPORTER_ASSERT(reporter, CountFallbacks(v22FontFamilies) == 42); | 194 REPORTER_ASSERT(reporter, CountFallbacks(v22FontFamilies) == 42); |
195 | 195 |
196 DumpLoadedFonts(v22FontFamilies, "version 22"); | 196 DumpLoadedFonts(v22FontFamilies, "version 22"); |
197 ValidateLoadedFonts(v22FontFamilies, "Roboto-Thin.ttf", reporter); | 197 ValidateLoadedFonts(v22FontFamilies, "Roboto-Thin.ttf", reporter); |
198 } else { | 198 } else { |
199 resourcesMissing = true; | 199 resourcesMissing = true; |
200 } | 200 } |
201 v22FontFamilies.deleteAll(); | 201 v22FontFamilies.deleteAll(); |
202 | 202 |
203 if (resourcesMissing) { | 203 if (resourcesMissing) { |
204 SkDebugf("---- Resource files missing for FontConfigParser test\n"); | 204 SkDebugf("---- Resource files missing for FontConfigParser test\n"); |
205 } | 205 } |
206 } | 206 } |
207 | 207 |
OLD | NEW |