1313#include " tools/Resources.h"
1414#include " tools/ToolUtils.h"
1515
16+ #include " third_party/icu/SkLoadICU.h"
17+
1618#define VeryLongCanvasWidth 1000000
1719#define TestCanvasWidth 1000
1820#define TestCanvasHeight 600
@@ -48,6 +50,10 @@ class ResourceFontCollection : public FontCollection {
4850 std::vector<SkString> fonts;
4951 SkOSFile::Iter iter (fResourceDir .c_str ());
5052
53+ if (!SkLoadICU ()) {
54+ SkDebugf (" ICU not loaded, skipping all the tests\n " );
55+ return ;
56+ }
5157 SkString path;
5258 while (iter.next (&path)) {
5359 if (path.endsWith (" Roboto-Italic.ttf" )) {
@@ -57,6 +63,7 @@ class ResourceFontCollection : public FontCollection {
5763 }
5864
5965 if (!fFontsFound ) {
66+ SkDebugf (" Fonts not found, skipping all the tests\n " );
6067 return ;
6168 }
6269 // Only register fonts if we have to
@@ -72,8 +79,6 @@ class ResourceFontCollection : public FontCollection {
7279 this ->setAssetFontManager (std::move (fFontProvider ));
7380 }
7481 this ->disableFontFallback ();
75-
76- if (!fFontsFound ) SkDebugf (" Fonts not found, skipping all the tests\n " );
7782 }
7883
7984 ~ResourceFontCollection () = default ;
@@ -4844,7 +4849,7 @@ DEF_TEST(SkParagraph_NewlineOnly, reporter) {
48444849 REPORTER_ASSERT (reporter, paragraph->getHeight () == 28 );
48454850}
48464851
4847- DEF_TEST (SkParagraph_FontResolutions, reporter) {
4852+ DEF_TEST_DISABLED (SkParagraph_FontResolutions, reporter) {
48484853 TestCanvas canvas (" SkParagraph_FontResolutions.png" );
48494854
48504855 sk_sp<TestFontCollection> fontCollection =
@@ -4901,7 +4906,7 @@ DEF_TEST(SkParagraph_FontResolutions, reporter) {
49014906 paragraph->paint (canvas.get (), 100 , 100 );
49024907}
49034908
4904- DEF_TEST (SkParagraph_FontStyle, reporter) {
4909+ DEF_TEST_DISABLED (SkParagraph_FontStyle, reporter) {
49054910 TestCanvas canvas (" SkParagraph_FontStyle.png" );
49064911
49074912 sk_sp<TestFontCollection> fontCollection = sk_make_sp<TestFontCollection>(GetResourcePath (" fonts" ).c_str (), false , true );
@@ -4939,13 +4944,9 @@ DEF_TEST(SkParagraph_FontStyle, reporter) {
49394944 paragraph->paint (canvas.get (), 0 , 0 );
49404945}
49414946
4942- DEF_TEST (SkParagraph_Shaping, reporter) {
4947+ DEF_TEST_DISABLED (SkParagraph_Shaping, reporter) {
49434948 TestCanvas canvas (" SkParagraph_Shaping.png" );
49444949
4945- // sk_sp<FontCollection> fontCollection = sk_make_sp<FontCollection>();
4946- // fontCollection->setDefaultFontManager(SkFontMgr::RefDefault());
4947- // fontCollection->enableFontFallback();
4948-
49494950 auto dir = " /usr/local/google/home/jlavrova/Sources/flutter/engine/src/out/host_debug_unopt_x86/gen/flutter/third_party/txt/assets" ;
49504951 sk_sp<TestFontCollection> fontCollection =
49514952 sk_make_sp<TestFontCollection>(dir, /* GetResourcePath("fonts").c_str(), */ false );
0 commit comments