Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
e6618f3b
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看板
提交
e6618f3b
编写于
1月 05, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[khmer] Shave off some more from the grammar
上级
014494d5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
4 addition
and
39 deletion
+4
-39
src/hb-ot-shape-complex-khmer-machine.rl
src/hb-ot-shape-complex-khmer-machine.rl
+2
-7
src/hb-ot-shape-complex-khmer.cc
src/hb-ot-shape-complex-khmer.cc
+2
-32
未找到文件。
src/hb-ot-shape-complex-khmer-machine.rl
浏览文件 @
e6618f3b
...
...
@@ -46,7 +46,6 @@ ZWNJ = 5;
ZWJ = 6;
M = 7;
SM = 8;
VD = 9;
A = 10;
PLACEHOLDER = 11;
DOTTEDCIRCLE = 12;
...
...
@@ -60,22 +59,18 @@ z = ZWJ|ZWNJ; # is_joiner
cn = c.ZWJ?.n?;
matra_group = z{0,3}.M.N?.Coeng?;
syllable_tail = (z?.SM.SM?.ZWNJ?)? A{0,3}?
VD{0,2}
;
syllable_tail = (z?.SM.SM?.ZWNJ?)? A{0,3}?;
halant_group = (z?.Coeng.(ZWJ.N?)?);
final_halant_group = halant_group | Coeng.ZWNJ;
halant_or_matra_group = (final_halant_group | (Coeng.ZWJ)? matra_group{0,4}) (Coeng (cn|V))?;
consonant_syllable = (cn.halant_group){0,4} cn halant_or_matra_group syllable_tail;
vowel_syllable = V.n? (ZWJ | (halant_group.cn){0,4} halant_or_matra_group syllable_tail);
standalone_cluster = (PLACEHOLDER | DOTTEDCIRCLE).n? (halant_group.cn){0,4} halant_or_matra_group syllable_tail;
consonant_syllable = (c|V|PLACEHOLDER|DOTTEDCIRCLE).n? (halant_group.cn){0,4} halant_or_matra_group syllable_tail;
broken_cluster = n? (halant_group.cn){0,4} halant_or_matra_group syllable_tail;
other = any;
main := |*
consonant_syllable => { found_syllable (consonant_syllable); };
vowel_syllable => { found_syllable (vowel_syllable); };
standalone_cluster => { found_syllable (standalone_cluster); };
broken_cluster => { found_syllable (broken_cluster); };
other => { found_syllable (non_khmer_cluster); };
*|;
...
...
src/hb-ot-shape-complex-khmer.cc
浏览文件 @
e6618f3b
...
...
@@ -124,7 +124,7 @@ set_khmer_properties (hb_glyph_info_t &info)
{
pos
=
matra_position
(
pos
);
}
else
if
((
FLAG_UNSAFE
(
cat
)
&
(
FLAG
(
OT_SM
)
|
FLAG
(
OT_
VD
)
|
FLAG
(
OT_
A
)
|
FLAG
(
OT_Symbol
))))
else
if
((
FLAG_UNSAFE
(
cat
)
&
(
FLAG
(
OT_SM
)
|
FLAG
(
OT_A
)
|
FLAG
(
OT_Symbol
))))
{
pos
=
POS_SMVD
;
}
...
...
@@ -341,9 +341,6 @@ data_destroy_khmer (void *data)
enum
syllable_type_t
{
consonant_syllable
,
vowel_syllable
,
standalone_cluster
,
symbol_cluster
,
broken_cluster
,
non_khmer_cluster
,
};
...
...
@@ -547,27 +544,6 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
}
}
static
void
initial_reordering_standalone_cluster
(
const
hb_ot_shape_plan_t
*
plan
,
hb_face_t
*
face
,
hb_buffer_t
*
buffer
,
unsigned
int
start
,
unsigned
int
end
)
{
/* We treat placeholder/dotted-circle as if they are consonants, so we
* should just chain. Only if not in compatibility mode that is... */
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.
* Ie. It doesn't form Reph. */
if
(
buffer
->
info
[
end
-
1
].
khmer_category
()
==
OT_DOTTEDCIRCLE
)
return
;
}
initial_reordering_consonant_syllable
(
plan
,
face
,
buffer
,
start
,
end
);
}
static
void
initial_reordering_syllable
(
const
hb_ot_shape_plan_t
*
plan
,
hb_face_t
*
face
,
...
...
@@ -577,17 +553,11 @@ initial_reordering_syllable (const hb_ot_shape_plan_t *plan,
syllable_type_t
syllable_type
=
(
syllable_type_t
)
(
buffer
->
info
[
start
].
syllable
()
&
0x0F
);
switch
(
syllable_type
)
{
case
vowel_syllable
:
/* We made the vowels look like consonants. So let's call the consonant logic!
*/
case
broken_cluster
:
/* We already inserted dotted-circles, so just call the consonant_syllable.
*/
case
consonant_syllable
:
initial_reordering_consonant_syllable
(
plan
,
face
,
buffer
,
start
,
end
);
break
;
case
broken_cluster
:
/* We already inserted dotted-circles, so just call the standalone_cluster. */
case
standalone_cluster
:
initial_reordering_standalone_cluster
(
plan
,
face
,
buffer
,
start
,
end
);
break
;
case
symbol_cluster
:
case
non_khmer_cluster
:
break
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录