Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
a1394a28
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看板
提交
a1394a28
编写于
5月 12, 2019
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[config] Add HB_NO_UNISCRIBE_BUG_COMPATIBLE
Part of
https://github.com/harfbuzz/harfbuzz/issues/1652
上级
dba1ac1b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
6 deletion
+22
-6
src/hb-config.hh
src/hb-config.hh
+4
-0
src/hb-ot-shape-complex-indic.cc
src/hb-ot-shape-complex-indic.cc
+18
-6
未找到文件。
src/hb-config.hh
浏览文件 @
a1394a28
...
@@ -82,6 +82,10 @@
...
@@ -82,6 +82,10 @@
#define HB_NO_SUBSET_CFF
#define HB_NO_SUBSET_CFF
#endif
#endif
#ifdef HB_NO_GETENV
#define HB_NO_UNISCRIBE_BUG_COMPATIBLE
#endif
#ifdef HB_NO_LEGACY
#ifdef HB_NO_LEGACY
#define HB_NO_OT_LAYOUT_BLACKLIST
#define HB_NO_OT_LAYOUT_BLACKLIST
#define HB_NO_OT_SHAPE_FALLBACK
#define HB_NO_OT_SHAPE_FALLBACK
...
...
src/hb-ot-shape-complex-indic.cc
浏览文件 @
a1394a28
...
@@ -274,7 +274,9 @@ struct indic_shape_plan_t
...
@@ -274,7 +274,9 @@ struct indic_shape_plan_t
const
indic_config_t
*
config
;
const
indic_config_t
*
config
;
bool
is_old_spec
;
bool
is_old_spec
;
#ifndef HB_NO_UNISCRIBE_BUG_COMPATIBLE
bool
uniscribe_bug_compatible
;
bool
uniscribe_bug_compatible
;
#endif
mutable
hb_atomic_int_t
virama_glyph
;
mutable
hb_atomic_int_t
virama_glyph
;
would_substitute_feature_t
rphf
;
would_substitute_feature_t
rphf
;
...
@@ -300,7 +302,9 @@ data_create_indic (const hb_ot_shape_plan_t *plan)
...
@@ -300,7 +302,9 @@ data_create_indic (const hb_ot_shape_plan_t *plan)
}
}
indic_plan
->
is_old_spec
=
indic_plan
->
config
->
has_old_spec
&&
((
plan
->
map
.
chosen_script
[
0
]
&
0x000000FFu
)
!=
'2'
);
indic_plan
->
is_old_spec
=
indic_plan
->
config
->
has_old_spec
&&
((
plan
->
map
.
chosen_script
[
0
]
&
0x000000FFu
)
!=
'2'
);
#ifndef HB_NO_UNISCRIBE_BUG_COMPATIBLE
indic_plan
->
uniscribe_bug_compatible
=
hb_options
().
uniscribe_bug_compatible
;
indic_plan
->
uniscribe_bug_compatible
=
hb_options
().
uniscribe_bug_compatible
;
#endif
indic_plan
->
virama_glyph
.
set_relaxed
(
-
1
);
indic_plan
->
virama_glyph
.
set_relaxed
(
-
1
);
/* Use zero-context would_substitute() matching for new-spec of the main
/* Use zero-context would_substitute() matching for new-spec of the main
...
@@ -918,11 +922,11 @@ initial_reordering_standalone_cluster (const hb_ot_shape_plan_t *plan,
...
@@ -918,11 +922,11 @@ initial_reordering_standalone_cluster (const hb_ot_shape_plan_t *plan,
hb_buffer_t
*
buffer
,
hb_buffer_t
*
buffer
,
unsigned
int
start
,
unsigned
int
end
)
unsigned
int
start
,
unsigned
int
end
)
{
{
const
indic_shape_plan_t
*
indic_plan
=
(
const
indic_shape_plan_t
*
)
plan
->
data
;
/* We treat placeholder/dotted-circle as if they are consonants, so we
/* We treat placeholder/dotted-circle as if they are consonants, so we
* should just chain. Only if not in compatibility mode that is... */
* should just chain. Only if not in compatibility mode that is... */
#ifndef HB_NO_UNISCRIBE_BUG_COMPATIBLE
const
HB_UNUSED
indic_shape_plan_t
*
indic_plan
=
(
const
indic_shape_plan_t
*
)
plan
->
data
;
if
(
indic_plan
->
uniscribe_bug_compatible
)
if
(
indic_plan
->
uniscribe_bug_compatible
)
{
{
/* For dotted-circle, this is what Uniscribe does:
/* For dotted-circle, this is what Uniscribe does:
...
@@ -931,6 +935,7 @@ initial_reordering_standalone_cluster (const hb_ot_shape_plan_t *plan,
...
@@ -931,6 +935,7 @@ initial_reordering_standalone_cluster (const hb_ot_shape_plan_t *plan,
if
(
buffer
->
info
[
end
-
1
].
indic_category
()
==
OT_DOTTEDCIRCLE
)
if
(
buffer
->
info
[
end
-
1
].
indic_category
()
==
OT_DOTTEDCIRCLE
)
return
;
return
;
}
}
#endif
initial_reordering_consonant_syllable
(
plan
,
face
,
buffer
,
start
,
end
);
initial_reordering_consonant_syllable
(
plan
,
face
,
buffer
,
start
,
end
);
}
}
...
@@ -1370,14 +1375,18 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
...
@@ -1370,14 +1375,18 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
* Uniscribe doesn't do this.
* Uniscribe doesn't do this.
* TEST: U+0930,U+094D,U+0915,U+094B,U+094D
* TEST: U+0930,U+094D,U+0915,U+094B,U+094D
*/
*/
#ifndef HB_NO_UNISCRIBE_BUG_COMPATIBLE
if
(
!
indic_plan
->
uniscribe_bug_compatible
&&
if
(
!
indic_plan
->
uniscribe_bug_compatible
&&
unlikely
(
is_halant
(
info
[
new_reph_pos
])))
{
unlikely
(
is_halant
(
info
[
new_reph_pos
])))
{
for
(
unsigned
int
i
=
base
+
1
;
i
<
new_reph_pos
;
i
++
)
for
(
unsigned
int
i
=
base
+
1
;
i
<
new_reph_pos
;
i
++
)
if
(
info
[
i
].
indic_category
()
==
OT_M
)
{
if
(
info
[
i
].
indic_category
()
==
OT_M
)
{
/* Ok, got it. */
/* Ok, got it. */
new_reph_pos
--
;
new_reph_pos
--
;
}
}
}
}
#endif
goto
reph_move
;
goto
reph_move
;
}
}
...
@@ -1476,6 +1485,7 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
...
@@ -1476,6 +1485,7 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
/*
/*
* Finish off the clusters and go home!
* Finish off the clusters and go home!
*/
*/
#ifndef HB_NO_UNISCRIBE_BUG_COMPATIBLE
if
(
indic_plan
->
uniscribe_bug_compatible
)
if
(
indic_plan
->
uniscribe_bug_compatible
)
{
{
switch
((
hb_tag_t
)
plan
->
props
.
script
)
switch
((
hb_tag_t
)
plan
->
props
.
script
)
...
@@ -1493,6 +1503,7 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
...
@@ -1493,6 +1503,7 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
break
;
break
;
}
}
}
}
#endif
}
}
...
@@ -1590,11 +1601,11 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c,
...
@@ -1590,11 +1601,11 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c,
* https://docs.microsoft.com/en-us/typography/script-development/sinhala#shaping
* https://docs.microsoft.com/en-us/typography/script-development/sinhala#shaping
*/
*/
const
indic_shape_plan_t
*
indic_plan
=
(
const
indic_shape_plan_t
*
)
c
->
plan
->
data
;
#ifndef HB_NO_UNISCRIBE_BUG_COMPATIBLE
const
indic_shape_plan_t
*
indic_plan
=
(
const
indic_shape_plan_t
*
)
c
->
plan
->
data
;
hb_codepoint_t
glyph
;
hb_codepoint_t
glyph
;
if
(
indic_plan
->
uniscribe_bug_compatible
||
if
(
hb_options
().
uniscribe_bug_compatible
||
(
c
->
font
->
get_nominal_glyph
(
ab
,
&
glyph
)
&&
(
c
->
font
->
get_nominal_glyph
(
ab
,
&
glyph
)
&&
indic_plan
->
pstf
.
would_substitute
(
&
glyph
,
1
,
c
->
font
->
face
)))
indic_plan
->
pstf
.
would_substitute
(
&
glyph
,
1
,
c
->
font
->
face
)))
{
{
...
@@ -1603,6 +1614,7 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c,
...
@@ -1603,6 +1614,7 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c,
*
b
=
ab
;
*
b
=
ab
;
return
true
;
return
true
;
}
}
#endif
}
}
return
(
bool
)
c
->
unicode
->
decompose
(
ab
,
a
,
b
);
return
(
bool
)
c
->
unicode
->
decompose
(
ab
,
a
,
b
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录