Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
217ed5e3
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,发现更多精彩内容 >>
提交
217ed5e3
编写于
2月 07, 2018
作者:
G
Garret Rieger
提交者:
Behdad Esfahbod
2月 08, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Cleanups in hb-subset-glyf and hb-subset-plan.
上级
13193a9b
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
16 addition
and
16 deletion
+16
-16
src/hb-subset-glyf.cc
src/hb-subset-glyf.cc
+15
-15
src/hb-subset-plan.hh
src/hb-subset-plan.hh
+1
-1
未找到文件。
src/hb-subset-glyf.cc
浏览文件 @
217ed5e3
...
...
@@ -30,7 +30,7 @@
#include "hb-subset-glyf.hh"
bool
calculate_glyf_prime_size
(
const
OT
::
glyf
::
accelerator_t
&
glyf
,
_
calculate_glyf_prime_size
(
const
OT
::
glyf
::
accelerator_t
&
glyf
,
hb_set_t
*
glyph_ids
,
unsigned
int
*
size
/* OUT */
)
{
...
...
@@ -38,7 +38,7 @@ calculate_glyf_prime_size (const OT::glyf::accelerator_t &glyf,
hb_codepoint_t
next_glyph
=
-
1
;
while
(
hb_set_next
(
glyph_ids
,
&
next_glyph
))
{
unsigned
int
start_offset
,
end_offset
;
if
(
!
glyf
.
get_offsets
(
next_glyph
,
&
start_offset
,
&
end_offset
))
{
if
(
unlikely
(
!
glyf
.
get_offsets
(
next_glyph
,
&
start_offset
,
&
end_offset
)
))
{
*
size
=
0
;
return
false
;
}
...
...
@@ -51,7 +51,7 @@ calculate_glyf_prime_size (const OT::glyf::accelerator_t &glyf,
}
bool
write_glyf_prime
(
const
OT
::
glyf
::
accelerator_t
&
glyf
,
_
write_glyf_prime
(
const
OT
::
glyf
::
accelerator_t
&
glyf
,
const
char
*
glyf_data
,
hb_set_t
*
glyph_ids
,
int
glyf_prime_size
,
...
...
@@ -62,7 +62,7 @@ write_glyf_prime (const OT::glyf::accelerator_t &glyf,
hb_codepoint_t
next_glyph
=
-
1
;
while
(
hb_set_next
(
glyph_ids
,
&
next_glyph
))
{
unsigned
int
start_offset
,
end_offset
;
if
(
!
glyf
.
get_offsets
(
next_glyph
,
&
start_offset
,
&
end_offset
))
{
if
(
unlikely
(
!
glyf
.
get_offsets
(
next_glyph
,
&
start_offset
,
&
end_offset
)
))
{
return
false
;
}
...
...
@@ -85,15 +85,15 @@ _hb_subset_glyf (const OT::glyf::accelerator_t &glyf,
// TODO(grieger): Subset loca simultaneously.
unsigned
int
glyf_prime_size
;
if
(
!
calculate_glyf_prime_size
(
glyf
,
if
(
unlikely
(
!
_
calculate_glyf_prime_size
(
glyf
,
glyphs_to_retain
,
&
glyf_prime_size
))
{
&
glyf_prime_size
)
))
{
return
false
;
}
char
*
glyf_prime_data
=
(
char
*
)
calloc
(
glyf_prime_size
,
1
);
if
(
!
write_glyf_prime
(
glyf
,
glyf_data
,
glyphs_to_retain
,
glyf_prime_size
,
glyf_prime_data
))
{
if
(
unlikely
(
!
_
write_glyf_prime
(
glyf
,
glyf_data
,
glyphs_to_retain
,
glyf_prime_size
,
glyf_prime_data
)
))
{
free
(
glyf_prime_data
);
return
false
;
}
...
...
src/hb-subset-plan.hh
浏览文件 @
217ed5e3
...
...
@@ -55,4 +55,4 @@ hb_subset_plan_get_empty ();
void
hb_subset_plan_destroy
(
hb_subset_plan_t
*
plan
);
#endif
/* HB_SUBSET_PLAN_
PRIVATE_
HH */
#endif
/* HB_SUBSET_PLAN_HH */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录