diff --git a/third_party/txt/BUILD.gn b/third_party/txt/BUILD.gn index 89258bca0bb9dbaa0d1cf8ca690bdc405c20a324..79c52ee1d1dc0127c07e2988f958007a57cb9fe2 100644 --- a/third_party/txt/BUILD.gn +++ b/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/third_party/txt/src/txt/platform_linux.cc b/third_party/txt/src/txt/platform_linux.cc index a1f45ade65f2edf8b0ccc7f708c0d2191e69e5a9..36df613eecb905509114e748259d47d707853d6a 100644 --- a/third_party/txt/src/txt/platform_linux.cc +++ b/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/");