Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
e714fe6d
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看板
提交
e714fe6d
编写于
10月 17, 2013
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[otlayout] Simplify ligate_input()
Shouldn't change behavior at all, but is faster / more robust.
上级
6b2abdcd
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
19 deletion
+14
-19
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsub-table.hh
+7
-9
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+7
-10
未找到文件。
src/hb-ot-layout-gsub-table.hh
浏览文件 @
e714fe6d
...
...
@@ -663,28 +663,26 @@ struct Ligature
unsigned
int
count
=
component
.
len
;
if
(
unlikely
(
count
<
1
))
return
TRACE_RETURN
(
false
);
unsigned
int
end_offset
=
0
;
bool
is_mark_ligature
=
false
;
unsigned
int
total_component_count
=
0
;
unsigned
int
match_length
=
0
;
unsigned
int
match_positions
[
MAX_CONTEXT_LENGTH
];
if
(
likely
(
!
match_input
(
c
,
count
,
&
component
[
1
],
match_glyph
,
NULL
,
&
end_offset
,
NULL
,
&
match_length
,
match_positions
,
&
is_mark_ligature
,
&
total_component_count
)))
return
TRACE_RETURN
(
false
);
/* Deal, we are forming the ligature. */
c
->
buffer
->
merge_clusters
(
c
->
buffer
->
idx
,
c
->
buffer
->
idx
+
end_offset
);
ligate_input
(
c
,
count
,
&
component
[
1
],
match_glyph
,
NULL
,
match_positions
,
match_length
,
ligGlyph
,
is_mark_ligature
,
total_component_count
);
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
e714fe6d
...
...
@@ -832,17 +832,16 @@ static inline bool match_input (hb_apply_context_t *c,
return
TRACE_RETURN
(
true
);
}
static
inline
void
ligate_input
(
hb_apply_context_t
*
c
,
unsigned
int
count
,
/* Including the first glyph (not matched) */
const
USHORT
input
[],
/* Array of input values--start with second glyph */
match_func_t
match_func
,
const
void
*
match_data
,
unsigned
int
count
,
/* Including the first glyph */
unsigned
int
match_positions
[
MAX_CONTEXT_LENGTH
],
/* Including the first glyph */
unsigned
int
match_length
,
hb_codepoint_t
lig_glyph
,
bool
is_mark_ligature
,
unsigned
int
total_component_count
)
{
hb_apply_context_t
::
skipping_forward_iterator_t
skippy_iter
(
c
,
c
->
buffer
->
idx
,
count
-
1
);
skippy_iter
.
set_match_func
(
match_func
,
match_data
,
input
);
if
(
skippy_iter
.
has_no_chance
())
return
;
TRACE_APPLY
(
NULL
);
c
->
buffer
->
merge_clusters
(
c
->
buffer
->
idx
,
c
->
buffer
->
idx
+
match_length
)
;
/*
* - If it *is* a mark ligature, we don't allocate a new ligature id, and leave
...
...
@@ -888,9 +887,7 @@ static inline void ligate_input (hb_apply_context_t *c,
for
(
unsigned
int
i
=
1
;
i
<
count
;
i
++
)
{
if
(
!
skippy_iter
.
next
())
return
;
while
(
c
->
buffer
->
idx
<
skippy_iter
.
idx
)
while
(
c
->
buffer
->
idx
<
match_positions
[
i
])
{
if
(
!
is_mark_ligature
)
{
unsigned
int
new_lig_comp
=
components_so_far
-
last_num_components
+
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录