Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
d1be805e
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
接近 2 年 前同步成功
通知
1
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看板
提交
d1be805e
编写于
10月 10, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More rewriting plan compile
Hopefully more clear.
上级
961ab46b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
39 addition
and
17 deletion
+39
-17
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+39
-16
src/hb-ot-shape.hh
src/hb-ot-shape.hh
+0
-1
未找到文件。
src/hb-ot-shape.cc
浏览文件 @
d1be805e
...
...
@@ -59,29 +59,54 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan,
hb_tag_t
kern_tag
=
HB_DIRECTION_IS_HORIZONTAL
(
plan
.
props
.
direction
)
?
HB_TAG
(
'k'
,
'e'
,
'r'
,
'n'
)
:
HB_TAG
(
'v'
,
'k'
,
'r'
,
'n'
);
plan
.
kern_mask
=
plan
.
map
.
get_mask
(
kern_tag
);
plan
.
kerning_requested
=
!!
plan
.
kern_mask
;
bool
kerning_requested
=
!!
plan
.
kern_mask
;
bool
has_gpos_kern
=
plan
.
map
.
get_feature_index
(
0
,
kern_tag
)
!=
HB_OT_LAYOUT_NO_FEATURE_INDEX
;
bool
disable_gpos
=
plan
.
shaper
->
gpos_tag
&&
plan
.
shaper
->
gpos_tag
!=
plan
.
map
.
chosen_script
[
1
];
/* Decide who provides glyph classes. GDEF or Unicode. */
plan
.
fallback_glyph_classes
=
!
hb_ot_layout_has_glyph_classes
(
face
);
/*
* Decide who provides glyph classes. GDEF or Unicode.
*/
if
(
!
hb_ot_layout_has_glyph_classes
(
face
))
plan
.
fallback_glyph_classes
=
true
;
/*
* Decide who does substitutions. GSUB, morx, or fallback.
*/
/* Decide who does substitutions. GSUB, morx, or fallback. */
plan
.
apply_morx
=
!
hb_ot_layout_has_substitution
(
face
)
&&
hb_aat_layout_has_substitution
(
face
);
if
(
!
hb_ot_layout_has_substitution
(
face
))
{
/* No GSUB. */
if
(
hb_aat_layout_has_substitution
(
face
))
plan
.
apply_morx
=
true
;
}
/* Decide who does positioning. GPOS, kerx, kern, or fallback. */
plan
.
apply_gpos
=
!
disable_gpos
&&
hb_ot_layout_has_positioning
(
face
);
plan
.
apply_kerx
=
!
plan
.
apply_gpos
&&
hb_aat_layout_has_positioning
(
face
);
/*
* Decide who does positioning. GPOS, kerx, kern, or fallback.
*/
plan
.
apply_kern
=
!
has_gpos_kern
&&
!
plan
.
apply_kerx
&&
hb_ot_layout_has_kerning
(
face
);
plan
.
fallback_kerning
=
!
has_gpos_kern
&&
!
plan
.
apply_kerx
&&
!
plan
.
apply_kern
;
if
(
!
disable_gpos
&&
hb_ot_layout_has_positioning
(
face
))
plan
.
apply_gpos
=
true
;
else
if
(
hb_aat_layout_has_positioning
(
face
))
plan
.
apply_kerx
=
true
;
if
(
kerning_requested
)
{
if
(
plan
.
apply_kerx
)
;
/* kerx supercedes kern. */
else
if
(
!
has_gpos_kern
)
{
if
(
hb_ot_layout_has_kerning
(
face
))
plan
.
apply_kern
=
true
;
else
plan
.
fallback_kerning
=
true
;
}
}
plan
.
has_gpos_mark
=
!!
plan
.
map
.
get_1_mask
(
HB_TAG
(
'm'
,
'a'
,
'r'
,
'k'
));
plan
.
fallback_mark_positioning
=
!
plan
.
apply_gpos
;
if
(
!
plan
.
apply_gpos
)
plan
.
fallback_mark_positioning
=
true
;
}
...
...
@@ -844,9 +869,7 @@ hb_ot_position (const hb_ot_shape_context_t *c)
/* Visual fallback goes here. */
if
(
!
c
->
plan
->
kerning_requested
)
;
else
if
(
c
->
plan
->
apply_kern
)
if
(
c
->
plan
->
apply_kern
)
hb_ot_layout_kern
(
c
->
font
,
c
->
buffer
,
c
->
plan
->
kern_mask
);
else
if
(
c
->
plan
->
fallback_kerning
)
_hb_ot_shape_fallback_kern
(
c
->
plan
,
c
->
font
,
c
->
buffer
);
...
...
src/hb-ot-shape.hh
浏览文件 @
d1be805e
...
...
@@ -44,7 +44,6 @@ struct hb_ot_shape_plan_t
hb_mask_t
kern_mask
;
bool
has_frac
:
1
;
bool
kerning_requested
:
1
;
bool
has_gpos_mark
:
1
;
bool
fallback_glyph_classes
:
1
;
bool
fallback_kerning
:
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录