Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
f8c3df7d
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看板
提交
f8c3df7d
编写于
11月 07, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[kern/kerx] Minor
上级
f5e0a63a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
11 deletion
+13
-11
src/hb-aat-layout-kerx-table.hh
src/hb-aat-layout-kerx-table.hh
+3
-2
src/hb-ot-kern-table.hh
src/hb-ot-kern-table.hh
+10
-9
未找到文件。
src/hb-aat-layout-kerx-table.hh
浏览文件 @
f8c3df7d
...
...
@@ -852,6 +852,7 @@ public:
struct
kerx
{
static
const
hb_tag_t
tableTag
=
HB_AAT_TAG_kerx
;
static
const
uint16_t
minVersion
=
2
;
inline
bool
has_data
(
void
)
const
{
return
version
!=
0
;
}
...
...
@@ -898,8 +899,7 @@ struct kerx
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
TRACE_SANITIZE
(
this
);
if
(
!
version
.
sanitize
(
c
)
||
version
<
2
||
!
tableCount
.
sanitize
(
c
))
if
(
!
version
.
sanitize
(
c
)
||
version
<
minVersion
||
!
tableCount
.
sanitize
(
c
))
return_trace
(
false
);
const
KerxSubTable
*
st
=
&
firstTable
;
...
...
@@ -921,6 +921,7 @@ struct kerx
HBUINT32
tableCount
;
/* The number of subtables included in the extended kerning
* table. */
KerxSubTable
firstTable
;
/* Subtables. */
UnsizedArrayOf
<
HBUINT8
>
dataZ
;
/*subtableGlyphCoverageArray*/
/* Only if version >= 3. We don't use. */
public:
...
...
src/hb-ot-kern-table.hh
浏览文件 @
f8c3df7d
...
...
@@ -170,7 +170,7 @@ struct KernTable
int
v
=
0
;
const
SubTable
*
st
=
CastP
<
SubTable
>
(
&
thiz
()
->
dataZ
);
unsigned
int
count
=
thiz
()
->
nTables
;
unsigned
int
count
=
thiz
()
->
tableCount
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
if
((
st
->
u
.
header
.
coverage
&
(
st
->
u
.
header
.
Variation
|
st
->
u
.
header
.
CrossStream
))
||
...
...
@@ -188,7 +188,7 @@ struct KernTable
c
->
set_lookup_index
(
0
);
const
SubTable
*
st
=
CastP
<
SubTable
>
(
&
thiz
()
->
dataZ
);
unsigned
int
count
=
thiz
()
->
nTables
;
unsigned
int
count
=
thiz
()
->
tableCount
;
st
=
CastP
<
SubTable
>
(
&
thiz
()
->
dataZ
);
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
...
...
@@ -216,14 +216,15 @@ struct KernTable
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
{
TRACE_SANITIZE
(
this
);
if
(
unlikely
(
!
c
->
check_struct
(
thiz
())
||
thiz
()
->
version
!=
T
::
VERSION
))
if
(
unlikely
(
!
thiz
()
->
version
.
sanitize
(
c
)
||
thiz
()
->
version
<
T
::
minVersion
||
!
thiz
()
->
tableCount
.
sanitize
(
c
)))
return_trace
(
false
);
typedef
KernSubTable
<
typename
T
::
SubTableHeader
>
SubTable
;
const
SubTable
*
st
=
CastP
<
SubTable
>
(
&
thiz
()
->
dataZ
);
unsigned
int
count
=
thiz
()
->
nTables
;
unsigned
int
count
=
thiz
()
->
tableCount
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
if
(
unlikely
(
!
st
->
sanitize
(
c
)))
...
...
@@ -239,7 +240,7 @@ struct KernOT : KernTable<KernOT>
{
friend
struct
KernTable
<
KernOT
>
;
static
const
uint16_t
VERSION
=
0x0000u
;
static
const
uint16_t
minVersion
=
0
;
struct
SubTableHeader
{
...
...
@@ -275,7 +276,7 @@ struct KernOT : KernTable<KernOT>
protected:
HBUINT16
version
;
/* Version--0x0000u */
HBUINT16
nTables
;
/* Number of subtables in the kerning table. */
HBUINT16
tableCount
;
/* Number of subtables in the kerning table. */
UnsizedArrayOf
<
HBUINT8
>
dataZ
;
public:
DEFINE_SIZE_ARRAY
(
4
,
dataZ
);
...
...
@@ -285,7 +286,7 @@ struct KernAAT : KernTable<KernAAT>
{
friend
struct
KernTable
<
KernAAT
>
;
static
const
uint32_t
VERSION
=
0x00010000u
;
static
const
uint32_t
minVersion
=
0x00010000u
;
struct
SubTableHeader
{
...
...
@@ -320,7 +321,7 @@ struct KernAAT : KernTable<KernAAT>
protected:
HBUINT32
version
;
/* Version--0x00010000u */
HBUINT32
nTables
;
/* Number of subtables in the kerning table. */
HBUINT32
tableCount
;
/* Number of subtables in the kerning table. */
UnsizedArrayOf
<
HBUINT8
>
dataZ
;
public:
DEFINE_SIZE_ARRAY
(
8
,
dataZ
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录