Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
6a091df9
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看板
提交
6a091df9
编写于
5月 11, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Indic] Disambiguate sub vs post vs above matras
Bengali is at *just* above 5% now.
上级
9d0d319a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
21 addition
and
22 deletion
+21
-22
src/hb-ot-shape-complex-indic-private.hh
src/hb-ot-shape-complex-indic-private.hh
+15
-16
src/hb-ot-shape-complex-indic.cc
src/hb-ot-shape-complex-indic.cc
+6
-6
未找到文件。
src/hb-ot-shape-complex-indic-private.hh
浏览文件 @
6a091df9
...
...
@@ -64,16 +64,15 @@ enum indic_category_t {
/* Visual positions in a syllable from left to right. */
enum
indic_position_t
{
POS_RA_TO_BECOME_REPH
,
POS_LEFT_MATRA
,
POS_PRE_M
,
POS_PRE_C
,
POS_BASE_C
,
POS_ABOVE_C
,
POS_ABOVE_M
,
POS_BELOW_C
,
POS_BELOW_M
,
POS_POST_C
,
POS_MATRAS
,
POS_POST_M
,
POS_SMVD
};
...
...
@@ -107,10 +106,10 @@ enum indic_syllabic_category_t {
enum
indic_matra_category_t
{
INDIC_MATRA_CATEGORY_NOT_APPLICABLE
=
POS_BASE_C
,
INDIC_MATRA_CATEGORY_LEFT
=
POS_
LEFT_MATRA
,
INDIC_MATRA_CATEGORY_TOP
=
POS_
MATRAS
,
INDIC_MATRA_CATEGORY_BOTTOM
=
POS_
MATRAS
,
INDIC_MATRA_CATEGORY_RIGHT
=
POS_
MATRAS
,
INDIC_MATRA_CATEGORY_LEFT
=
POS_
PRE_M
,
INDIC_MATRA_CATEGORY_TOP
=
POS_
ABOVE_M
,
INDIC_MATRA_CATEGORY_BOTTOM
=
POS_
BELOW_M
,
INDIC_MATRA_CATEGORY_RIGHT
=
POS_
POST_M
,
/* We don't really care much about these since we decompose them
* in the generic pre-shaping layer. They will only be used if
...
...
@@ -121,13 +120,13 @@ enum indic_matra_category_t {
* TODO: There are some split matras without Unicode decompositions.
* We have to figure out what to do with them.
*/
INDIC_MATRA_CATEGORY_BOTTOM_AND_RIGHT
=
POS_
MATRAS
,
INDIC_MATRA_CATEGORY_LEFT_AND_RIGHT
=
POS_
LEFT_MATRA
,
INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM
=
POS_
MATRAS
,
INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM_AND_RIGHT
=
POS_
MATRAS
,
INDIC_MATRA_CATEGORY_TOP_AND_LEFT
=
POS_
LEFT_MATRA
,
INDIC_MATRA_CATEGORY_TOP_AND_LEFT_AND_RIGHT
=
POS_
LEFT_MATRA
,
INDIC_MATRA_CATEGORY_TOP_AND_RIGHT
=
POS_
MATRAS
,
INDIC_MATRA_CATEGORY_BOTTOM_AND_RIGHT
=
POS_
POST_M
,
INDIC_MATRA_CATEGORY_LEFT_AND_RIGHT
=
POS_
PRE_M
,
INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM
=
POS_
BELOW_M
,
INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM_AND_RIGHT
=
POS_
POST_M
,
INDIC_MATRA_CATEGORY_TOP_AND_LEFT
=
POS_
PRE_M
,
INDIC_MATRA_CATEGORY_TOP_AND_LEFT_AND_RIGHT
=
POS_
PRE_M
,
INDIC_MATRA_CATEGORY_TOP_AND_RIGHT
=
POS_
POST_M
,
INDIC_MATRA_CATEGORY_INVISIBLE
=
INDIC_MATRA_CATEGORY_NOT_APPLICABLE
,
INDIC_MATRA_CATEGORY_OVERSTRUCK
=
INDIC_MATRA_CATEGORY_NOT_APPLICABLE
,
...
...
src/hb-ot-shape-complex-indic.cc
浏览文件 @
6a091df9
...
...
@@ -410,9 +410,9 @@ initial_reordering_syllable (const hb_ot_map_t *map, hb_buffer_t *buffer, hb_mas
for
(
unsigned
int
i
=
start
+
1
;
i
<
end
;
i
++
)
if
((
FLAG
(
info
[
i
].
indic_category
())
&
(
FLAG
(
OT_ZWNJ
)
|
FLAG
(
OT_ZWJ
)
|
FLAG
(
OT_N
)
|
FLAG
(
OT_H
))))
{
info
[
i
].
indic_position
()
=
info
[
i
-
1
].
indic_position
();
if
(
info
[
i
].
indic_category
()
==
OT_H
&&
info
[
i
].
indic_position
()
==
POS_
LEFT_MATRA
)
if
(
info
[
i
].
indic_category
()
==
OT_H
&&
info
[
i
].
indic_position
()
==
POS_
PRE_M
)
for
(
unsigned
int
j
=
i
;
j
>
start
;
j
--
)
if
(
info
[
j
-
1
].
indic_position
()
!=
POS_
LEFT_MATRA
)
{
if
(
info
[
j
-
1
].
indic_position
()
!=
POS_
PRE_M
)
{
info
[
i
].
indic_position
()
=
info
[
j
-
1
].
indic_position
();
break
;
}
...
...
@@ -573,14 +573,14 @@ final_reordering_syllable (hb_buffer_t *buffer, hb_mask_t *mask_array,
/* If we found no Halant we are done. Otherwise only proceed if the Halant does
* not belong to the Matra itself! */
if
(
info
[
new_matra_pos
].
indic_category
()
==
OT_H
&&
info
[
new_matra_pos
].
indic_position
()
!=
POS_
LEFT_MATRA
)
{
info
[
new_matra_pos
].
indic_position
()
!=
POS_
PRE_M
)
{
/* -> If ZWJ or ZWNJ follow this halant, position is moved after it. */
if
(
new_matra_pos
+
1
<
end
&&
is_joiner
(
info
[
new_matra_pos
+
1
]))
new_matra_pos
++
;
/* Now go see if there's actually any matras... */
for
(
unsigned
int
i
=
new_matra_pos
;
i
>
start
;
i
--
)
if
(
info
[
i
-
1
].
indic_position
()
==
POS_
LEFT_MATRA
)
if
(
info
[
i
-
1
].
indic_position
()
==
POS_
PRE_M
)
{
unsigned
int
old_matra_pos
=
i
-
1
;
hb_glyph_info_t
matra
=
info
[
old_matra_pos
];
...
...
@@ -703,7 +703,7 @@ final_reordering_syllable (hb_buffer_t *buffer, hb_mask_t *mask_array,
{
new_reph_pos
=
base
;
while
(
new_reph_pos
<
end
&&
!
(
FLAG
(
info
[
new_reph_pos
+
1
].
indic_position
())
&
(
FLAG
(
POS_
MATRAS
)
|
FLAG
(
POS_SMVD
))))
!
(
FLAG
(
info
[
new_reph_pos
+
1
].
indic_position
())
&
(
FLAG
(
POS_
POST_C
)
|
FLAG
(
POS_POST_M
)
|
FLAG
(
POS_SMVD
))))
new_reph_pos
++
;
if
(
new_reph_pos
<
end
)
goto
reph_move
;
...
...
@@ -779,7 +779,7 @@ final_reordering_syllable (hb_buffer_t *buffer, hb_mask_t *mask_array,
/* Apply 'init' to the Left Matra if it's a word start. */
if
(
info
[
start
].
indic_position
()
==
POS_
LEFT_MATRA
&&
if
(
info
[
start
].
indic_position
()
==
POS_
PRE_M
&&
(
!
start
||
!
(
FLAG
(
_hb_glyph_info_get_general_category
(
&
buffer
->
info
[
start
-
1
]))
&
(
FLAG
(
HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER
)
|
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录