Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
d4cc4471
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看板
提交
d4cc4471
编写于
4月 07, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move code around, in prep for Thai/Lao shaper
上级
c9a841f4
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
13 deletion
+29
-13
src/hb-buffer-private.hh
src/hb-buffer-private.hh
+5
-0
src/hb-buffer.cc
src/hb-buffer.cc
+23
-0
src/hb-ot-shape-complex-indic-machine.rl
src/hb-ot-shape-complex-indic-machine.rl
+1
-13
未找到文件。
src/hb-buffer-private.hh
浏览文件 @
d4cc4471
...
...
@@ -131,6 +131,11 @@ struct _hb_buffer_t {
unsigned
int
cluster_start
,
unsigned
int
cluster_end
);
HB_INTERNAL
void
merge_clusters
(
unsigned
int
start
,
unsigned
int
end
);
HB_INTERNAL
void
merge_out_clusters
(
unsigned
int
start
,
unsigned
int
end
);
/* Internal methods */
HB_INTERNAL
bool
enlarge
(
unsigned
int
size
);
...
...
src/hb-buffer.cc
浏览文件 @
d4cc4471
...
...
@@ -430,6 +430,29 @@ hb_buffer_t::reverse_clusters (void)
reverse_range
(
start
,
i
);
}
void
hb_buffer_t
::
merge_clusters
(
unsigned
int
start
,
unsigned
int
end
)
{
unsigned
int
cluster
=
this
->
info
[
start
].
cluster
;
for
(
unsigned
int
i
=
start
+
1
;
i
<
end
;
i
++
)
cluster
=
MIN
(
cluster
,
this
->
info
[
i
].
cluster
);
for
(
unsigned
int
i
=
start
;
i
<
end
;
i
++
)
this
->
info
[
i
].
cluster
=
cluster
;
}
void
hb_buffer_t
::
merge_out_clusters
(
unsigned
int
start
,
unsigned
int
end
)
{
unsigned
int
cluster
=
this
->
out_info
[
start
].
cluster
;
for
(
unsigned
int
i
=
start
+
1
;
i
<
end
;
i
++
)
cluster
=
MIN
(
cluster
,
this
->
out_info
[
i
].
cluster
);
for
(
unsigned
int
i
=
start
;
i
<
end
;
i
++
)
this
->
out_info
[
i
].
cluster
=
cluster
;
}
void
hb_buffer_t
::
guess_properties
(
void
)
{
...
...
src/hb-ot-shape-complex-indic-machine.rl
浏览文件 @
d4cc4471
...
...
@@ -64,7 +64,7 @@ action found_vowel_syllable { found_vowel_syllable (map, buffer, mask_array, las
action found_standalone_cluster { found_standalone_cluster (map, buffer, mask_array, last, p); }
action found_non_indic { found_non_indic (map, buffer, mask_array, last, p); }
action next_syllable {
set_cluster (buffer,
last, p); last = p; }
action next_syllable {
buffer->merge_clusters (
last, p); last = p; }
consonant_syllable = (c.N? (z.H|H.z?))* c.N? A? (H.z? | matra_group*)? syllable_tail %(found_consonant_syllable);
vowel_syllable = (Ra H)? V N? (z.H.c | ZWJ.c)? matra_group* syllable_tail %(found_vowel_syllable);
...
...
@@ -83,18 +83,6 @@ main := (syllable %(next_syllable))**;
}%%
static void
set_cluster (hb_buffer_t *buffer,
unsigned int start, unsigned int end)
{
unsigned int cluster = buffer->info[start].cluster;
for (unsigned int i = start + 1; i < end; i++)
cluster = MIN (cluster, buffer->info[i].cluster);
for (unsigned int i = start; i < end; i++)
buffer->info[i].cluster = cluster;
}
static void
find_syllables (const hb_ot_map_t *map, hb_buffer_t *buffer, hb_mask_t *mask_array)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录