Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
9efddb9d
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看板
提交
9efddb9d
编写于
10月 02, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Treat a base+mark... ligature as base, not ligature
Fixes
https://github.com/harfbuzz/harfbuzz/issues/746
上级
3cca9787
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
7 deletion
+15
-7
src/hb-ot-layout-gsubgpos.hh
src/hb-ot-layout-gsubgpos.hh
+15
-7
未找到文件。
src/hb-ot-layout-gsubgpos.hh
浏览文件 @
9efddb9d
...
@@ -856,7 +856,11 @@ static inline bool ligate_input (hb_ot_apply_context_t *c,
...
@@ -856,7 +856,11 @@ static inline bool ligate_input (hb_ot_apply_context_t *c,
buffer
->
merge_clusters
(
buffer
->
idx
,
buffer
->
idx
+
match_length
);
buffer
->
merge_clusters
(
buffer
->
idx
,
buffer
->
idx
+
match_length
);
/* - If all components of the ligature were marks, we call this a mark ligature.
/* - If a base and one or more marks ligate, consider that as a base, NOT
* ligature, such that all following marks can still attach to it.
* https://github.com/harfbuzz/harfbuzz/issues/1109
*
* - 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
* 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
* 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,
* a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH,
...
@@ -884,21 +888,24 @@ static inline bool ligate_input (hb_ot_apply_context_t *c,
...
@@ -884,21 +888,24 @@ static inline bool ligate_input (hb_ot_apply_context_t *c,
* https://bugzilla.gnome.org/show_bug.cgi?id=437633
* https://bugzilla.gnome.org/show_bug.cgi?id=437633
*/
*/
bool
is_mark_ligature
=
true
;
bool
is_base_ligature
=
_hb_glyph_info_is_base_glyph
(
&
buffer
->
info
[
match_positions
[
0
]]);
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
bool
is_mark_ligature
=
_hb_glyph_info_is_mark
(
&
buffer
->
info
[
match_positions
[
0
]]);
for
(
unsigned
int
i
=
1
;
i
<
count
;
i
++
)
if
(
!
_hb_glyph_info_is_mark
(
&
buffer
->
info
[
match_positions
[
i
]]))
if
(
!
_hb_glyph_info_is_mark
(
&
buffer
->
info
[
match_positions
[
i
]]))
{
{
is_base_ligature
=
false
;
is_mark_ligature
=
false
;
is_mark_ligature
=
false
;
break
;
break
;
}
}
bool
is_ligature
=
!
is_base_ligature
&&
!
is_mark_ligature
;
unsigned
int
klass
=
is_
mark_ligature
?
0
:
HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE
;
unsigned
int
klass
=
is_
ligature
?
HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE
:
0
;
unsigned
int
lig_id
=
is_
mark_ligature
?
0
:
_hb_allocate_lig_id
(
buffer
)
;
unsigned
int
lig_id
=
is_
ligature
?
_hb_allocate_lig_id
(
buffer
)
:
0
;
unsigned
int
last_lig_id
=
_hb_glyph_info_get_lig_id
(
&
buffer
->
cur
());
unsigned
int
last_lig_id
=
_hb_glyph_info_get_lig_id
(
&
buffer
->
cur
());
unsigned
int
last_num_components
=
_hb_glyph_info_get_lig_num_comps
(
&
buffer
->
cur
());
unsigned
int
last_num_components
=
_hb_glyph_info_get_lig_num_comps
(
&
buffer
->
cur
());
unsigned
int
components_so_far
=
last_num_components
;
unsigned
int
components_so_far
=
last_num_components
;
if
(
!
is_mark
_ligature
)
if
(
is
_ligature
)
{
{
_hb_glyph_info_set_lig_props_for_ligature
(
&
buffer
->
cur
(),
lig_id
,
total_component_count
);
_hb_glyph_info_set_lig_props_for_ligature
(
&
buffer
->
cur
(),
lig_id
,
total_component_count
);
if
(
_hb_glyph_info_get_general_category
(
&
buffer
->
cur
())
==
HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK
)
if
(
_hb_glyph_info_get_general_category
(
&
buffer
->
cur
())
==
HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK
)
...
@@ -912,7 +919,8 @@ static inline bool ligate_input (hb_ot_apply_context_t *c,
...
@@ -912,7 +919,8 @@ static inline bool ligate_input (hb_ot_apply_context_t *c,
{
{
while
(
buffer
->
idx
<
match_positions
[
i
]
&&
buffer
->
successful
)
while
(
buffer
->
idx
<
match_positions
[
i
]
&&
buffer
->
successful
)
{
{
if
(
!
is_mark_ligature
)
{
if
(
is_ligature
)
{
unsigned
int
this_comp
=
_hb_glyph_info_get_lig_comp
(
&
buffer
->
cur
());
unsigned
int
this_comp
=
_hb_glyph_info_get_lig_comp
(
&
buffer
->
cur
());
if
(
this_comp
==
0
)
if
(
this_comp
==
0
)
this_comp
=
last_num_components
;
this_comp
=
last_num_components
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录