Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
ecb0b24e
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ecb0b24e
编写于
7月 22, 2015
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use foreach_cluster in Indic shaper
上级
56f71ff9
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
71 deletion
+19
-71
src/hb-ot-shape-complex-indic.cc
src/hb-ot-shape-complex-indic.cc
+19
-71
未找到文件。
src/hb-ot-shape-complex-indic.cc
浏览文件 @
ecb0b24e
...
...
@@ -1161,17 +1161,6 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
}
}
static
void
initial_reordering_vowel_syllable
(
const
hb_ot_shape_plan_t
*
plan
,
hb_face_t
*
face
,
hb_buffer_t
*
buffer
,
unsigned
int
start
,
unsigned
int
end
)
{
/* We made the vowels look like consonants. So let's call the consonant logic! */
initial_reordering_consonant_syllable
(
plan
,
face
,
buffer
,
start
,
end
);
}
static
void
initial_reordering_standalone_cluster
(
const
hb_ot_shape_plan_t
*
plan
,
hb_face_t
*
face
,
...
...
@@ -1193,37 +1182,6 @@ initial_reordering_standalone_cluster (const hb_ot_shape_plan_t *plan,
initial_reordering_consonant_syllable
(
plan
,
face
,
buffer
,
start
,
end
);
}
static
void
initial_reordering_broken_cluster
(
const
hb_ot_shape_plan_t
*
plan
,
hb_face_t
*
face
,
hb_buffer_t
*
buffer
,
unsigned
int
start
,
unsigned
int
end
)
{
/* We already inserted dotted-circles, so just call the standalone_cluster. */
initial_reordering_standalone_cluster
(
plan
,
face
,
buffer
,
start
,
end
);
}
static
void
initial_reordering_symbol_cluster
(
const
hb_ot_shape_plan_t
*
plan
HB_UNUSED
,
hb_face_t
*
face
HB_UNUSED
,
hb_buffer_t
*
buffer
HB_UNUSED
,
unsigned
int
start
HB_UNUSED
,
unsigned
int
end
HB_UNUSED
)
{
/* Nothing to do right now. If we ever switch to using the output
* buffer in the reordering process, we'd need to next_glyph() here. */
}
static
void
initial_reordering_non_indic_cluster
(
const
hb_ot_shape_plan_t
*
plan
HB_UNUSED
,
hb_face_t
*
face
HB_UNUSED
,
hb_buffer_t
*
buffer
HB_UNUSED
,
unsigned
int
start
HB_UNUSED
,
unsigned
int
end
HB_UNUSED
)
{
/* Nothing to do right now. If we ever switch to using the output
* buffer in the reordering process, we'd need to next_glyph() here. */
}
static
void
initial_reordering_syllable
(
const
hb_ot_shape_plan_t
*
plan
,
hb_face_t
*
face
,
...
...
@@ -1231,13 +1189,21 @@ initial_reordering_syllable (const hb_ot_shape_plan_t *plan,
unsigned
int
start
,
unsigned
int
end
)
{
syllable_type_t
syllable_type
=
(
syllable_type_t
)
(
buffer
->
info
[
start
].
syllable
()
&
0x0F
);
switch
(
syllable_type
)
{
case
consonant_syllable
:
initial_reordering_consonant_syllable
(
plan
,
face
,
buffer
,
start
,
end
);
return
;
case
vowel_syllable
:
initial_reordering_vowel_syllable
(
plan
,
face
,
buffer
,
start
,
end
);
return
;
case
standalone_cluster
:
initial_reordering_standalone_cluster
(
plan
,
face
,
buffer
,
start
,
end
);
return
;
case
symbol_cluster
:
initial_reordering_symbol_cluster
(
plan
,
face
,
buffer
,
start
,
end
);
return
;
case
broken_cluster
:
initial_reordering_broken_cluster
(
plan
,
face
,
buffer
,
start
,
end
);
return
;
case
non_indic_cluster
:
initial_reordering_non_indic_cluster
(
plan
,
face
,
buffer
,
start
,
end
);
return
;
switch
(
syllable_type
)
{
case
vowel_syllable
:
/* We made the vowels look like consonants. So let's call the consonant logic! */
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_indic_cluster
:
break
;
}
}
...
...
@@ -1310,18 +1276,8 @@ initial_reordering (const hb_ot_shape_plan_t *plan,
update_consonant_positions
(
plan
,
font
,
buffer
);
insert_dotted_circles
(
plan
,
font
,
buffer
);
hb_glyph_info_t
*
info
=
buffer
->
info
;
unsigned
int
count
=
buffer
->
len
;
if
(
unlikely
(
!
count
))
return
;
unsigned
int
last
=
0
;
unsigned
int
last_syllable
=
info
[
0
].
syllable
();
for
(
unsigned
int
i
=
1
;
i
<
count
;
i
++
)
if
(
last_syllable
!=
info
[
i
].
syllable
())
{
initial_reordering_syllable
(
plan
,
font
->
face
,
buffer
,
last
,
i
);
last
=
i
;
last_syllable
=
info
[
last
].
syllable
();
}
initial_reordering_syllable
(
plan
,
font
->
face
,
buffer
,
last
,
count
);
foreach_syllable
(
buffer
,
start
,
end
)
initial_reordering_syllable
(
plan
,
font
->
face
,
buffer
,
start
,
end
);
}
static
void
...
...
@@ -1737,16 +1693,8 @@ final_reordering (const hb_ot_shape_plan_t *plan,
unsigned
int
count
=
buffer
->
len
;
if
(
unlikely
(
!
count
))
return
;
hb_glyph_info_t
*
info
=
buffer
->
info
;
unsigned
int
last
=
0
;
unsigned
int
last_syllable
=
info
[
0
].
syllable
();
for
(
unsigned
int
i
=
1
;
i
<
count
;
i
++
)
if
(
last_syllable
!=
info
[
i
].
syllable
())
{
final_reordering_syllable
(
plan
,
buffer
,
last
,
i
);
last
=
i
;
last_syllable
=
info
[
last
].
syllable
();
}
final_reordering_syllable
(
plan
,
buffer
,
last
,
count
);
foreach_syllable
(
buffer
,
start
,
end
)
final_reordering_syllable
(
plan
,
buffer
,
start
,
end
);
HB_BUFFER_DEALLOCATE_VAR
(
buffer
,
indic_category
);
HB_BUFFER_DEALLOCATE_VAR
(
buffer
,
indic_position
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录