libtxt: remove obsolete font_manager_available defines (flutter/engine#9376)

This commit is contained in:
Jason Simmons
2019-06-20 11:04:58 -07:00
committed by GitHub
parent 900692eb09
commit 9943600684
2 changed files with 4 additions and 9 deletions

View File

@@ -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 = [

View File

@@ -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/");