diff --git a/engine/src/flutter/third_party/txt/BUILD.gn b/engine/src/flutter/third_party/txt/BUILD.gn index 89258bca0b..79c52ee1d1 100644 --- a/engine/src/flutter/third_party/txt/BUILD.gn +++ b/engine/src/flutter/third_party/txt/BUILD.gn @@ -26,14 +26,9 @@ config("txt_config") { } source_set("txt") { - if (current_toolchain == host_toolchain && !is_mac) { - defines = [ "DIRECTORY_FONT_MANAGER_AVAILABLE" ] - } - if (is_android) { - defines = [ "ANDROID_FONT_MANAGER_AVAILABLE" ] - } + defines = [] if (flutter_use_fontconfig) { - defines = [ "FONTCONFIG_FONT_MANAGER_AVAILABLE" ] + defines += [ "FLUTTER_USE_FONTCONFIG" ] } sources = [ diff --git a/engine/src/flutter/third_party/txt/src/txt/platform_linux.cc b/engine/src/flutter/third_party/txt/src/txt/platform_linux.cc index a1f45ade65..36df613eec 100644 --- a/engine/src/flutter/third_party/txt/src/txt/platform_linux.cc +++ b/engine/src/flutter/third_party/txt/src/txt/platform_linux.cc @@ -4,7 +4,7 @@ #include "txt/platform.h" -#ifdef FONTCONFIG_FONT_MANAGER_AVAILABLE +#ifdef FLUTTER_USE_FONTCONFIG #include "third_party/skia/include/ports/SkFontMgr_fontconfig.h" #else #include "third_party/skia/include/ports/SkFontMgr_directory.h" @@ -17,7 +17,7 @@ std::string GetDefaultFontFamily() { } sk_sp GetDefaultFontManager() { -#ifdef FONTCONFIG_FONT_MANAGER_AVAILABLE +#ifdef FLUTTER_USE_FONTCONFIG return SkFontMgr_New_FontConfig(nullptr); #else return SkFontMgr_New_Custom_Directory("/usr/share/fonts/");