Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
bdc2fc82
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
接近 2 年 前同步成功
通知
1
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看板
提交
bdc2fc82
编写于
9月 25, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Arabic] Respect Arabic joining from neighboring context
Now we respect Arabic joining across runs.
上级
05207a79
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
29 addition
and
2 deletion
+29
-2
src/hb-ot-shape-complex-arabic.cc
src/hb-ot-shape-complex-arabic.cc
+29
-2
未找到文件。
src/hb-ot-shape-complex-arabic.cc
浏览文件 @
bdc2fc82
...
@@ -229,10 +229,23 @@ static void
...
@@ -229,10 +229,23 @@ static void
arabic_joining
(
hb_buffer_t
*
buffer
)
arabic_joining
(
hb_buffer_t
*
buffer
)
{
{
unsigned
int
count
=
buffer
->
len
;
unsigned
int
count
=
buffer
->
len
;
unsigned
int
prev
=
0
,
state
=
0
;
unsigned
int
prev
=
(
unsigned
int
)
-
1
,
state
=
0
;
HB_BUFFER_ALLOCATE_VAR
(
buffer
,
arabic_shaping_action
);
HB_BUFFER_ALLOCATE_VAR
(
buffer
,
arabic_shaping_action
);
/* Check pre-context */
for
(
unsigned
int
i
=
0
;
i
<
buffer
->
context_len
[
0
];
i
++
)
{
unsigned
int
this_type
=
get_joining_type
(
buffer
->
context
[
0
][
i
],
buffer
->
unicode
->
general_category
(
buffer
->
context
[
0
][
i
]));
if
(
unlikely
(
this_type
==
JOINING_TYPE_T
))
continue
;
const
arabic_state_table_entry
*
entry
=
&
arabic_state_table
[
state
][
this_type
];
state
=
entry
->
next_state
;
break
;
}
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
{
unsigned
int
this_type
=
get_joining_type
(
buffer
->
info
[
i
].
codepoint
,
_hb_glyph_info_get_general_category
(
&
buffer
->
info
[
i
]));
unsigned
int
this_type
=
get_joining_type
(
buffer
->
info
[
i
].
codepoint
,
_hb_glyph_info_get_general_category
(
&
buffer
->
info
[
i
]));
...
@@ -244,7 +257,7 @@ arabic_joining (hb_buffer_t *buffer)
...
@@ -244,7 +257,7 @@ arabic_joining (hb_buffer_t *buffer)
const
arabic_state_table_entry
*
entry
=
&
arabic_state_table
[
state
][
this_type
];
const
arabic_state_table_entry
*
entry
=
&
arabic_state_table
[
state
][
this_type
];
if
(
entry
->
prev_action
!=
NONE
)
if
(
entry
->
prev_action
!=
NONE
&&
prev
!=
(
unsigned
int
)
-
1
)
buffer
->
info
[
prev
].
arabic_shaping_action
()
=
entry
->
prev_action
;
buffer
->
info
[
prev
].
arabic_shaping_action
()
=
entry
->
prev_action
;
buffer
->
info
[
i
].
arabic_shaping_action
()
=
entry
->
curr_action
;
buffer
->
info
[
i
].
arabic_shaping_action
()
=
entry
->
curr_action
;
...
@@ -253,6 +266,20 @@ arabic_joining (hb_buffer_t *buffer)
...
@@ -253,6 +266,20 @@ arabic_joining (hb_buffer_t *buffer)
state
=
entry
->
next_state
;
state
=
entry
->
next_state
;
}
}
for
(
unsigned
int
i
=
0
;
i
<
buffer
->
context_len
[
1
];
i
++
)
{
unsigned
int
this_type
=
get_joining_type
(
buffer
->
context
[
1
][
i
],
buffer
->
unicode
->
general_category
(
buffer
->
context
[
0
][
i
]));
if
(
unlikely
(
this_type
==
JOINING_TYPE_T
))
continue
;
const
arabic_state_table_entry
*
entry
=
&
arabic_state_table
[
state
][
this_type
];
if
(
entry
->
prev_action
!=
NONE
&&
prev
!=
(
unsigned
int
)
-
1
)
buffer
->
info
[
prev
].
arabic_shaping_action
()
=
entry
->
prev_action
;
break
;
}
HB_BUFFER_DEALLOCATE_VAR
(
buffer
,
arabic_shaping_action
);
HB_BUFFER_DEALLOCATE_VAR
(
buffer
,
arabic_shaping_action
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录