Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Remove temporary flag and make FlutterTest the default font for real #40352

Merged
merged 1 commit into from
Mar 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 5 additions & 20 deletions runtime/test_font_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1621,19 +1621,10 @@ namespace flutter {
std::vector<sk_sp<SkTypeface>> GetTestFontData() {
std::vector<sk_sp<SkTypeface>> 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
Expand All @@ -1643,13 +1634,7 @@ std::vector<sk_sp<SkTypeface>> GetTestFontData() {
std::vector<std::string> GetTestFontFamilyNames() {
std::vector<std::string> 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;
}
Expand Down