Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
03fb6dd4
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看板
提交
03fb6dd4
编写于
10月 03, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rewrite grapheme-formation in terms of new work
Also, don't attach ZWNJ to previous cluster. Closer to Unicode graphemes.
上级
68106b1d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
40 deletion
+18
-40
src/hb-coretext.cc
src/hb-coretext.cc
+1
-1
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+13
-35
test/shaping/data/in-house/tests/indic-joiner-candrabindu.tests
...haping/data/in-house/tests/indic-joiner-candrabindu.tests
+1
-1
test/shaping/data/in-house/tests/indic-joiners.tests
test/shaping/data/in-house/tests/indic-joiners.tests
+3
-3
未找到文件。
src/hb-coretext.cc
浏览文件 @
03fb6dd4
...
@@ -626,7 +626,7 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
...
@@ -626,7 +626,7 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
CGFloat
y_mult
=
(
CGFloat
)
font
->
y_scale
/
ct_font_size
;
CGFloat
y_mult
=
(
CGFloat
)
font
->
y_scale
/
ct_font_size
;
/* Attach marks to their bases, to match the 'ot' shaper.
/* Attach marks to their bases, to match the 'ot' shaper.
* Adapted from hb-ot-shape:hb_form_clusters().
* Adapted from
a very old version of
hb-ot-shape:hb_form_clusters().
* Note that this only makes us be closer to the 'ot' shaper,
* Note that this only makes us be closer to the 'ot' shaper,
* but by no means the same. For example, if there's
* but by no means the same. For example, if there's
* B1 M1 B2 M2, and B1-B2 form a ligature, M2's cluster will
* B1 M1 B2 M2, and B1-B2 form a ligature, M2's cluster will
...
...
src/hb-ot-shape.cc
浏览文件 @
03fb6dd4
...
@@ -339,26 +339,12 @@ hb_form_clusters (hb_buffer_t *buffer)
...
@@ -339,26 +339,12 @@ hb_form_clusters (hb_buffer_t *buffer)
if
(
!
(
buffer
->
scratch_flags
&
HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII
))
if
(
!
(
buffer
->
scratch_flags
&
HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII
))
return
;
return
;
/* Loop duplicated in hb_ensure_native_direction(), and in _hb-coretext.cc */
unsigned
int
base
=
0
;
unsigned
int
count
=
buffer
->
len
;
hb_glyph_info_t
*
info
=
buffer
->
info
;
for
(
unsigned
int
i
=
1
;
i
<
count
;
i
++
)
{
if
(
likely
(
!
HB_UNICODE_GENERAL_CATEGORY_IS_MARK
(
_hb_glyph_info_get_general_category
(
&
info
[
i
]))
&&
!
_hb_glyph_info_is_joiner
(
&
info
[
i
])))
{
if
(
buffer
->
cluster_level
==
HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES
)
buffer
->
merge_clusters
(
base
,
i
);
else
buffer
->
unsafe_to_break
(
base
,
i
);
base
=
i
;
}
}
if
(
buffer
->
cluster_level
==
HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES
)
if
(
buffer
->
cluster_level
==
HB_BUFFER_CLUSTER_LEVEL_MONOTONE_GRAPHEMES
)
buffer
->
merge_clusters
(
base
,
count
);
foreach_grapheme
(
buffer
,
start
,
end
)
buffer
->
merge_clusters
(
start
,
end
);
else
else
buffer
->
unsafe_to_break
(
base
,
count
);
foreach_grapheme
(
buffer
,
start
,
end
)
buffer
->
unsafe_to_break
(
start
,
end
);
}
}
static
void
static
void
...
@@ -376,25 +362,17 @@ hb_ensure_native_direction (hb_buffer_t *buffer)
...
@@ -376,25 +362,17 @@ hb_ensure_native_direction (hb_buffer_t *buffer)
(
HB_DIRECTION_IS_VERTICAL
(
direction
)
&&
(
HB_DIRECTION_IS_VERTICAL
(
direction
)
&&
direction
!=
HB_DIRECTION_TTB
))
direction
!=
HB_DIRECTION_TTB
))
{
{
/* Same loop as hb_form_clusters().
* Since form_clusters() merged clusters already, we don't merge. */
unsigned
int
base
=
0
;
unsigned
int
count
=
buffer
->
len
;
hb_glyph_info_t
*
info
=
buffer
->
info
;
for
(
unsigned
int
i
=
1
;
i
<
count
;
i
++
)
{
if
(
likely
(
!
HB_UNICODE_GENERAL_CATEGORY_IS_MARK
(
_hb_glyph_info_get_general_category
(
&
info
[
i
]))))
{
if
(
buffer
->
cluster_level
==
HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS
)
buffer
->
merge_clusters
(
base
,
i
);
buffer
->
reverse_range
(
base
,
i
);
base
=
i
;
}
}
if
(
buffer
->
cluster_level
==
HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS
)
if
(
buffer
->
cluster_level
==
HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS
)
buffer
->
merge_clusters
(
base
,
count
);
foreach_grapheme
(
buffer
,
start
,
end
)
buffer
->
reverse_range
(
base
,
count
);
{
buffer
->
merge_clusters
(
start
,
end
);
buffer
->
reverse_range
(
start
,
end
);
}
else
foreach_grapheme
(
buffer
,
start
,
end
)
/* form_clusters() merged clusters already, we don't merge. */
buffer
->
reverse_range
(
start
,
end
);
buffer
->
reverse
();
buffer
->
reverse
();
...
...
test/shaping/data/in-house/tests/indic-joiner-candrabindu.tests
浏览文件 @
03fb6dd4
../fonts/5028afb650b1bb718ed2131e872fbcce57828fff.ttf::U+0B13,U+200D,U+0B01:[omorya=0+1450]
../fonts/5028afb650b1bb718ed2131e872fbcce57828fff.ttf::U+0B13,U+200D,U+0B01:[omorya=0+1450]
../fonts/5028afb650b1bb718ed2131e872fbcce57828fff.ttf::U+0B13,U+200C,U+0B01:[oorya=0+1309|space=
0+0|candrabinduorya=0
+0]
../fonts/5028afb650b1bb718ed2131e872fbcce57828fff.ttf::U+0B13,U+200C,U+0B01:[oorya=0+1309|space=
1+0|candrabinduorya=1
+0]
test/shaping/data/in-house/tests/indic-joiners.tests
浏览文件 @
03fb6dd4
../fonts/f443753e8ffe8e8aae606cfba158e00334b6efb1.ttf::U+179A,U+1784,U+17D2,U+179F,U+200C,U+17CA,U+17B8,U+0020:[uni179a=0+775|uni1784=1+1550|uni179f.sub=1+775|space=
1+0|uni17ca=1+0|uni17b8=1
@0,300+0|space=7+600]
../fonts/f443753e8ffe8e8aae606cfba158e00334b6efb1.ttf::U+179A,U+1784,U+17D2,U+179F,U+200C,U+17CA,U+17B8,U+0020:[uni179a=0+775|uni1784=1+1550|uni179f.sub=1+775|space=
4+0|uni17ca=4+0|uni17b8=4
@0,300+0|space=7+600]
../fonts/f443753e8ffe8e8aae606cfba158e00334b6efb1.ttf::U+179A,U+1784,U+17D2,U+179F,U+17CA,U+17B8:[uni179a=0+775|uni1784=1+1550|uni179f.sub=1+775|uni17bb=1@-75,-700+0|uni17b8=1+0]
../fonts/f443753e8ffe8e8aae606cfba158e00334b6efb1.ttf::U+179A,U+1784,U+17D2,U+179F,U+17CA,U+17B8:[uni179a=0+775|uni1784=1+1550|uni179f.sub=1+775|uni17bb=1@-75,-700+0|uni17b8=1+0]
../fonts/8116e5d8fedfbec74e45dc350d2416d810bed8c4.ttf:--font-funcs=ft:U+091F,U+094D,U+200C,U+092F,U+093F:[uni091F=0+876|uni094D=0@4,0+0|space=
0
+0|uni093F.750=3+397|uni092F=3+924]
../fonts/8116e5d8fedfbec74e45dc350d2416d810bed8c4.ttf:--font-funcs=ft:U+091F,U+094D,U+200C,U+092F,U+093F:[uni091F=0+876|uni094D=0@4,0+0|space=
2
+0|uni093F.750=3+397|uni092F=3+924]
../fonts/8116e5d8fedfbec74e45dc350d2416d810bed8c4.ttf:--font-funcs=ft:U+091F,U+094D,U+200D,U+092F,U+093F:[uni093F=0+398|uni091F=0+876|uni094D=0@4,0+0|space=0+0|uni092F=0+924]
../fonts/8116e5d8fedfbec74e45dc350d2416d810bed8c4.ttf:--font-funcs=ft:U+091F,U+094D,U+200D,U+092F,U+093F:[uni093F=0+398|uni091F=0+876|uni094D=0@4,0+0|space=0+0|uni092F=0+924]
../fonts/8116e5d8fedfbec74e45dc350d2416d810bed8c4.ttf:--font-funcs=ft:U+091F,U+094D,U+200D,U+091F,U+094D,U+200C,U+091F,U+094D,U+200D,U+092F,U+093F:[uni091F=0+876|uni094D=0@4,0+0|space=0+0|uni091F=3+876|uni094D=3@4,0+0|space=
3
+0|uni093F=6+398|uni091F=6+876|uni094D=6@4,0+0|space=6+0|uni092F=6+924]
../fonts/8116e5d8fedfbec74e45dc350d2416d810bed8c4.ttf:--font-funcs=ft:U+091F,U+094D,U+200D,U+091F,U+094D,U+200C,U+091F,U+094D,U+200D,U+092F,U+093F:[uni091F=0+876|uni094D=0@4,0+0|space=0+0|uni091F=3+876|uni094D=3@4,0+0|space=
5
+0|uni093F=6+398|uni091F=6+876|uni094D=6@4,0+0|space=6+0|uni092F=6+924]
../fonts/8116e5d8fedfbec74e45dc350d2416d810bed8c4.ttf:--font-funcs=ft:U+091F,U+094D,U+200D,U+091F,U+094D,U+200D,U+091F,U+094D,U+200D,U+092F,U+093F:[uni093F=0+398|uni091F=0+876|uni094D=0@4,0+0|space=0+0|uni091F=0+876|uni094D=0@4,0+0|space=0+0|uni091F=0+876|uni094D=0@4,0+0|space=0+0|uni092F=0+924]
../fonts/8116e5d8fedfbec74e45dc350d2416d810bed8c4.ttf:--font-funcs=ft:U+091F,U+094D,U+200D,U+091F,U+094D,U+200D,U+091F,U+094D,U+200D,U+092F,U+093F:[uni093F=0+398|uni091F=0+876|uni094D=0@4,0+0|space=0+0|uni091F=0+876|uni094D=0@4,0+0|space=0+0|uni091F=0+876|uni094D=0@4,0+0|space=0+0|uni092F=0+924]
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录