Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
74e0c13a
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
大约 1 年 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
74e0c13a
编写于
2月 21, 2018
作者:
R
Rod Sheeter
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[subset] drop hint tables if so flagged. Still need to dump glyf instructions.
上级
0bd100e1
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
17 addition
and
7 deletion
+17
-7
src/hb-subset-plan.cc
src/hb-subset-plan.cc
+1
-0
src/hb-subset-plan.hh
src/hb-subset-plan.hh
+2
-0
src/hb-subset-private.hh
src/hb-subset-private.hh
+1
-1
src/hb-subset.cc
src/hb-subset.cc
+9
-2
util/hb-subset.cc
util/hb-subset.cc
+1
-1
util/options.cc
util/options.cc
+1
-1
util/options.hh
util/options.hh
+2
-2
未找到文件。
src/hb-subset-plan.cc
浏览文件 @
74e0c13a
...
...
@@ -191,6 +191,7 @@ hb_subset_plan_create (hb_face_t *face,
plan
->
gids_to_retain_sorted
.
init
();
plan
->
source
=
hb_face_reference
(
face
);
plan
->
dest
=
hb_subset_face_create
();
plan
->
drop_hints
=
input
->
drop_hints
;
_populate_codepoints
(
input
->
unicodes
,
plan
->
codepoints
);
_populate_gids_to_retain
(
face
,
...
...
src/hb-subset-plan.hh
浏览文件 @
74e0c13a
...
...
@@ -37,6 +37,8 @@ struct hb_subset_plan_t {
hb_object_header_t
header
;
ASSERT_POD
();
hb_bool_t
drop_hints
;
// TODO(Q1) actual map, drop this crap
// Look at me ma, I'm a poor mans map codepoint : new gid
// codepoints is sorted and aligned with gids_to_retain.
...
...
src/hb-subset-private.hh
浏览文件 @
74e0c13a
...
...
@@ -43,7 +43,7 @@ struct hb_subset_input_t {
hb_set_t
*
unicodes
;
hb_set_t
*
glyphs
;
hb_bool_t
retain
_hints
;
hb_bool_t
drop
_hints
;
/* TODO
*
* features
...
...
src/hb-subset.cc
浏览文件 @
74e0c13a
...
...
@@ -268,9 +268,16 @@ _subset_table (hb_subset_plan_t *plan,
}
static
bool
_should_drop_table
(
hb_tag_t
tag
)
_should_drop_table
(
hb_
subset_plan_t
*
plan
,
hb_
tag_t
tag
)
{
switch
(
tag
)
{
case
HB_TAG
(
'c'
,
'v'
,
'a'
,
'r'
):
/* hint table, fallthrough */
case
HB_TAG
(
'c'
,
'v'
,
't'
,
' '
):
/* hint table, fallthrough */
case
HB_TAG
(
'f'
,
'p'
,
'g'
,
'm'
):
/* hint table, fallthrough */
case
HB_TAG
(
'p'
,
'r'
,
'e'
,
'p'
):
/* hint table, fallthrough */
case
HB_TAG
(
'h'
,
'd'
,
'm'
,
'x'
):
/* hint table, fallthrough */
case
HB_TAG
(
'V'
,
'D'
,
'M'
,
'X'
):
/* hint table, fallthrough */
return
plan
->
drop_hints
;
case
HB_TAG
(
'G'
,
'D'
,
'E'
,
'F'
):
/* temporary */
case
HB_TAG
(
'G'
,
'P'
,
'O'
,
'S'
):
/* temporary */
case
HB_TAG
(
'G'
,
'S'
,
'U'
,
'B'
):
/* temporary */
...
...
@@ -307,7 +314,7 @@ hb_subset (hb_face_t *source,
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
hb_tag_t
tag
=
table_tags
[
i
];
if
(
_should_drop_table
(
tag
))
if
(
_should_drop_table
(
plan
,
tag
))
{
DEBUG_MSG
(
SUBSET
,
nullptr
,
"drop %c%c%c%c"
,
HB_UNTAG
(
tag
));
continue
;
...
...
util/hb-subset.cc
浏览文件 @
74e0c13a
...
...
@@ -90,7 +90,7 @@ struct subset_consumer_t
void
finish
(
const
font_options_t
*
font_opts
)
{
input
->
retain_hints
=
subset_options
.
hinting
;
input
->
drop_hints
=
subset_options
.
drop_hints
;
hb_subset_profile_t
*
subset_profile
=
hb_subset_profile_create
();
hb_face_t
*
face
=
hb_font_get_face
(
font
);
...
...
util/options.cc
浏览文件 @
74e0c13a
...
...
@@ -992,7 +992,7 @@ subset_options_t::add_options (option_parser_t *parser)
{
GOptionEntry
entries
[]
=
{
{
"
hinting"
,
0
,
0
,
G_OPTION_ARG_NONE
,
&
this
->
hinting
,
"Whether to retain or
drop hints"
,
nullptr
},
{
"
no-hinting"
,
0
,
0
,
G_OPTION_ARG_NONE
,
&
this
->
drop_hints
,
"Whether to
drop hints"
,
nullptr
},
{
nullptr
}
};
parser
->
add_group
(
entries
,
...
...
util/options.hh
浏览文件 @
74e0c13a
...
...
@@ -653,14 +653,14 @@ struct subset_options_t : option_group_t
{
subset_options_t
(
option_parser_t
*
parser
)
{
hinting
=
tru
e
;
drop_hints
=
fals
e
;
add_options
(
parser
);
}
void
add_options
(
option_parser_t
*
parser
);
hb_bool_t
hinting
;
hb_bool_t
drop_hints
;
};
/* fallback implementation for scalbn()/scalbnf() for pre-2013 MSVC */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录