Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
96eca87f
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看板
提交
96eca87f
编写于
10月 02, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move things
上级
588a4ac8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
12 deletion
+13
-12
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+10
-12
src/hb-ot-shape.hh
src/hb-ot-shape.hh
+3
-0
未找到文件。
src/hb-ot-shape.cc
浏览文件 @
96eca87f
...
...
@@ -62,6 +62,11 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan,
plan
.
has_frac
=
plan
.
frac_mask
||
(
plan
.
numr_mask
&&
plan
.
dnom_mask
);
plan
.
kerning_requested
=
!!
plan
.
kern_mask
;
plan
.
has_gpos_mark
=
!!
plan
.
map
.
get_1_mask
(
HB_TAG
(
'm'
,
'a'
,
'r'
,
'k'
));
bool
disable_otl
=
plan
.
shaper
->
disable_otl
&&
plan
.
shaper
->
disable_otl
(
&
plan
);
//plan.fallback_substitute = disable_otl || !hb_ot_layout_has_substitution (face);
plan
.
fallback_positioning
=
disable_otl
||
!
hb_ot_layout_has_positioning
(
face
);
plan
.
fallback_glyph_classes
=
disable_otl
||
!
hb_ot_layout_has_glyph_classes
(
face
);
}
...
...
@@ -257,8 +262,6 @@ struct hb_ot_shape_context_t
unsigned
int
num_user_features
;
/* Transient stuff */
bool
fallback_positioning
;
bool
fallback_glyph_classes
;
hb_direction_t
target_direction
;
};
...
...
@@ -634,7 +637,7 @@ hb_ot_substitute_default (hb_ot_shape_context_t *c)
hb_ot_shape_setup_masks
(
c
);
/* This is unfortunate to go here, but necessary... */
if
(
c
->
fallback_positioning
)
if
(
c
->
plan
->
fallback_positioning
)
_hb_ot_shape_fallback_position_recategorize_marks
(
c
->
plan
,
c
->
font
,
buffer
);
hb_ot_map_glyphs_fast
(
buffer
);
...
...
@@ -748,7 +751,7 @@ hb_ot_position_complex (hb_ot_shape_context_t *c)
* If fallback positinoing happens or GPOS is present, we don't
* care.
*/
bool
adjust_offsets_when_zeroing
=
c
->
fallback_positioning
&&
bool
adjust_offsets_when_zeroing
=
c
->
plan
->
fallback_positioning
&&
!
c
->
plan
->
shaper
->
fallback_position
&&
HB_DIRECTION_IS_FORWARD
(
c
->
buffer
->
props
.
direction
);
...
...
@@ -775,7 +778,7 @@ hb_ot_position_complex (hb_ot_shape_context_t *c)
break
;
}
if
(
likely
(
!
c
->
fallback_positioning
))
if
(
likely
(
!
c
->
plan
->
fallback_positioning
))
c
->
plan
->
position
(
c
->
font
,
c
->
buffer
);
switch
(
c
->
plan
->
shaper
->
zero_width_marks
)
...
...
@@ -812,7 +815,7 @@ hb_ot_position (hb_ot_shape_context_t *c)
hb_ot_position_complex
(
c
);
if
(
c
->
fallback_positioning
&&
c
->
plan
->
shaper
->
fallback_position
)
if
(
c
->
plan
->
fallback_positioning
&&
c
->
plan
->
shaper
->
fallback_position
)
_hb_ot_shape_fallback_position
(
c
->
plan
,
c
->
font
,
c
->
buffer
);
if
(
HB_DIRECTION_IS_BACKWARD
(
c
->
buffer
->
props
.
direction
))
...
...
@@ -820,7 +823,7 @@ hb_ot_position (hb_ot_shape_context_t *c)
/* Visual fallback goes here. */
if
(
c
->
fallback_positioning
)
if
(
c
->
plan
->
fallback_positioning
)
_hb_ot_shape_fallback_kern
(
c
->
plan
,
c
->
font
,
c
->
buffer
);
_hb_buffer_deallocate_gsubgpos_vars
(
c
->
buffer
);
...
...
@@ -872,11 +875,6 @@ hb_ot_shape_internal (hb_ot_shape_context_t *c)
(
unsigned
)
HB_BUFFER_MAX_OPS_MIN
);
}
bool
disable_otl
=
c
->
plan
->
shaper
->
disable_otl
&&
c
->
plan
->
shaper
->
disable_otl
(
c
->
plan
);
//c->fallback_substitute = disable_otl || !hb_ot_layout_has_substitution (c->face);
c
->
fallback_positioning
=
disable_otl
||
!
hb_ot_layout_has_positioning
(
c
->
face
);
c
->
fallback_glyph_classes
=
disable_otl
||
!
hb_ot_layout_has_glyph_classes
(
c
->
face
);
/* Save the original direction, we use it later. */
c
->
target_direction
=
c
->
buffer
->
props
.
direction
;
...
...
src/hb-ot-shape.hh
浏览文件 @
96eca87f
...
...
@@ -42,9 +42,12 @@ struct hb_ot_shape_plan_t
const
void
*
data
;
hb_mask_t
rtlm_mask
,
frac_mask
,
numr_mask
,
dnom_mask
;
hb_mask_t
kern_mask
;
bool
has_frac
:
1
;
bool
kerning_requested
:
1
;
bool
has_gpos_mark
:
1
;
bool
fallback_positioning
:
1
;
bool
fallback_glyph_classes
:
1
;
inline
void
collect_lookups
(
hb_tag_t
table_tag
,
hb_set_t
*
lookups
)
const
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录