Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
bab02d33
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看板
提交
bab02d33
编写于
2月 12, 2013
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename HB_OT_INDIC_OPTIONS env var to HB_OPTIONS
The Myanmar shaper now respects the uniscribe-bug-compatibility option too.
上级
3a83d33e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
54 addition
and
55 deletion
+54
-55
src/hb-common.cc
src/hb-common.cc
+18
-2
src/hb-ot-shape-complex-indic.cc
src/hb-ot-shape-complex-indic.cc
+5
-48
src/hb-ot-shape-complex-myanmar.cc
src/hb-ot-shape-complex-myanmar.cc
+2
-5
src/hb-private.hh
src/hb-private.hh
+29
-0
未找到文件。
src/hb-common.cc
浏览文件 @
bab02d33
...
...
@@ -36,6 +36,24 @@
#include <locale.h>
/* hb_options_t */
hb_options_union_t
_hb_options
;
void
_hb_options_init
(
void
)
{
hb_options_union_t
u
;
u
.
i
=
0
;
u
.
opts
.
initialized
=
1
;
char
*
c
=
getenv
(
"HB_OPTIONS"
);
u
.
opts
.
uniscribe_bug_compatible
=
c
&&
strstr
(
c
,
"uniscribe-bug-compatible"
);
/* This is idempotent and threadsafe. */
_hb_options
=
u
;
}
/* hb_tag_t */
...
...
@@ -414,5 +432,3 @@ hb_version_check (unsigned int major,
{
return
HB_VERSION_CHECK
(
major
,
minor
,
micro
);
}
src/hb-ot-shape-complex-indic.cc
浏览文件 @
bab02d33
...
...
@@ -267,49 +267,6 @@ set_indic_properties (hb_glyph_info_t &info)
*/
/*
* Global Indic shaper options.
*/
struct
indic_options_t
{
int
initialized
:
1
;
int
uniscribe_bug_compatible
:
1
;
};
union
indic_options_union_t
{
int
i
;
indic_options_t
opts
;
};
ASSERT_STATIC
(
sizeof
(
int
)
==
sizeof
(
indic_options_union_t
));
static
indic_options_union_t
indic_options_init
(
void
)
{
indic_options_union_t
u
;
u
.
i
=
0
;
u
.
opts
.
initialized
=
1
;
char
*
c
=
getenv
(
"HB_OT_INDIC_OPTIONS"
);
u
.
opts
.
uniscribe_bug_compatible
=
c
&&
strstr
(
c
,
"uniscribe-bug-compatible"
);
return
u
;
}
static
inline
indic_options_t
indic_options
(
void
)
{
static
indic_options_union_t
options
;
if
(
unlikely
(
!
options
.
i
))
{
/* This is idempotent and threadsafe. */
options
=
indic_options_init
();
}
return
options
.
opts
;
}
/*
* Indic configurations. Note that we do not want to keep every single script-specific
* behavior in these tables necessarily. This should mainly be used for per-script
...
...
@@ -484,7 +441,7 @@ static void
override_features_indic
(
hb_ot_shape_planner_t
*
plan
)
{
/* Uniscribe does not apply 'kern'. */
if
(
indic
_options
().
uniscribe_bug_compatible
)
if
(
hb
_options
().
uniscribe_bug_compatible
)
plan
->
map
.
add_feature
(
HB_TAG
(
'k'
,
'e'
,
'r'
,
'n'
),
0
,
true
);
plan
->
map
.
add_feature
(
HB_TAG
(
'l'
,
'i'
,
'g'
,
'a'
),
0
,
true
);
...
...
@@ -1044,7 +1001,7 @@ initial_reordering_standalone_cluster (const hb_ot_shape_plan_t *plan,
/* We treat NBSP/dotted-circle as if they are consonants, so we should just chain.
* Only if not in compatibility mode that is... */
if
(
indic
_options
().
uniscribe_bug_compatible
)
if
(
hb
_options
().
uniscribe_bug_compatible
)
{
/* For dotted-circle, this is what Uniscribe does:
* If dotted-circle is the last glyph, it just does nothing.
...
...
@@ -1380,7 +1337,7 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
* Uniscribe doesn't do this.
* TEST: U+0930,U+094D,U+0915,U+094B,U+094D
*/
if
(
!
indic
_options
().
uniscribe_bug_compatible
&&
if
(
!
hb
_options
().
uniscribe_bug_compatible
&&
unlikely
(
is_halant_or_coeng
(
info
[
new_reph_pos
])))
{
for
(
unsigned
int
i
=
base
+
1
;
i
<
new_reph_pos
;
i
++
)
if
(
info
[
i
].
indic_category
()
==
OT_M
)
{
...
...
@@ -1484,7 +1441,7 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
/*
* Finish off the clusters and go home!
*/
if
(
indic
_options
().
uniscribe_bug_compatible
)
if
(
hb
_options
().
uniscribe_bug_compatible
)
{
/* Uniscribe merges the entire cluster.
* This means, half forms are submerged into the main consonants cluster.
...
...
@@ -1600,7 +1557,7 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c,
hb_codepoint_t
glyph
;
if
(
indic
_options
().
uniscribe_bug_compatible
||
if
(
hb
_options
().
uniscribe_bug_compatible
||
(
c
->
font
->
get_glyph
(
ab
,
0
,
&
glyph
)
&&
indic_plan
->
pstf
.
would_substitute
(
&
glyph
,
1
,
true
,
c
->
font
->
face
)))
{
...
...
src/hb-ot-shape-complex-myanmar.cc
浏览文件 @
bab02d33
...
...
@@ -128,12 +128,9 @@ override_features_myanmar (hb_ot_shape_planner_t *plan)
* Windows 8 has lookups for it. But testing suggests that
* Windows 8 Uniscribe is NOT applying it. It *is* applying
* 'mkmk' however.
*
* We want to apply it, since that's the right thing to do.
*/
#if 0
plan->map.add_feature (HB_TAG('m','a','r','k'), 0, true);
#endif
if
(
hb_options
().
uniscribe_bug_compatible
)
plan
->
map
.
add_feature
(
HB_TAG
(
'm'
,
'a'
,
'r'
,
'k'
),
0
,
true
);
}
...
...
src/hb-private.hh
浏览文件 @
bab02d33
...
...
@@ -854,4 +854,33 @@ hb_codepoint_parse (const char *s, unsigned int len, int base, hb_codepoint_t *o
}
/* Global runtime options. */
struct
hb_options_t
{
int
initialized
:
1
;
int
uniscribe_bug_compatible
:
1
;
};
union
hb_options_union_t
{
int
i
;
hb_options_t
opts
;
};
ASSERT_STATIC
(
sizeof
(
int
)
==
sizeof
(
hb_options_union_t
));
HB_INTERNAL
void
_hb_options_init
(
void
);
extern
HB_INTERNAL
hb_options_union_t
_hb_options
;
static
inline
hb_options_t
hb_options
(
void
)
{
if
(
unlikely
(
!
_hb_options
.
i
))
_hb_options_init
();
return
_hb_options
.
opts
;
}
#endif
/* HB_PRIVATE_HH */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录