Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
424940f1
E
engine
项目概览
sxychenjing
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
424940f1
编写于
5月 16, 2019
作者:
J
Jason Simmons
提交者:
GitHub
5月 16, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add support for the Fontconfig-based Skia font manager (#8977)
上级
859cd982
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
34 addition
and
4 deletion
+34
-4
DEPS
DEPS
+5
-2
ci/licenses_golden/tool_signature
ci/licenses_golden/tool_signature
+1
-1
third_party/txt/BUILD.gn
third_party/txt/BUILD.gn
+15
-0
third_party/txt/src/txt/platform_linux.cc
third_party/txt/src/txt/platform_linux.cc
+8
-0
tools/gn
tools/gn
+4
-1
tools/licenses/lib/main.dart
tools/licenses/lib/main.dart
+1
-0
未找到文件。
DEPS
浏览文件 @
424940f1
...
...
@@ -121,7 +121,7 @@ allowed_hosts = [
]
deps = {
'src': 'https://github.com/flutter/buildroot.git' + '@' + '
c5afcce6d7972b20eded5b090b489b76622e8ff3
',
'src': 'https://github.com/flutter/buildroot.git' + '@' + '
bc8826aab0fc4f7e17b21f64dec4c8a28ea42e3e
',
# Fuchsia compatibility
#
...
...
@@ -364,7 +364,7 @@ deps = {
Var('chromium_git') + '/external/colorama.git' + '@' + '799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8',
'src/third_party/freetype2':
Var('fuchsia_git') + '/third_party/freetype2' + '@' + '
a10b062df0c8958d69377aa04ea6554a9961a111
',
Var('fuchsia_git') + '/third_party/freetype2' + '@' + '
edab12c07ac05d1185616688f338b1ad15936796
',
'src/third_party/root_certificates':
Var('dart_git') + '/root_certificates.git' + '@' + Var('dart_root_certificates_rev'),
...
...
@@ -381,6 +381,9 @@ deps = {
'src/third_party/wuffs':
Var('fuchsia_git') + '/third_party/wuffs' + '@' + 'a71538baa8f1f4053176c0d9f31bc12fd4e8e71b',
'src/third_party/fontconfig/src':
Var('chromium_git') + '/external/fontconfig.git' + '@' + 'c336b8471877371f0190ba06f7547c54e2b890ba',
'src/third_party/gyp':
Var('chromium_git') + '/external/gyp.git' + '@' + '4801a5331ae62da9769a327f11c4213d32fb0dad',
...
...
ci/licenses_golden/tool_signature
浏览文件 @
424940f1
Signature:
6d315fb6c8e9e949011f57c32b16cb48
Signature:
ab4f82ed4f38f0d3821073855c220992
third_party/txt/BUILD.gn
浏览文件 @
424940f1
...
...
@@ -12,6 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
declare_args() {
flutter_use_fontconfig = false
}
if (flutter_use_fontconfig) {
assert(is_linux)
}
config("txt_config") {
visibility = [ ":*" ]
include_dirs = [ "src" ]
...
...
@@ -24,6 +32,9 @@ source_set("txt") {
if (is_android) {
defines = [ "ANDROID_FONT_MANAGER_AVAILABLE" ]
}
if (flutter_use_fontconfig) {
defines = [ "FONTCONFIG_FONT_MANAGER_AVAILABLE" ]
}
sources = [
"src/log/log.cc",
...
...
@@ -116,6 +127,10 @@ source_set("txt") {
"//third_party/skia",
]
if (flutter_use_fontconfig) {
deps += [ "//third_party/fontconfig" ]
}
if (is_mac || is_ios) {
sources += [ "src/txt/platform_mac.mm" ]
deps += [ "$flutter_root/fml" ]
...
...
third_party/txt/src/txt/platform_linux.cc
浏览文件 @
424940f1
...
...
@@ -4,7 +4,11 @@
#include "txt/platform.h"
#ifdef FONTCONFIG_FONT_MANAGER_AVAILABLE
#include "third_party/skia/include/ports/SkFontMgr_fontconfig.h"
#else
#include "third_party/skia/include/ports/SkFontMgr_directory.h"
#endif
namespace
txt
{
...
...
@@ -13,7 +17,11 @@ std::string GetDefaultFontFamily() {
}
sk_sp
<
SkFontMgr
>
GetDefaultFontManager
()
{
#ifdef FONTCONFIG_FONT_MANAGER_AVAILABLE
return
SkFontMgr_New_FontConfig
(
nullptr
);
#else
return
SkFontMgr_New_Custom_Directory
(
"/usr/share/fonts/"
);
#endif
}
}
// namespace txt
tools/gn
浏览文件 @
424940f1
...
...
@@ -90,7 +90,8 @@ def to_gn_args(args):
gn_args
[
'skia_enable_pdf'
]
=
False
# PDF handling.
gn_args
[
'skia_use_x11'
]
=
False
# Never add the X11 dependency (only takes effect on Linux).
gn_args
[
'skia_use_expat'
]
=
args
.
target_os
==
'android'
gn_args
[
'skia_use_fontconfig'
]
=
False
# Use the custom font manager instead.
gn_args
[
'skia_use_fontconfig'
]
=
args
.
enable_fontconfig
gn_args
[
'flutter_use_fontconfig'
]
=
args
.
enable_fontconfig
gn_args
[
'is_official_build'
]
=
True
# Disable Skia test utilities.
gn_args
[
'dart_component_kind'
]
=
'static_library'
# Always link Dart in statically.
gn_args
[
'is_debug'
]
=
args
.
unoptimized
...
...
@@ -298,6 +299,8 @@ def parse_args(args):
parser
.
add_argument
(
'--enable-vulkan'
,
action
=
'store_true'
,
default
=
False
)
parser
.
add_argument
(
'--enable-metal'
,
action
=
'store_true'
,
default
=
False
)
parser
.
add_argument
(
'--enable-fontconfig'
,
action
=
'store_true'
,
default
=
False
)
parser
.
add_argument
(
'--embedder-for-target'
,
dest
=
'embedder_for_target'
,
action
=
'store_true'
,
default
=
False
)
parser
.
add_argument
(
'--coverage'
,
default
=
False
,
action
=
'store_true'
)
...
...
tools/licenses/lib/main.dart
浏览文件 @
424940f1
...
...
@@ -1752,6 +1752,7 @@ class _RepositoryRootThirdPartyDirectory extends _RepositoryGenericThirdPartyDir
&&
entry
.
name
!=
'android_support'
// build-time only
&&
entry
.
name
!=
'googletest'
// only used by tests
&&
entry
.
name
!=
'skia'
// treated as a separate component
&&
entry
.
name
!=
'fontconfig'
// not used in standard configurations
&&
super
.
shouldRecurse
(
entry
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录