Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
9b34677f
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,发现更多精彩内容 >>
提交
9b34677f
编写于
11月 23, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[OTLayout] Clean up closure() a bit
上级
adf7758a
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
23 addition
and
19 deletion
+23
-19
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsub-table.hh
+14
-15
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+4
-3
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+5
-1
未找到文件。
src/hb-ot-layout-gsub-table.hh
浏览文件 @
9b34677f
...
...
@@ -1141,6 +1141,13 @@ struct SubstLookup : Lookup
return
TRACE_RETURN
(
c
->
default_return_value
());
}
static
inline
void_t
closure_recurse_func
(
hb_closure_context_t
*
c
,
unsigned
int
lookup_index
);
inline
hb_closure_context_t
::
return_t
closure
(
hb_closure_context_t
*
c
)
const
{
c
->
set_recurse_func
(
closure_recurse_func
);
return
process
(
c
);
}
template
<
typename
set_t
>
inline
void
add_coverage
(
set_t
*
glyphs
)
const
{
...
...
@@ -1173,7 +1180,6 @@ struct SubstLookup : Lookup
}
static
bool
apply_recurse_func
(
hb_apply_context_t
*
c
,
unsigned
int
lookup_index
);
inline
bool
apply_string
(
hb_apply_context_t
*
c
,
const
hb_set_digest_t
*
digest
)
const
{
bool
ret
=
false
;
...
...
@@ -1323,20 +1329,6 @@ struct GSUB : GSUBGPOS
static
inline
void
substitute_start
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
static
inline
void
substitute_finish
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
static
inline
void_t
closure_recurse_func
(
hb_closure_context_t
*
c
,
unsigned
int
lookup_index
)
{
const
GSUB
&
gsub
=
*
(
hb_ot_layout_from_face
(
c
->
face
)
->
gsub
);
const
SubstLookup
&
l
=
gsub
.
get_lookup
(
lookup_index
);
return
l
.
process
(
c
);
}
inline
hb_closure_context_t
::
return_t
closure_lookup
(
hb_face_t
*
face
,
hb_set_t
*
glyphs
,
unsigned
int
lookup_index
)
const
{
hb_closure_context_t
c
(
face
,
glyphs
,
closure_recurse_func
);
return
get_lookup
(
lookup_index
).
process
(
&
c
);
}
#if 0
inline hb_collect_glyphs_context_t::return_t collect_glyphs_lookup (hb_collect_glyphs_context_t *c,
unsigned int lookup_index) const
...
...
@@ -1385,6 +1377,13 @@ inline bool ExtensionSubst::is_reverse (void) const
return
SubstLookup
::
lookup_type_is_reverse
(
type
);
}
inline
void_t
SubstLookup
::
closure_recurse_func
(
hb_closure_context_t
*
c
,
unsigned
int
lookup_index
)
{
const
GSUB
&
gsub
=
*
(
hb_ot_layout_from_face
(
c
->
face
)
->
gsub
);
const
SubstLookup
&
l
=
gsub
.
get_lookup
(
lookup_index
);
return
l
.
process
(
c
);
}
inline
bool
SubstLookup
::
apply_recurse_func
(
hb_apply_context_t
*
c
,
unsigned
int
lookup_index
)
{
const
GSUB
&
gsub
=
*
(
hb_ot_layout_from_face
(
c
->
face
)
->
gsub
);
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
9b34677f
...
...
@@ -65,7 +65,7 @@ struct hb_closure_context_t
bool
stop_sublookup_iteration
(
const
return_t
r
)
const
{
return
false
;
}
return_t
recurse
(
unsigned
int
lookup_index
)
{
if
(
unlikely
(
nesting_level_left
==
0
))
if
(
unlikely
(
nesting_level_left
==
0
||
!
recurse_func
))
return
default_return_value
();
nesting_level_left
--
;
...
...
@@ -82,13 +82,14 @@ struct hb_closure_context_t
hb_closure_context_t
(
hb_face_t
*
face_
,
hb_set_t
*
glyphs_
,
recurse_func_t
recurse_func_
,
unsigned
int
nesting_level_left_
=
MAX_NESTING_LEVEL
)
:
face
(
face_
),
glyphs
(
glyphs_
),
recurse_func
(
recurse_func_
),
recurse_func
(
NULL
),
nesting_level_left
(
nesting_level_left_
),
debug_depth
(
0
)
{}
void
set_recurse_func
(
recurse_func_t
func
)
{
recurse_func
=
func
;
}
};
...
...
src/hb-ot-layout.cc
浏览文件 @
9b34677f
...
...
@@ -498,7 +498,11 @@ hb_ot_layout_lookup_substitute_closure (hb_face_t *face,
unsigned
int
lookup_index
,
hb_set_t
*
glyphs
)
{
_get_gsub
(
face
).
closure_lookup
(
face
,
glyphs
,
lookup_index
);
OT
::
hb_closure_context_t
c
(
face
,
glyphs
);
const
OT
::
SubstLookup
&
l
=
_get_gsub
(
face
).
get_lookup
(
lookup_index
);
l
.
closure
(
&
c
);
}
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录