Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
36d85dce
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看板
提交
36d85dce
编写于
11月 05, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[cmap] Use hb_nonnullptr_t
上级
8be74d85
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
20 deletion
+14
-20
src/hb-ot-cmap-table.hh
src/hb-ot-cmap-table.hh
+14
-20
未找到文件。
src/hb-ot-cmap-table.hh
浏览文件 @
36d85dce
...
...
@@ -1017,22 +1017,20 @@ struct cmap
this
->
blob
=
hb_sanitize_context_t
().
reference_table
<
cmap
>
(
face
);
const
cmap
*
table
=
this
->
blob
->
as
<
cmap
>
();
bool
symbol
;
subtableZ
=
table
->
find_best_subtable
(
&
symbol
);
/* UVS subtable. */
subtable_uvsZ
=
&
Null
(
CmapSubtableFormat14
);
this
->
subtable
=
table
->
find_best_subtable
(
&
symbol
);
this
->
subtable_uvs
=
&
Null
(
CmapSubtableFormat14
);
{
const
CmapSubtable
*
st
=
table
->
find_subtable
(
0
,
5
);
if
(
st
&&
st
->
u
.
format
==
14
)
subtable_uvs
Z
=
&
st
->
u
.
format14
;
subtable_uvs
=
&
st
->
u
.
format14
;
}
this
->
get_glyph_data
=
subtable
Z
;
this
->
get_glyph_data
=
subtable
;
if
(
unlikely
(
symbol
))
{
this
->
get_glyph_funcZ
=
get_glyph_from_symbol
<
CmapSubtable
>
;
}
else
{
switch
(
subtable
Z
->
u
.
format
)
{
switch
(
subtable
->
u
.
format
)
{
/* Accelerate format 4 and format 12. */
default:
this
->
get_glyph_funcZ
=
get_glyph_from
<
CmapSubtable
>
;
...
...
@@ -1042,7 +1040,7 @@ struct cmap
break
;
case
4
:
{
this
->
format4_accel
.
init
(
&
subtable
Z
->
u
.
format4
);
this
->
format4_accel
.
init
(
&
subtable
->
u
.
format4
);
this
->
get_glyph_data
=
&
this
->
format4_accel
;
this
->
get_glyph_funcZ
=
this
->
format4_accel
.
get_glyph_func
;
}
...
...
@@ -1067,10 +1065,9 @@ struct cmap
hb_codepoint_t
variation_selector
,
hb_codepoint_t
*
glyph
)
const
{
if
(
unlikely
(
!
this
->
subtable_uvsZ
))
return
false
;
switch
(
this
->
subtable_uvsZ
->
get_glyph_variant
(
unicode
,
variation_selector
,
glyph
))
switch
(
this
->
subtable_uvs
->
get_glyph_variant
(
unicode
,
variation_selector
,
glyph
))
{
case
GLYPH_VARIANT_NOT_FOUND
:
return
false
;
case
GLYPH_VARIANT_FOUND
:
return
true
;
...
...
@@ -1082,19 +1079,16 @@ struct cmap
inline
void
collect_unicodes
(
hb_set_t
*
out
)
const
{
if
(
unlikely
(
!
this
->
subtableZ
))
return
;
subtableZ
->
collect_unicodes
(
out
);
subtable
->
collect_unicodes
(
out
);
}
inline
void
collect_variation_selectors
(
hb_set_t
*
out
)
const
{
if
(
unlikely
(
!
this
->
subtable_uvsZ
))
return
;
subtable_uvsZ
->
collect_variation_selectors
(
out
);
subtable_uvs
->
collect_variation_selectors
(
out
);
}
inline
void
collect_variation_unicodes
(
hb_codepoint_t
variation_selector
,
hb_set_t
*
out
)
const
{
if
(
unlikely
(
!
this
->
subtable_uvsZ
))
return
;
subtable_uvsZ
->
collect_variation_unicodes
(
variation_selector
,
out
);
subtable_uvs
->
collect_variation_unicodes
(
variation_selector
,
out
);
}
protected:
...
...
@@ -1134,8 +1128,8 @@ struct cmap
}
private:
const
CmapSubtable
*
subtableZ
;
const
CmapSubtableFormat14
*
subtable_uvsZ
;
hb_nonnull_ptr_t
<
const
CmapSubtable
>
subtable
;
hb_nonnull_ptr_t
<
const
CmapSubtableFormat14
>
subtable_uvs
;
hb_cmap_get_glyph_func_t
get_glyph_funcZ
;
const
void
*
get_glyph_data
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录