未验证 提交 14c3c79f 编写于 作者: J Jason Simmons 提交者: GitHub

libtxt: remove obsolete font_manager_available defines (#9376)

上级 e6d35522
......@@ -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 = [
......
......@@ -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<SkFontMgr> GetDefaultFontManager() {
#ifdef FONTCONFIG_FONT_MANAGER_AVAILABLE
#ifdef FLUTTER_USE_FONTCONFIG
return SkFontMgr_New_FontConfig(nullptr);
#else
return SkFontMgr_New_Custom_Directory("/usr/share/fonts/");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册