Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
1834cf86
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看板
提交
1834cf86
编写于
5月 31, 2019
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[serialize] Pass offset to serialize_subset()
上级
92604416
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
16 deletion
+21
-16
src/hb-open-type.hh
src/hb-open-type.hh
+9
-5
src/hb-ot-layout-common.hh
src/hb-ot-layout-common.hh
+2
-2
src/hb-ot-layout-gdef-table.hh
src/hb-ot-layout-gdef-table.hh
+6
-6
src/hb-ot-layout-gsubgpos.hh
src/hb-ot-layout-gsubgpos.hh
+4
-3
未找到文件。
src/hb-open-type.hh
浏览文件 @
1834cf86
...
...
@@ -298,20 +298,24 @@ struct OffsetTo : Offset<OffsetType, has_null>
}
template
<
typename
...
Ts
>
bool
serialize_subset
(
hb_subset_context_t
*
c
,
const
Type
&
src
,
const
void
*
base
,
Ts
&&
...
ds
)
bool
serialize_subset
(
hb_subset_context_t
*
c
,
const
OffsetTo
&
src
,
const
void
*
src_base
,
const
void
*
dst_base
,
Ts
&&
...
ds
)
{
*
this
=
0
;
if
(
has_null
&&
&
src
==
_hb_has_null
<
Type
,
has_null
>::
get
_null
())
if
(
src
.
is
_null
())
return
false
;
auto
*
s
=
c
->
serializer
;
s
->
push
();
bool
ret
=
c
->
dispatch
(
src
,
hb_forward
<
Ts
>
(
ds
)...);
bool
ret
=
c
->
dispatch
(
src
_base
+
src
,
hb_forward
<
Ts
>
(
ds
)...);
if
(
ret
||
!
has_null
)
s
->
add_link
(
*
this
,
s
->
pop_pack
(),
base
);
s
->
add_link
(
*
this
,
s
->
pop_pack
(),
dst_
base
);
else
s
->
pop_discard
();
...
...
@@ -683,7 +687,7 @@ struct OffsetListOf : OffsetArrayOf<Type>
if
(
unlikely
(
!
out
))
return_trace
(
false
);
unsigned
int
count
=
this
->
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
out
->
arrayZ
[
i
].
serialize_subset
(
c
,
(
*
this
)[
i
]
,
out
);
out
->
arrayZ
[
i
].
serialize_subset
(
c
,
this
->
arrayZ
[
i
],
this
,
out
);
return_trace
(
true
);
}
...
...
src/hb-ot-layout-common.hh
浏览文件 @
1834cf86
...
...
@@ -142,7 +142,7 @@ struct RecordListOf : RecordArrayOf<Type>
if
(
unlikely
(
!
out
))
return_trace
(
false
);
unsigned
int
count
=
this
->
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
out
->
get_offset
(
i
).
serialize_subset
(
c
,
(
*
this
)[
i
]
,
out
);
out
->
get_offset
(
i
).
serialize_subset
(
c
,
this
->
get_offset
(
i
),
this
,
out
);
return_trace
(
true
);
}
...
...
@@ -732,7 +732,7 @@ struct Lookup
OffsetArrayOf
<
TSubTable
>&
out_subtables
=
out
->
get_subtables
<
TSubTable
>
();
unsigned
int
count
=
subTable
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
out_subtables
[
i
].
serialize_subset
(
c
,
this
+
subtables
[
i
]
,
out
,
get_type
());
out_subtables
[
i
].
serialize_subset
(
c
,
subtables
[
i
],
this
,
out
,
get_type
());
return_trace
(
true
);
}
...
...
src/hb-ot-layout-gdef-table.hh
浏览文件 @
1834cf86
...
...
@@ -442,16 +442,16 @@ struct GDEF
auto
*
out
=
c
->
serializer
->
embed
(
*
this
);
if
(
unlikely
(
!
out
))
return_trace
(
false
);
out
->
glyphClassDef
.
serialize_subset
(
c
,
this
+
glyphClassDef
,
out
);
out
->
attachList
=
0
;
//TODO(subset) serialize_subset (c,
this+attachList
, out);
out
->
ligCaretList
=
0
;
//TODO(subset) serialize_subset (c,
this+ligCaretList
, out);
out
->
markAttachClassDef
.
serialize_subset
(
c
,
this
+
markAttachClassDef
,
out
);
out
->
glyphClassDef
.
serialize_subset
(
c
,
glyphClassDef
,
this
,
out
);
out
->
attachList
=
0
;
//TODO(subset) serialize_subset (c,
attachList, this
, out);
out
->
ligCaretList
=
0
;
//TODO(subset) serialize_subset (c,
ligCaretList, this
, out);
out
->
markAttachClassDef
.
serialize_subset
(
c
,
markAttachClassDef
,
this
,
out
);
if
(
version
.
to_int
()
>=
0x00010002u
)
out
->
markGlyphSetsDef
=
0
;
// TODO(subset) serialize_subset (c,
this+markGlyphSetsDef
, out);
out
->
markGlyphSetsDef
=
0
;
// TODO(subset) serialize_subset (c,
markGlyphSetsDef, this
, out);
if
(
version
.
to_int
()
>=
0x00010003u
)
out
->
varStore
=
0
;
// TODO(subset) serialize_subset (c,
this+varStore
, out);
out
->
varStore
=
0
;
// TODO(subset) serialize_subset (c,
varStore, this
, out);
return_trace
(
true
);
}
...
...
src/hb-ot-layout-gsubgpos.hh
浏览文件 @
1834cf86
...
...
@@ -2684,14 +2684,15 @@ struct GSUBGPOS
auto
*
out
=
c
->
serializer
->
embed
(
*
this
);
if
(
unlikely
(
!
out
))
return_trace
(
false
);
out
->
scriptList
.
serialize_subset
(
c
,
this
+
scriptList
,
out
);
out
->
featureList
.
serialize_subset
(
c
,
this
+
featureList
,
out
);
out
->
scriptList
.
serialize_subset
(
c
,
scriptList
,
this
,
out
);
out
->
featureList
.
serialize_subset
(
c
,
featureList
,
this
,
out
);
typedef
OffsetListOf
<
TLookup
>
TLookupList
;
/* TODO Use intersects() to count how many subtables survive? */
CastR
<
OffsetTo
<
TLookupList
>>
(
out
->
lookupList
)
.
serialize_subset
(
c
,
this
+
CastR
<
OffsetTo
<
TLookupList
>>
(
lookupList
),
CastR
<
OffsetTo
<
TLookupList
>>
(
lookupList
),
this
,
out
);
if
(
version
.
to_int
()
>=
0x00010001u
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录