Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
2cecc38c
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看板
提交
2cecc38c
编写于
1月 29, 2015
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[layout] Shuffle code around
上级
69626698
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
56 addition
and
55 deletion
+56
-55
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+56
-55
未找到文件。
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
2cecc38c
...
...
@@ -260,61 +260,6 @@ struct hb_get_coverage_context_t
struct
hb_apply_context_t
{
inline
const
char
*
get_name
(
void
)
{
return
"APPLY"
;
}
static
const
unsigned
int
max_debug_depth
=
HB_DEBUG_APPLY
;
typedef
bool
return_t
;
typedef
return_t
(
*
recurse_func_t
)
(
hb_apply_context_t
*
c
,
unsigned
int
lookup_index
);
template
<
typename
T
>
inline
return_t
dispatch
(
const
T
&
obj
)
{
return
obj
.
apply
(
this
);
}
static
return_t
default_return_value
(
void
)
{
return
false
;
}
bool
stop_sublookup_iteration
(
return_t
r
)
const
{
return
r
;
}
return_t
recurse
(
unsigned
int
lookup_index
)
{
if
(
unlikely
(
nesting_level_left
==
0
||
!
recurse_func
))
return
default_return_value
();
nesting_level_left
--
;
bool
ret
=
recurse_func
(
this
,
lookup_index
);
nesting_level_left
++
;
return
ret
;
}
unsigned
int
table_index
;
/* GSUB/GPOS */
hb_font_t
*
font
;
hb_face_t
*
face
;
hb_buffer_t
*
buffer
;
hb_direction_t
direction
;
hb_mask_t
lookup_mask
;
bool
auto_zwj
;
recurse_func_t
recurse_func
;
unsigned
int
nesting_level_left
;
unsigned
int
lookup_props
;
const
GDEF
&
gdef
;
bool
has_glyph_classes
;
unsigned
int
debug_depth
;
hb_apply_context_t
(
unsigned
int
table_index_
,
hb_font_t
*
font_
,
hb_buffer_t
*
buffer_
)
:
table_index
(
table_index_
),
font
(
font_
),
face
(
font
->
face
),
buffer
(
buffer_
),
direction
(
buffer_
->
props
.
direction
),
lookup_mask
(
1
),
auto_zwj
(
true
),
recurse_func
(
NULL
),
nesting_level_left
(
MAX_NESTING_LEVEL
),
lookup_props
(
0
),
gdef
(
*
hb_ot_layout_from_face
(
face
)
->
gdef
),
has_glyph_classes
(
gdef
.
has_glyph_classes
()),
debug_depth
(
0
)
{}
inline
void
set_lookup_mask
(
hb_mask_t
mask
)
{
lookup_mask
=
mask
;
}
inline
void
set_auto_zwj
(
bool
auto_zwj_
)
{
auto_zwj
=
auto_zwj_
;
}
inline
void
set_recurse_func
(
recurse_func_t
func
)
{
recurse_func
=
func
;
}
inline
void
set_lookup_props
(
unsigned
int
lookup_props_
)
{
lookup_props
=
lookup_props_
;
}
inline
void
set_lookup
(
const
Lookup
&
l
)
{
lookup_props
=
l
.
get_props
();
}
struct
matcher_t
{
inline
matcher_t
(
void
)
:
...
...
@@ -487,6 +432,62 @@ struct hb_apply_context_t
unsigned
int
end
;
};
inline
const
char
*
get_name
(
void
)
{
return
"APPLY"
;
}
static
const
unsigned
int
max_debug_depth
=
HB_DEBUG_APPLY
;
typedef
bool
return_t
;
typedef
return_t
(
*
recurse_func_t
)
(
hb_apply_context_t
*
c
,
unsigned
int
lookup_index
);
template
<
typename
T
>
inline
return_t
dispatch
(
const
T
&
obj
)
{
return
obj
.
apply
(
this
);
}
static
return_t
default_return_value
(
void
)
{
return
false
;
}
bool
stop_sublookup_iteration
(
return_t
r
)
const
{
return
r
;
}
return_t
recurse
(
unsigned
int
lookup_index
)
{
if
(
unlikely
(
nesting_level_left
==
0
||
!
recurse_func
))
return
default_return_value
();
nesting_level_left
--
;
bool
ret
=
recurse_func
(
this
,
lookup_index
);
nesting_level_left
++
;
return
ret
;
}
unsigned
int
table_index
;
/* GSUB/GPOS */
hb_font_t
*
font
;
hb_face_t
*
face
;
hb_buffer_t
*
buffer
;
hb_direction_t
direction
;
hb_mask_t
lookup_mask
;
bool
auto_zwj
;
recurse_func_t
recurse_func
;
unsigned
int
nesting_level_left
;
unsigned
int
lookup_props
;
const
GDEF
&
gdef
;
bool
has_glyph_classes
;
unsigned
int
debug_depth
;
hb_apply_context_t
(
unsigned
int
table_index_
,
hb_font_t
*
font_
,
hb_buffer_t
*
buffer_
)
:
table_index
(
table_index_
),
font
(
font_
),
face
(
font
->
face
),
buffer
(
buffer_
),
direction
(
buffer_
->
props
.
direction
),
lookup_mask
(
1
),
auto_zwj
(
true
),
recurse_func
(
NULL
),
nesting_level_left
(
MAX_NESTING_LEVEL
),
lookup_props
(
0
),
gdef
(
*
hb_ot_layout_from_face
(
face
)
->
gdef
),
has_glyph_classes
(
gdef
.
has_glyph_classes
()),
debug_depth
(
0
)
{}
inline
void
set_lookup_mask
(
hb_mask_t
mask
)
{
lookup_mask
=
mask
;
}
inline
void
set_auto_zwj
(
bool
auto_zwj_
)
{
auto_zwj
=
auto_zwj_
;
}
inline
void
set_recurse_func
(
recurse_func_t
func
)
{
recurse_func
=
func
;
}
inline
void
set_lookup_props
(
unsigned
int
lookup_props_
)
{
lookup_props
=
lookup_props_
;
}
inline
void
set_lookup
(
const
Lookup
&
l
)
{
lookup_props
=
l
.
get_props
();
}
inline
bool
match_properties_mark
(
hb_codepoint_t
glyph
,
unsigned
int
glyph_props
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录