Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
9b04b038
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看板
提交
9b04b038
编写于
11月 14, 2017
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[ot] Fold hb_ot_face_post_accelerator_t
上级
702d86ba
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
36 deletion
+8
-36
src/hb-ot-font.cc
src/hb-ot-font.cc
+1
-34
src/hb-ot-post-table.hh
src/hb-ot-post-table.hh
+7
-2
未找到文件。
src/hb-ot-font.cc
浏览文件 @
9b04b038
...
...
@@ -302,39 +302,6 @@ struct hb_ot_face_cbdt_accelerator_t
}
};
struct
hb_ot_face_post_accelerator_t
{
hb_blob_t
*
post_blob
;
OT
::
post
::
accelerator_t
accel
;
inline
void
init
(
hb_face_t
*
face
)
{
hb_blob_t
*
blob
=
this
->
post_blob
=
OT
::
Sanitizer
<
OT
::
post
>::
sanitize
(
face
->
reference_table
(
HB_OT_TAG_post
));
accel
.
init
(
OT
::
Sanitizer
<
OT
::
post
>::
lock_instance
(
blob
),
hb_blob_get_length
(
blob
));
}
inline
void
fini
(
void
)
{
accel
.
fini
();
hb_blob_destroy
(
this
->
post_blob
);
}
inline
bool
get_glyph_name
(
hb_codepoint_t
glyph
,
char
*
name
,
unsigned
int
size
)
const
{
return
this
->
accel
.
get_glyph_name
(
glyph
,
name
,
size
);
}
inline
bool
get_glyph_from_name
(
const
char
*
name
,
int
len
,
hb_codepoint_t
*
glyph
)
const
{
if
(
unlikely
(
!
len
))
return
false
;
return
this
->
accel
.
get_glyph_from_name
(
name
,
len
,
glyph
);
}
};
typedef
bool
(
*
hb_cmap_get_glyph_func_t
)
(
const
void
*
obj
,
hb_codepoint_t
codepoint
,
hb_codepoint_t
*
glyph
);
...
...
@@ -470,7 +437,7 @@ struct hb_ot_font_t
hb_ot_face_metrics_accelerator_t
v_metrics
;
OT
::
hb_lazy_loader_t
<
hb_ot_face_glyf_accelerator_t
>
glyf
;
OT
::
hb_lazy_loader_t
<
hb_ot_face_cbdt_accelerator_t
>
cbdt
;
OT
::
hb_lazy_loader_t
<
hb_ot_face_post_
accelerator_t
>
post
;
OT
::
hb_lazy_loader_t
<
OT
::
post
::
accelerator_t
>
post
;
OT
::
hb_lazy_loader_t
<
OT
::
kern
::
accelerator_t
>
kern
;
};
...
...
src/hb-ot-post-table.hh
浏览文件 @
9b04b038
...
...
@@ -84,8 +84,12 @@ struct post
struct
accelerator_t
{
inline
void
init
(
const
post
*
table
,
unsigned
int
post_len
)
inline
void
init
(
hb_face_t
*
face
)
{
blob
=
Sanitizer
<
post
>::
sanitize
(
face
->
reference_table
(
HB_OT_TAG_post
));
const
post
*
table
=
Sanitizer
<
post
>::
lock_instance
(
blob
);
unsigned
int
table_length
=
hb_blob_get_length
(
blob
);
version
=
table
->
version
.
to_int
();
index_to_offset
.
init
();
if
(
version
!=
0x00020000
)
...
...
@@ -96,7 +100,7 @@ struct post
glyphNameIndex
=
&
v2
.
glyphNameIndex
;
pool
=
&
StructAfter
<
uint8_t
>
(
v2
.
glyphNameIndex
);
const
uint8_t
*
end
=
(
uint8_t
*
)
table
+
post_len
;
const
uint8_t
*
end
=
(
uint8_t
*
)
table
+
table_length
;
for
(
const
uint8_t
*
data
=
pool
;
data
<
end
&&
data
+
*
data
<=
end
;
data
+=
1
+
*
data
)
{
uint32_t
*
offset
=
index_to_offset
.
push
();
...
...
@@ -227,6 +231,7 @@ struct post
return
hb_string_t
((
const
char
*
)
data
,
name_length
);
}
hb_blob_t
*
blob
;
uint32_t
version
;
const
ArrayOf
<
USHORT
>
*
glyphNameIndex
;
hb_prealloced_array_t
<
uint32_t
,
1
>
index_to_offset
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录