Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
bfad6ab8
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看板
提交
bfad6ab8
编写于
1月 05, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[khmer] Remove features not used by Khmer
上级
92a99ce0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
5 addition
and
55 deletion
+5
-55
src/hb-ot-shape-complex-khmer.cc
src/hb-ot-shape-complex-khmer.cc
+5
-55
未找到文件。
src/hb-ot-shape-complex-khmer.cc
浏览文件 @
bfad6ab8
...
...
@@ -199,17 +199,10 @@ khmer_features[] =
* Basic features.
* These features are applied in order, one at a time, after initial_reordering.
*/
{
HB_TAG
(
'n'
,
'u'
,
'k'
,
't'
),
F_GLOBAL
},
{
HB_TAG
(
'a'
,
'k'
,
'h'
,
'n'
),
F_GLOBAL
},
{
HB_TAG
(
'r'
,
'p'
,
'h'
,
'f'
),
F_NONE
},
{
HB_TAG
(
'r'
,
'k'
,
'r'
,
'f'
),
F_GLOBAL
},
{
HB_TAG
(
'p'
,
'r'
,
'e'
,
'f'
),
F_NONE
},
{
HB_TAG
(
'b'
,
'l'
,
'w'
,
'f'
),
F_NONE
},
{
HB_TAG
(
'a'
,
'b'
,
'v'
,
'f'
),
F_NONE
},
{
HB_TAG
(
'h'
,
'a'
,
'l'
,
'f'
),
F_NONE
},
{
HB_TAG
(
'p'
,
's'
,
't'
,
'f'
),
F_NONE
},
{
HB_TAG
(
'v'
,
'a'
,
't'
,
'u'
),
F_GLOBAL
},
{
HB_TAG
(
'c'
,
'j'
,
'c'
,
't'
),
F_GLOBAL
},
{
HB_TAG
(
'c'
,
'f'
,
'a'
,
'r'
),
F_NONE
},
/*
* Other features.
...
...
@@ -217,12 +210,10 @@ khmer_features[] =
* Default Bengali font in Windows for example has intermixed
* lookups for init,pres,abvs,blws features.
*/
{
HB_TAG
(
'i'
,
'n'
,
'i'
,
't'
),
F_NONE
},
{
HB_TAG
(
'p'
,
'r'
,
'e'
,
's'
),
F_GLOBAL
},
{
HB_TAG
(
'a'
,
'b'
,
'v'
,
's'
),
F_GLOBAL
},
{
HB_TAG
(
'b'
,
'l'
,
'w'
,
's'
),
F_GLOBAL
},
{
HB_TAG
(
'p'
,
's'
,
't'
,
's'
),
F_GLOBAL
},
{
HB_TAG
(
'h'
,
'a'
,
'l'
,
'n'
),
F_GLOBAL
},
/* Positioning features, though we don't care about the types. */
{
HB_TAG
(
'd'
,
'i'
,
's'
,
't'
),
F_GLOBAL
},
{
HB_TAG
(
'a'
,
'b'
,
'v'
,
'm'
),
F_GLOBAL
},
...
...
@@ -233,31 +224,22 @@ khmer_features[] =
* Must be in the same order as the khmer_features array.
*/
enum
{
_NUKT
,
_AKHN
,
RPHF
,
_RKRF
,
PREF
,
BLWF
,
ABVF
,
HALF
,
PSTF
,
_VATU
,
_CJCT
,
CFAR
,
INIT
,
_PRES
,
_ABVS
,
_BLWS
,
_PSTS
,
_HALN
,
_DIST
,
_ABVM
,
_BLWM
,
INDIC
_NUM_FEATURES
,
INDIC_BASIC_FEATURES
=
INIT
/* Don't forget to update this! */
KHMER
_NUM_FEATURES
,
KHMER_BASIC_FEATURES
=
_PRES
/* Don't forget to update this! */
};
static
void
...
...
@@ -293,12 +275,12 @@ collect_features_khmer (hb_ot_shape_planner_t *plan)
unsigned
int
i
=
0
;
map
->
add_gsub_pause
(
initial_reordering
);
for
(;
i
<
INDIC
_BASIC_FEATURES
;
i
++
)
{
for
(;
i
<
KHMER
_BASIC_FEATURES
;
i
++
)
{
map
->
add_feature
(
khmer_features
[
i
].
tag
,
1
,
khmer_features
[
i
].
flags
|
F_MANUAL_ZWJ
|
F_MANUAL_ZWNJ
);
map
->
add_gsub_pause
(
nullptr
);
}
map
->
add_gsub_pause
(
final_reordering
);
for
(;
i
<
INDIC
_NUM_FEATURES
;
i
++
)
{
for
(;
i
<
KHMER
_NUM_FEATURES
;
i
++
)
{
map
->
add_feature
(
khmer_features
[
i
].
tag
,
1
,
khmer_features
[
i
].
flags
|
F_MANUAL_ZWJ
|
F_MANUAL_ZWNJ
);
}
...
...
@@ -374,7 +356,7 @@ struct khmer_shape_plan_t
would_substitute_feature_t
pref
;
hb_mask_t
mask_array
[
INDIC
_NUM_FEATURES
];
hb_mask_t
mask_array
[
KHMER
_NUM_FEATURES
];
};
static
void
*
...
...
@@ -608,26 +590,6 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
}
}
}
/* Apply ZWJ/ZWNJ effects */
for
(
unsigned
int
i
=
start
+
1
;
i
<
end
;
i
++
)
if
(
is_joiner
(
info
[
i
]))
{
bool
non_joiner
=
info
[
i
].
khmer_category
()
==
OT_ZWNJ
;
unsigned
int
j
=
i
;
do
{
j
--
;
/* ZWJ/ZWNJ should disable CJCT. They do that by simply
* being there, since we don't skip them for the CJCT
* feature (ie. F_MANUAL_ZWJ) */
/* A ZWNJ disables HALF. */
if
(
non_joiner
)
info
[
j
].
mask
&=
~
khmer_plan
->
mask_array
[
HALF
];
}
while
(
j
>
start
&&
!
is_consonant
(
info
[
j
]));
}
}
static
void
...
...
@@ -960,18 +922,6 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan,
}
/* Apply 'init' to the Left Matra if it's a word start. */
if
(
info
[
start
].
khmer_position
()
==
POS_PRE_M
)
{
if
(
!
start
||
!
(
FLAG_UNSAFE
(
_hb_glyph_info_get_general_category
(
&
info
[
start
-
1
]))
&
FLAG_RANGE
(
HB_UNICODE_GENERAL_CATEGORY_FORMAT
,
HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK
)))
info
[
start
].
mask
|=
khmer_plan
->
mask_array
[
INIT
];
else
buffer
->
unsafe_to_break
(
start
-
1
,
start
+
1
);
}
/*
* Finish off the clusters and go home!
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录