Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
43040564
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看板
提交
43040564
编写于
8月 02, 2018
作者:
M
Michiharu Ariza
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
removed TRACE_SERIALIZE from non-member function _write_cff2
上级
e2fd49e4
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
15 deletion
+14
-15
src/hb-subset-cff2.cc
src/hb-subset-cff2.cc
+14
-15
未找到文件。
src/hb-subset-cff2.cc
浏览文件 @
43040564
...
...
@@ -239,10 +239,9 @@ static inline bool _write_cff2 (const subset_plan &plan,
{
hb_serialize_context_t
c
(
dest
,
dest_sz
);
TRACE_SERIALIZE
(
this
);
OT
::
cff2
*
cff2
=
c
.
start_serialize
<
OT
::
cff2
>
();
if
(
unlikely
(
!
c
.
extend_min
(
*
cff2
)))
return
_trace
(
false
)
;
return
false
;
/* header */
cff2
->
version
.
major
.
set
(
0x02
);
...
...
@@ -258,7 +257,7 @@ static inline bool _write_cff2 (const subset_plan &plan,
if
(
unlikely
(
!
dict
.
serialize
(
&
c
,
acc
.
top
,
topSzr
,
plan
.
offsets
)))
{
DEBUG_MSG
(
SUBSET
,
nullptr
,
"failed to serialize CFF2 top dict"
);
return
_trace
(
false
)
;
return
false
;
}
}
...
...
@@ -266,11 +265,11 @@ static inline bool _write_cff2 (const subset_plan &plan,
{
assert
(
cff2
->
topDict
+
plan
.
offsets
.
topDictSize
==
c
.
head
-
c
.
start
);
Subrs
*
dest
=
c
.
start_embed
<
Subrs
>
();
if
(
unlikely
(
dest
==
nullptr
))
return
_trace
(
false
);
;
if
(
unlikely
(
dest
==
nullptr
))
return
false
;
if
(
unlikely
(
!
dest
->
serialize
(
&
c
,
*
acc
.
globalSubrs
)))
{
DEBUG_MSG
(
SUBSET
,
nullptr
,
"failed to serialize CFF2 global subrs"
);
return
_trace
(
false
)
;
return
false
;
}
}
...
...
@@ -282,7 +281,7 @@ static inline bool _write_cff2 (const subset_plan &plan,
if
(
unlikely
(
!
dest
->
serialize
(
&
c
,
acc
.
varStore
)))
{
DEBUG_MSG
(
SUBSET
,
nullptr
,
"failed to serialize CFF2 Variation Store"
);
return
_trace
(
false
)
;
return
false
;
}
}
...
...
@@ -294,7 +293,7 @@ static inline bool _write_cff2 (const subset_plan &plan,
if
(
unlikely
(
!
dest
->
serialize
(
&
c
,
*
acc
.
fdSelect
,
acc
.
num_glyphs
)))
{
DEBUG_MSG
(
SUBSET
,
nullptr
,
"failed to serialize CFF2 FDSelect"
);
return
_trace
(
false
)
;
return
false
;
}
}
...
...
@@ -302,12 +301,12 @@ static inline bool _write_cff2 (const subset_plan &plan,
{
assert
(
plan
.
offsets
.
FDArrayOffset
==
c
.
head
-
c
.
start
);
FDArray
*
fda
=
c
.
start_embed
<
FDArray
>
();
if
(
unlikely
(
fda
==
nullptr
))
return
_trace
(
false
)
;
if
(
unlikely
(
fda
==
nullptr
))
return
false
;
CFF2FontDict_OpSerializer
fontSzr
;
if
(
unlikely
(
!
fda
->
serialize
(
&
c
,
plan
.
offsets
.
FDArrayOffSize
,
acc
.
fontDicts
,
fontSzr
,
plan
.
private_off_and_size_pairs
)))
{
DEBUG_MSG
(
SUBSET
,
nullptr
,
"failed to serialize CFF2 FDArray"
);
return
_trace
(
false
)
;
return
false
;
}
}
...
...
@@ -315,11 +314,11 @@ static inline bool _write_cff2 (const subset_plan &plan,
{
assert
(
plan
.
offsets
.
charStringsOffset
==
c
.
head
-
c
.
start
);
CharStrings
*
cs
=
c
.
start_embed
<
CharStrings
>
();
if
(
unlikely
(
cs
==
nullptr
))
return
_trace
(
false
)
;
if
(
unlikely
(
cs
==
nullptr
))
return
false
;
if
(
unlikely
(
!
cs
->
serialize
(
&
c
,
plan
.
offsets
.
charStringsOffSize
,
plan
.
subset_charstrings
)))
{
DEBUG_MSG
(
SUBSET
,
nullptr
,
"failed to serialize CFF2 CharStrings"
);
return
_trace
(
false
)
;
return
false
;
}
}
...
...
@@ -328,12 +327,12 @@ static inline bool _write_cff2 (const subset_plan &plan,
for
(
unsigned
int
i
=
0
;
i
<
acc
.
privateDicts
.
len
;
i
++
)
{
PrivateDict
*
pd
=
c
.
start_embed
<
PrivateDict
>
();
if
(
unlikely
(
pd
==
nullptr
))
return
_trace
(
false
)
;
if
(
unlikely
(
pd
==
nullptr
))
return
false
;
CFF2PrivateDict_OpSerializer
privSzr
;
if
(
unlikely
(
!
pd
->
serialize
(
&
c
,
acc
.
privateDicts
[
i
],
privSzr
,
acc
.
privateDicts
[
i
].
subrsOffset
)))
{
DEBUG_MSG
(
SUBSET
,
nullptr
,
"failed to serialize CFF2 Private Dict[%d]"
,
i
);
return
_trace
(
false
)
;
return
false
;
}
if
(
acc
.
privateDicts
[
i
].
subrsOffset
!=
0
)
{
...
...
@@ -341,12 +340,12 @@ static inline bool _write_cff2 (const subset_plan &plan,
if
(
unlikely
(
subrs
==
nullptr
)
||
acc
.
privateDicts
[
i
].
localSubrs
==
&
Null
(
Subrs
))
{
DEBUG_MSG
(
SUBSET
,
nullptr
,
"CFF2 subset: local subrs unexpectedly null [%d]"
,
i
);
return
_trace
(
false
)
;
return
false
;
}
if
(
unlikely
(
!
subrs
->
serialize
(
&
c
,
*
acc
.
privateDicts
[
i
].
localSubrs
)))
{
DEBUG_MSG
(
SUBSET
,
nullptr
,
"failed to serialize CFF2 local subrs [%d]"
,
i
);
return
_trace
(
false
)
;
return
false
;
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录