Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
3cca9787
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看板
提交
3cca9787
编写于
10月 02, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move code around
上级
0a371fee
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
14 deletion
+11
-14
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsub-table.hh
+0
-3
src/hb-ot-layout-gsubgpos.hh
src/hb-ot-layout-gsubgpos.hh
+11
-11
未找到文件。
src/hb-ot-layout-gsub-table.hh
浏览文件 @
3cca9787
...
...
@@ -762,7 +762,6 @@ struct Ligature
return_trace
(
true
);
}
bool
is_mark_ligature
=
false
;
unsigned
int
total_component_count
=
0
;
unsigned
int
match_length
=
0
;
...
...
@@ -774,7 +773,6 @@ struct Ligature
nullptr
,
&
match_length
,
match_positions
,
&
is_mark_ligature
,
&
total_component_count
)))
return_trace
(
false
);
...
...
@@ -783,7 +781,6 @@ struct Ligature
match_positions
,
match_length
,
ligGlyph
,
is_mark_ligature
,
total_component_count
);
return_trace
(
true
);
...
...
src/hb-ot-layout-gsubgpos.hh
浏览文件 @
3cca9787
...
...
@@ -731,7 +731,6 @@ static inline bool match_input (hb_ot_apply_context_t *c,
const
void
*
match_data
,
unsigned
int
*
end_offset
,
unsigned
int
match_positions
[
HB_MAX_CONTEXT_LENGTH
],
bool
*
p_is_mark_ligature
=
nullptr
,
unsigned
int
*
p_total_component_count
=
nullptr
)
{
TRACE_APPLY
(
nullptr
);
...
...
@@ -768,8 +767,6 @@ static inline bool match_input (hb_ot_apply_context_t *c,
* https://github.com/harfbuzz/harfbuzz/issues/545
*/
bool
is_mark_ligature
=
_hb_glyph_info_is_mark
(
&
buffer
->
cur
());
unsigned
int
total_component_count
=
0
;
total_component_count
+=
_hb_glyph_info_get_lig_num_comps
(
&
buffer
->
cur
());
...
...
@@ -836,15 +833,11 @@ static inline bool match_input (hb_ot_apply_context_t *c,
return_trace
(
false
);
}
is_mark_ligature
=
is_mark_ligature
&&
_hb_glyph_info_is_mark
(
&
buffer
->
info
[
skippy_iter
.
idx
]);
total_component_count
+=
_hb_glyph_info_get_lig_num_comps
(
&
buffer
->
info
[
skippy_iter
.
idx
]);
}
*
end_offset
=
skippy_iter
.
idx
-
buffer
->
idx
+
1
;
if
(
p_is_mark_ligature
)
*
p_is_mark_ligature
=
is_mark_ligature
;
if
(
p_total_component_count
)
*
p_total_component_count
=
total_component_count
;
...
...
@@ -855,7 +848,6 @@ static inline bool ligate_input (hb_ot_apply_context_t *c,
unsigned
int
match_positions
[
HB_MAX_CONTEXT_LENGTH
],
/* Including the first glyph */
unsigned
int
match_length
,
hb_codepoint_t
lig_glyph
,
bool
is_mark_ligature
,
unsigned
int
total_component_count
)
{
TRACE_APPLY
(
nullptr
);
...
...
@@ -864,11 +856,11 @@ static inline bool ligate_input (hb_ot_apply_context_t *c,
buffer
->
merge_clusters
(
buffer
->
idx
,
buffer
->
idx
+
match_length
);
/*
*
-
If it *is* a mark ligature, we don't allocate a new ligature id, and leave
/*
- If all components of the ligature were marks, we call this a mark ligature.
*
If it *is* a mark ligature, we don't allocate a new ligature id, and leave
* the ligature to keep its old ligature id. This will allow it to attach to
* a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH,
* and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA wit a
* and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA wit
h
a
* ligature id and component value of 2. Then if SHADDA,FATHA form a ligature
* later, we don't want them to lose their ligature id/component, otherwise
* GPOS will fail to correctly position the mark ligature on top of the
...
...
@@ -892,6 +884,14 @@ static inline bool ligate_input (hb_ot_apply_context_t *c,
* https://bugzilla.gnome.org/show_bug.cgi?id=437633
*/
bool
is_mark_ligature
=
true
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
if
(
!
_hb_glyph_info_is_mark
(
&
buffer
->
info
[
match_positions
[
i
]]))
{
is_mark_ligature
=
false
;
break
;
}
unsigned
int
klass
=
is_mark_ligature
?
0
:
HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE
;
unsigned
int
lig_id
=
is_mark_ligature
?
0
:
_hb_allocate_lig_id
(
buffer
);
unsigned
int
last_lig_id
=
_hb_glyph_info_get_lig_id
(
&
buffer
->
cur
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录