From ea522c65f7d30b4cb741e3325293469b37e73b95 Mon Sep 17 00:00:00 2001 From: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com> Date: Fri, 17 Mar 2023 13:58:46 -0700 Subject: [PATCH] remove temporary flag and make FlutterTest the default font for real (flutter/engine#40352) Remove temporary flag and make FlutterTest the default font for real --- engine/src/flutter/runtime/test_font_data.cc | 25 ++++---------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/engine/src/flutter/runtime/test_font_data.cc b/engine/src/flutter/runtime/test_font_data.cc index 462b144025..3dbe58f254 100644 --- a/engine/src/flutter/runtime/test_font_data.cc +++ b/engine/src/flutter/runtime/test_font_data.cc @@ -1621,19 +1621,10 @@ namespace flutter { std::vector> GetTestFontData() { std::vector> typefaces; #if EMBED_TEST_FONT_DATA - const bool defaultsToAhem = - std::getenv("FLUTTER_ROOT") && !std::getenv("USE_FLUTTER_TEST_FONT"); - if (defaultsToAhem) { - typefaces.push_back(SkTypeface::MakeFromStream( - SkMemoryStream::MakeDirect(kAhemFont, kAhemFontLength))); - typefaces.push_back(SkTypeface::MakeFromStream( - SkMemoryStream::MakeDirect(kFlutterTestFont, kFlutterTestFontLength))); - } else { - typefaces.push_back(SkTypeface::MakeFromStream( - SkMemoryStream::MakeDirect(kFlutterTestFont, kFlutterTestFontLength))); - typefaces.push_back(SkTypeface::MakeFromStream( - SkMemoryStream::MakeDirect(kAhemFont, kAhemFontLength))); - } + typefaces.push_back(SkTypeface::MakeFromStream( + SkMemoryStream::MakeDirect(kFlutterTestFont, kFlutterTestFontLength))); + typefaces.push_back(SkTypeface::MakeFromStream( + SkMemoryStream::MakeDirect(kAhemFont, kAhemFontLength))); typefaces.push_back(SkTypeface::MakeFromStream( SkMemoryStream::MakeDirect(kCoughFont, kCoughFontLength))); #endif // EMBED_TEST_FONT_DATA @@ -1643,13 +1634,7 @@ std::vector> GetTestFontData() { std::vector GetTestFontFamilyNames() { std::vector names; #if EMBED_TEST_FONT_DATA - const bool defaultsToAhem = - std::getenv("FLUTTER_ROOT") && !std::getenv("USE_FLUTTER_TEST_FONT"); - if (defaultsToAhem) { - names = {"Ahem", "FlutterTest", "Cough"}; - } else { - names = {"FlutterTest", "Ahem", "Cough"}; - } + names = {"FlutterTest", "Ahem", "Cough"}; #endif // EMBED_TEST_FONT_DATA return names; }