Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
41a93d2c
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
接近 2 年 前同步成功
通知
1
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看板
提交
41a93d2c
编写于
5月 06, 2010
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove SANITIZE_WITH_BASE
上级
f5fab0c7
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
98 addition
and
101 deletion
+98
-101
src/hb-open-file-private.hh
src/hb-open-file-private.hh
+1
-1
src/hb-open-type-private.hh
src/hb-open-type-private.hh
+0
-2
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-common-private.hh
+3
-3
src/hb-ot-layout-gdef-private.hh
src/hb-ot-layout-gdef-private.hh
+12
-12
src/hb-ot-layout-gpos-private.hh
src/hb-ot-layout-gpos-private.hh
+45
-45
src/hb-ot-layout-gsub-private.hh
src/hb-ot-layout-gsub-private.hh
+15
-16
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+22
-22
未找到文件。
src/hb-open-file-private.hh
浏览文件 @
41a93d2c
...
@@ -127,7 +127,7 @@ struct TTCHeaderVersion1
...
@@ -127,7 +127,7 @@ struct TTCHeaderVersion1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
table
);
return
table
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
...
src/hb-open-type-private.hh
浏览文件 @
41a93d2c
...
@@ -240,8 +240,6 @@ struct hb_sanitize_context_t
...
@@ -240,8 +240,6 @@ struct hb_sanitize_context_t
#define SANITIZE(X) likely ((X).sanitize (context))
#define SANITIZE(X) likely ((X).sanitize (context))
#define SANITIZE_WITH_BASE(B,X) likely ((X).sanitize (context, CharP(B)))
#define SANITIZE_SELF() likely(context->check_range (this, sizeof (*this)))
#define SANITIZE_SELF() likely(context->check_range (this, sizeof (*this)))
...
...
src/hb-ot-layout-common-private.hh
浏览文件 @
41a93d2c
...
@@ -56,7 +56,7 @@ struct Record
...
@@ -56,7 +56,7 @@ struct Record
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
void
*
base
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
void
*
base
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
()
return
SANITIZE_SELF
()
&&
SANITIZE_WITH_BASE
(
base
,
offset
);
&&
offset
.
sanitize
(
context
,
base
);
}
}
Tag
tag
;
/* 4-byte Tag identifier */
Tag
tag
;
/* 4-byte Tag identifier */
...
@@ -204,8 +204,8 @@ struct Script
...
@@ -204,8 +204,8 @@ struct Script
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
defaultLangSy
s
)
return
defaultLangSys
.
sanitize
(
context
,
thi
s
)
&&
SANITIZE_WITH_BASE
(
this
,
langSy
s
);
&&
langSys
.
sanitize
(
context
,
thi
s
);
}
}
private:
private:
...
...
src/hb-ot-layout-gdef-private.hh
浏览文件 @
41a93d2c
...
@@ -69,8 +69,8 @@ struct AttachList
...
@@ -69,8 +69,8 @@ struct AttachList
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
coverage
)
return
coverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
attachPoint
);
&&
attachPoint
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
@@ -149,7 +149,7 @@ struct CaretValueFormat3
...
@@ -149,7 +149,7 @@ struct CaretValueFormat3
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
()
return
SANITIZE_SELF
()
&&
SANITIZE_WITH_BASE
(
this
,
deviceTable
);
&&
deviceTable
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
@@ -214,7 +214,7 @@ struct LigGlyph
...
@@ -214,7 +214,7 @@ struct LigGlyph
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
caret
s
);
return
carets
.
sanitize
(
context
,
thi
s
);
}
}
private:
private:
...
@@ -246,8 +246,8 @@ struct LigCaretList
...
@@ -246,8 +246,8 @@ struct LigCaretList
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
coverage
)
return
coverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
ligGlyph
);
&&
ligGlyph
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
@@ -268,7 +268,7 @@ struct MarkGlyphSetsFormat1
...
@@ -268,7 +268,7 @@ struct MarkGlyphSetsFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
coverage
);
return
coverage
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
@@ -352,11 +352,11 @@ struct GDEF
...
@@ -352,11 +352,11 @@ struct GDEF
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE
(
version
)
&&
likely
(
version
.
major
==
1
)
return
SANITIZE
(
version
)
&&
likely
(
version
.
major
==
1
)
&&
SANITIZE_WITH_BASE
(
this
,
glyphClassDef
)
&&
glyphClassDef
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
attachList
)
&&
attachList
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
ligCaretList
)
&&
ligCaretList
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
markAttachClassDef
)
&&
markAttachClassDef
.
sanitize
(
context
,
this
)
&&
(
version
<
0x00010002
||
SANITIZE_WITH_BASE
(
this
,
markGlyphSetsDef
[
0
]
));
&&
(
version
<
0x00010002
||
markGlyphSetsDef
[
0
].
sanitize
(
context
,
this
));
}
}
private:
private:
...
...
src/hb-ot-layout-gpos-private.hh
浏览文件 @
41a93d2c
/*
/*
* Copyright (C) 2007,2008,2009 Red Hat, Inc.
* Copyright (C) 2007,2008,2009
,2010
Red Hat, Inc.
*
*
* This is part of HarfBuzz, a text shaping library.
* This is part of HarfBuzz, a text shaping library.
*
*
...
@@ -106,10 +106,10 @@ struct ValueFormat : USHORT
...
@@ -106,10 +106,10 @@ struct ValueFormat : USHORT
x_scale
=
layout
->
font
->
x_scale
;
x_scale
=
layout
->
font
->
x_scale
;
y_scale
=
layout
->
font
->
y_scale
;
y_scale
=
layout
->
font
->
y_scale
;
/* design units -> fractional pixel */
/* design units -> fractional pixel */
if
(
format
&
xPlacement
)
glyph_pos
->
x_offset
+=
_hb_16dot16_mul_round
(
x_scale
,
*
(
SHORT
*
)
values
++
);
if
(
format
&
xPlacement
)
glyph_pos
->
x_offset
+=
_hb_16dot16_mul_round
(
x_scale
,
*
CastP
<
SHORT
>
(
values
++
)
);
if
(
format
&
yPlacement
)
glyph_pos
->
y_offset
+=
_hb_16dot16_mul_round
(
y_scale
,
*
(
SHORT
*
)
values
++
);
if
(
format
&
yPlacement
)
glyph_pos
->
y_offset
+=
_hb_16dot16_mul_round
(
y_scale
,
*
CastP
<
SHORT
>
(
values
++
)
);
if
(
format
&
xAdvance
)
glyph_pos
->
x_advance
+=
_hb_16dot16_mul_round
(
x_scale
,
*
(
SHORT
*
)
values
++
);
if
(
format
&
xAdvance
)
glyph_pos
->
x_advance
+=
_hb_16dot16_mul_round
(
x_scale
,
*
CastP
<
SHORT
>
(
values
++
)
);
if
(
format
&
yAdvance
)
glyph_pos
->
y_advance
+=
_hb_16dot16_mul_round
(
y_scale
,
*
(
SHORT
*
)
values
++
);
if
(
format
&
yAdvance
)
glyph_pos
->
y_advance
+=
_hb_16dot16_mul_round
(
y_scale
,
*
CastP
<
SHORT
>
(
values
++
)
);
if
(
!
has_device
())
return
;
if
(
!
has_device
())
return
;
...
@@ -120,21 +120,21 @@ struct ValueFormat : USHORT
...
@@ -120,21 +120,21 @@ struct ValueFormat : USHORT
/* pixel -> fractional pixel */
/* pixel -> fractional pixel */
if
(
format
&
xPlaDevice
)
{
if
(
format
&
xPlaDevice
)
{
if
(
x_ppem
)
glyph_pos
->
x_offset
+=
(
base
+*
(
OffsetTo
<
Device
>*
)
values
++
).
get_delta
(
x_ppem
)
<<
16
;
else
values
++
;
if
(
x_ppem
)
glyph_pos
->
x_offset
+=
(
base
+*
CastP
<
OffsetTo
<
Device
>
>
(
values
++
)
).
get_delta
(
x_ppem
)
<<
16
;
else
values
++
;
}
}
if
(
format
&
yPlaDevice
)
{
if
(
format
&
yPlaDevice
)
{
if
(
y_ppem
)
glyph_pos
->
y_offset
+=
(
base
+*
(
OffsetTo
<
Device
>*
)
values
++
).
get_delta
(
y_ppem
)
<<
16
;
else
values
++
;
if
(
y_ppem
)
glyph_pos
->
y_offset
+=
(
base
+*
CastP
<
OffsetTo
<
Device
>
>
(
values
++
)
).
get_delta
(
y_ppem
)
<<
16
;
else
values
++
;
}
}
if
(
format
&
xAdvDevice
)
{
if
(
format
&
xAdvDevice
)
{
if
(
x_ppem
)
glyph_pos
->
x_advance
+=
(
base
+*
(
OffsetTo
<
Device
>*
)
values
++
).
get_delta
(
x_ppem
)
<<
16
;
else
values
++
;
if
(
x_ppem
)
glyph_pos
->
x_advance
+=
(
base
+*
CastP
<
OffsetTo
<
Device
>
>
(
values
++
)
).
get_delta
(
x_ppem
)
<<
16
;
else
values
++
;
}
}
if
(
format
&
yAdvDevice
)
{
if
(
format
&
yAdvDevice
)
{
if
(
y_ppem
)
glyph_pos
->
y_advance
+=
(
base
+*
(
OffsetTo
<
Device
>*
)
values
++
).
get_delta
(
y_ppem
)
<<
16
;
else
values
++
;
if
(
y_ppem
)
glyph_pos
->
y_advance
+=
(
base
+*
CastP
<
OffsetTo
<
Device
>
>
(
values
++
)
).
get_delta
(
y_ppem
)
<<
16
;
else
values
++
;
}
}
}
}
private:
private:
inline
bool
sanitize_value_devices
(
hb_sanitize_context_t
*
context
,
void
*
base
,
const
Value
*
values
)
{
inline
bool
sanitize_value_devices
(
hb_sanitize_context_t
*
context
,
void
*
base
,
Value
*
values
)
{
unsigned
int
format
=
*
this
;
unsigned
int
format
=
*
this
;
if
(
format
&
xPlacement
)
values
++
;
if
(
format
&
xPlacement
)
values
++
;
...
@@ -142,10 +142,10 @@ struct ValueFormat : USHORT
...
@@ -142,10 +142,10 @@ struct ValueFormat : USHORT
if
(
format
&
xAdvance
)
values
++
;
if
(
format
&
xAdvance
)
values
++
;
if
(
format
&
yAdvance
)
values
++
;
if
(
format
&
yAdvance
)
values
++
;
if
((
format
&
xPlaDevice
)
&&
!
SANITIZE_WITH_BASE
(
base
,
*
(
OffsetTo
<
Device
>*
)
values
++
))
return
false
;
if
((
format
&
xPlaDevice
)
&&
!
CastP
<
OffsetTo
<
Device
>
>
(
values
++
)
->
sanitize
(
context
,
base
))
return
false
;
if
((
format
&
yPlaDevice
)
&&
!
SANITIZE_WITH_BASE
(
base
,
*
(
OffsetTo
<
Device
>*
)
values
++
))
return
false
;
if
((
format
&
yPlaDevice
)
&&
!
CastP
<
OffsetTo
<
Device
>
>
(
values
++
)
->
sanitize
(
context
,
base
))
return
false
;
if
((
format
&
xAdvDevice
)
&&
!
SANITIZE_WITH_BASE
(
base
,
*
(
OffsetTo
<
Device
>*
)
values
++
))
return
false
;
if
((
format
&
xAdvDevice
)
&&
!
CastP
<
OffsetTo
<
Device
>
>
(
values
++
)
->
sanitize
(
context
,
base
))
return
false
;
if
((
format
&
yAdvDevice
)
&&
!
SANITIZE_WITH_BASE
(
base
,
*
(
OffsetTo
<
Device
>*
)
values
++
))
return
false
;
if
((
format
&
yAdvDevice
)
&&
!
CastP
<
OffsetTo
<
Device
>
>
(
values
++
)
->
sanitize
(
context
,
base
))
return
false
;
return
true
;
return
true
;
}
}
...
@@ -157,13 +157,13 @@ struct ValueFormat : USHORT
...
@@ -157,13 +157,13 @@ struct ValueFormat : USHORT
return
(
format
&
devices
)
!=
0
;
return
(
format
&
devices
)
!=
0
;
}
}
inline
bool
sanitize_value
(
hb_sanitize_context_t
*
context
,
void
*
base
,
const
Value
*
values
)
{
inline
bool
sanitize_value
(
hb_sanitize_context_t
*
context
,
void
*
base
,
Value
*
values
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
context
->
check_range
(
values
,
get_size
())
return
context
->
check_range
(
values
,
get_size
())
&&
(
!
has_device
()
||
sanitize_value_devices
(
context
,
base
,
values
));
&&
(
!
has_device
()
||
sanitize_value_devices
(
context
,
base
,
values
));
}
}
inline
bool
sanitize_values
(
hb_sanitize_context_t
*
context
,
void
*
base
,
const
Value
*
values
,
unsigned
int
count
)
{
inline
bool
sanitize_values
(
hb_sanitize_context_t
*
context
,
void
*
base
,
Value
*
values
,
unsigned
int
count
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
unsigned
int
len
=
get_len
();
unsigned
int
len
=
get_len
();
...
@@ -181,7 +181,7 @@ struct ValueFormat : USHORT
...
@@ -181,7 +181,7 @@ struct ValueFormat : USHORT
}
}
/* Just sanitize referenced Device tables. Doesn't check the values themselves. */
/* Just sanitize referenced Device tables. Doesn't check the values themselves. */
inline
bool
sanitize_values_stride_unsafe
(
hb_sanitize_context_t
*
context
,
void
*
base
,
const
Value
*
values
,
unsigned
int
count
,
unsigned
int
stride
)
{
inline
bool
sanitize_values_stride_unsafe
(
hb_sanitize_context_t
*
context
,
void
*
base
,
Value
*
values
,
unsigned
int
count
,
unsigned
int
stride
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
if
(
!
has_device
())
return
true
;
if
(
!
has_device
())
return
true
;
...
@@ -275,8 +275,8 @@ struct AnchorFormat3
...
@@ -275,8 +275,8 @@ struct AnchorFormat3
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
()
return
SANITIZE_SELF
()
&&
SANITIZE_WITH_BASE
(
this
,
xDeviceTable
)
&&
xDeviceTable
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
yDeviceTable
);
&&
yDeviceTable
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
@@ -343,7 +343,7 @@ struct AnchorMatrix
...
@@ -343,7 +343,7 @@ struct AnchorMatrix
unsigned
int
count
=
rows
*
cols
;
unsigned
int
count
=
rows
*
cols
;
if
(
!
context
->
check_array
(
matrix
,
matrix
[
0
].
get_size
(),
count
))
return
false
;
if
(
!
context
->
check_array
(
matrix
,
matrix
[
0
].
get_size
(),
count
))
return
false
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
if
(
!
SANITIZE_WITH_BASE
(
this
,
matrix
[
i
]
))
return
false
;
if
(
!
matrix
[
i
].
sanitize
(
context
,
this
))
return
false
;
return
true
;
return
true
;
}
}
...
@@ -365,7 +365,7 @@ struct MarkRecord
...
@@ -365,7 +365,7 @@ struct MarkRecord
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
void
*
base
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
void
*
base
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
()
return
SANITIZE_SELF
()
&&
SANITIZE_WITH_BASE
(
base
,
markAnchor
);
&&
markAnchor
.
sanitize
(
context
,
base
);
}
}
private:
private:
...
@@ -408,7 +408,7 @@ struct MarkArray
...
@@ -408,7 +408,7 @@ struct MarkArray
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
markRecord
);
return
markRecord
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
@@ -441,7 +441,7 @@ struct SinglePosFormat1
...
@@ -441,7 +441,7 @@ struct SinglePosFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
()
return
SANITIZE_SELF
()
&&
SANITIZE_WITH_BASE
(
this
,
coverage
)
&&
coverage
.
sanitize
(
context
,
this
)
&&
valueFormat
.
sanitize_value
(
context
,
CharP
(
this
),
values
);
&&
valueFormat
.
sanitize_value
(
context
,
CharP
(
this
),
values
);
}
}
...
@@ -484,7 +484,7 @@ struct SinglePosFormat2
...
@@ -484,7 +484,7 @@ struct SinglePosFormat2
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
()
return
SANITIZE_SELF
()
&&
SANITIZE_WITH_BASE
(
this
,
coverage
)
&&
coverage
.
sanitize
(
context
,
this
)
&&
valueFormat
.
sanitize_values
(
context
,
CharP
(
this
),
values
,
valueCount
);
&&
valueFormat
.
sanitize_values
(
context
,
CharP
(
this
),
values
,
valueCount
);
}
}
...
@@ -623,7 +623,7 @@ struct PairPosFormat1
...
@@ -623,7 +623,7 @@ struct PairPosFormat1
unsigned
int
len2
=
valueFormat2
.
get_len
();
unsigned
int
len2
=
valueFormat2
.
get_len
();
if
(
!
(
SANITIZE_SELF
()
if
(
!
(
SANITIZE_SELF
()
&&
SANITIZE_WITH_BASE
(
this
,
coverage
)
&&
coverage
.
sanitize
(
context
,
this
)
&&
likely
(
pairSet
.
sanitize
(
context
,
CharP
(
this
),
len1
+
len2
))))
return
false
;
&&
likely
(
pairSet
.
sanitize
(
context
,
CharP
(
this
),
len1
+
len2
))))
return
false
;
if
(
!
(
valueFormat1
.
has_device
()
||
valueFormat2
.
has_device
()))
return
true
;
if
(
!
(
valueFormat1
.
has_device
()
||
valueFormat2
.
has_device
()))
return
true
;
...
@@ -632,10 +632,10 @@ struct PairPosFormat1
...
@@ -632,10 +632,10 @@ struct PairPosFormat1
unsigned
int
count1
=
pairSet
.
len
;
unsigned
int
count1
=
pairSet
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count1
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
count1
;
i
++
)
{
{
const
PairSet
&
pair_set
=
this
+
pairSet
[
i
];
PairSet
&
pair_set
=
const_cast
<
PairSet
&>
(
this
+
pairSet
[
i
]);
/* XXX clean this up */
unsigned
int
count2
=
pair_set
.
len
;
unsigned
int
count2
=
pair_set
.
len
;
const
PairValueRecord
*
record
=
pair_set
.
array
;
PairValueRecord
*
record
=
pair_set
.
array
;
if
(
!
(
valueFormat1
.
sanitize_values_stride_unsafe
(
context
,
CharP
(
this
),
&
record
->
values
[
0
],
count2
,
stride
)
&&
if
(
!
(
valueFormat1
.
sanitize_values_stride_unsafe
(
context
,
CharP
(
this
),
&
record
->
values
[
0
],
count2
,
stride
)
&&
valueFormat2
.
sanitize_values_stride_unsafe
(
context
,
CharP
(
this
),
&
record
->
values
[
len1
],
count2
,
stride
)))
valueFormat2
.
sanitize_values_stride_unsafe
(
context
,
CharP
(
this
),
&
record
->
values
[
len1
],
count2
,
stride
)))
return
false
;
return
false
;
...
@@ -708,9 +708,9 @@ struct PairPosFormat2
...
@@ -708,9 +708,9 @@ struct PairPosFormat2
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
if
(
!
(
SANITIZE_SELF
()
if
(
!
(
SANITIZE_SELF
()
&&
SANITIZE_WITH_BASE
(
this
,
coverage
)
&&
coverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
classDef1
)
&&
classDef1
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
classDef2
)))
return
false
;
&&
classDef2
.
sanitize
(
context
,
this
)))
return
false
;
unsigned
int
len1
=
valueFormat1
.
get_len
();
unsigned
int
len1
=
valueFormat1
.
get_len
();
unsigned
int
len2
=
valueFormat2
.
get_len
();
unsigned
int
len2
=
valueFormat2
.
get_len
();
...
@@ -791,8 +791,8 @@ struct EntryExitRecord
...
@@ -791,8 +791,8 @@ struct EntryExitRecord
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
void
*
base
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
void
*
base
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
base
,
entryAnchor
)
return
entryAnchor
.
sanitize
(
context
,
base
)
&&
SANITIZE_WITH_BASE
(
base
,
exitAnchor
);
&&
exitAnchor
.
sanitize
(
context
,
base
);
}
}
OffsetTo
<
Anchor
>
OffsetTo
<
Anchor
>
...
@@ -988,8 +988,8 @@ struct CursivePosFormat1
...
@@ -988,8 +988,8 @@ struct CursivePosFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
coverage
)
return
coverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
entryExitRecord
);
&&
entryExitRecord
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
@@ -1077,9 +1077,9 @@ struct MarkBasePosFormat1
...
@@ -1077,9 +1077,9 @@ struct MarkBasePosFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
()
return
SANITIZE_SELF
()
&&
SANITIZE_WITH_BASE
(
this
,
markCoverage
)
&&
markCoverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
baseCoverage
)
&&
baseCoverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
markArray
)
&&
markArray
.
sanitize
(
context
,
this
)
&&
likely
(
baseArray
.
sanitize
(
context
,
CharP
(
this
),
(
unsigned
int
)
classCount
));
&&
likely
(
baseArray
.
sanitize
(
context
,
CharP
(
this
),
(
unsigned
int
)
classCount
));
}
}
...
@@ -1201,9 +1201,9 @@ struct MarkLigPosFormat1
...
@@ -1201,9 +1201,9 @@ struct MarkLigPosFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
()
return
SANITIZE_SELF
()
&&
SANITIZE_WITH_BASE
(
this
,
markCoverage
)
&&
markCoverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
ligatureCoverage
)
&&
ligatureCoverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
markArray
)
&&
markArray
.
sanitize
(
context
,
this
)
&&
likely
(
ligatureArray
.
sanitize
(
context
,
CharP
(
this
),
(
unsigned
int
)
classCount
));
&&
likely
(
ligatureArray
.
sanitize
(
context
,
CharP
(
this
),
(
unsigned
int
)
classCount
));
}
}
...
@@ -1304,9 +1304,9 @@ struct MarkMarkPosFormat1
...
@@ -1304,9 +1304,9 @@ struct MarkMarkPosFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
()
return
SANITIZE_SELF
()
&&
SANITIZE_WITH_BASE
(
this
,
mark1Coverage
)
&&
mark1Coverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
mark2Coverage
)
&&
mark2Coverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
mark1Array
)
&&
mark1Array
.
sanitize
(
context
,
this
)
&&
likely
(
mark2Array
.
sanitize
(
context
,
CharP
(
this
),
(
unsigned
int
)
classCount
));
&&
likely
(
mark2Array
.
sanitize
(
context
,
CharP
(
this
),
(
unsigned
int
)
classCount
));
}
}
...
@@ -1548,7 +1548,7 @@ struct PosLookup : Lookup
...
@@ -1548,7 +1548,7 @@ struct PosLookup : Lookup
TRACE_SANITIZE
();
TRACE_SANITIZE
();
if
(
unlikely
(
!
Lookup
::
sanitize
(
context
)))
return
false
;
if
(
unlikely
(
!
Lookup
::
sanitize
(
context
)))
return
false
;
OffsetArrayOf
<
PosLookupSubTable
>
&
list
=
CastR
<
OffsetArrayOf
<
PosLookupSubTable
>
>
(
subTable
);
OffsetArrayOf
<
PosLookupSubTable
>
&
list
=
CastR
<
OffsetArrayOf
<
PosLookupSubTable
>
>
(
subTable
);
return
SANITIZE_WITH_BASE
(
this
,
list
);
return
list
.
sanitize
(
context
,
this
);
}
}
};
};
...
@@ -1576,7 +1576,7 @@ struct GPOS : GSUBGPOS
...
@@ -1576,7 +1576,7 @@ struct GPOS : GSUBGPOS
TRACE_SANITIZE
();
TRACE_SANITIZE
();
if
(
unlikely
(
!
GSUBGPOS
::
sanitize
(
context
)))
return
false
;
if
(
unlikely
(
!
GSUBGPOS
::
sanitize
(
context
)))
return
false
;
OffsetTo
<
PosLookupList
>
&
list
=
CastR
<
OffsetTo
<
PosLookupList
>
>
(
lookupList
);
OffsetTo
<
PosLookupList
>
&
list
=
CastR
<
OffsetTo
<
PosLookupList
>
>
(
lookupList
);
return
SANITIZE_WITH_BASE
(
this
,
list
);
return
list
.
sanitize
(
context
,
this
);
}
}
};
};
ASSERT_SIZE
(
GPOS
,
10
);
ASSERT_SIZE
(
GPOS
,
10
);
...
...
src/hb-ot-layout-gsub-private.hh
浏览文件 @
41a93d2c
/*
/*
* Copyright (C) 2007,2008,2009 Red Hat, Inc.
* Copyright (C) 2007,2008,2009
,2010
Red Hat, Inc.
*
*
* This is part of HarfBuzz, a text shaping library.
* This is part of HarfBuzz, a text shaping library.
*
*
...
@@ -60,7 +60,7 @@ struct SingleSubstFormat1
...
@@ -60,7 +60,7 @@ struct SingleSubstFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
coverage
)
return
coverage
.
sanitize
(
context
,
this
)
&&
SANITIZE
(
deltaGlyphID
);
&&
SANITIZE
(
deltaGlyphID
);
}
}
...
@@ -103,7 +103,7 @@ struct SingleSubstFormat2
...
@@ -103,7 +103,7 @@ struct SingleSubstFormat2
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
coverage
)
return
coverage
.
sanitize
(
context
,
this
)
&&
SANITIZE
(
substitute
);
&&
SANITIZE
(
substitute
);
}
}
...
@@ -214,8 +214,8 @@ struct MultipleSubstFormat1
...
@@ -214,8 +214,8 @@ struct MultipleSubstFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
coverage
)
return
coverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
sequence
);
&&
sequence
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
@@ -310,8 +310,8 @@ struct AlternateSubstFormat1
...
@@ -310,8 +310,8 @@ struct AlternateSubstFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
coverage
)
return
coverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
alternateSet
);
&&
alternateSet
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
@@ -463,7 +463,7 @@ struct LigatureSet
...
@@ -463,7 +463,7 @@ struct LigatureSet
public:
public:
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
ligature
);
return
ligature
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
@@ -495,8 +495,8 @@ struct LigatureSubstFormat1
...
@@ -495,8 +495,8 @@ struct LigatureSubstFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
coverage
)
return
coverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
ligatureSet
);
&&
ligatureSet
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
@@ -626,11 +626,11 @@ struct ReverseChainSingleSubstFormat1
...
@@ -626,11 +626,11 @@ struct ReverseChainSingleSubstFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
if
(
!
(
SANITIZE_WITH_BASE
(
this
,
coverage
)
if
(
!
(
coverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
backtrack
)))
&&
backtrack
.
sanitize
(
context
,
this
)))
return
false
;
return
false
;
OffsetArrayOf
<
Coverage
>
&
lookahead
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
backtrack
);
OffsetArrayOf
<
Coverage
>
&
lookahead
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
backtrack
);
if
(
!
SANITIZE_WITH_BASE
(
this
,
lookahead
))
if
(
!
lookahead
.
sanitize
(
context
,
this
))
return
false
;
return
false
;
ArrayOf
<
GlyphID
>
&
substitute
=
StructAfter
<
ArrayOf
<
GlyphID
>
>
(
lookahead
);
ArrayOf
<
GlyphID
>
&
substitute
=
StructAfter
<
ArrayOf
<
GlyphID
>
>
(
lookahead
);
return
SANITIZE
(
substitute
);
return
SANITIZE
(
substitute
);
...
@@ -860,7 +860,7 @@ struct SubstLookup : Lookup
...
@@ -860,7 +860,7 @@ struct SubstLookup : Lookup
TRACE_SANITIZE
();
TRACE_SANITIZE
();
if
(
unlikely
(
!
Lookup
::
sanitize
(
context
)))
return
false
;
if
(
unlikely
(
!
Lookup
::
sanitize
(
context
)))
return
false
;
OffsetArrayOf
<
SubstLookupSubTable
>
&
list
=
CastR
<
OffsetArrayOf
<
SubstLookupSubTable
>
>
(
subTable
);
OffsetArrayOf
<
SubstLookupSubTable
>
&
list
=
CastR
<
OffsetArrayOf
<
SubstLookupSubTable
>
>
(
subTable
);
return
SANITIZE_WITH_BASE
(
this
,
list
);
return
list
.
sanitize
(
context
,
this
);
}
}
};
};
...
@@ -884,12 +884,11 @@ struct GSUB : GSUBGPOS
...
@@ -884,12 +884,11 @@ struct GSUB : GSUBGPOS
hb_mask_t
mask
)
const
hb_mask_t
mask
)
const
{
return
get_lookup
(
lookup_index
).
apply_string
(
layout
,
buffer
,
mask
);
}
{
return
get_lookup
(
lookup_index
).
apply_string
(
layout
,
buffer
,
mask
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
if
(
unlikely
(
!
GSUBGPOS
::
sanitize
(
context
)))
return
false
;
if
(
unlikely
(
!
GSUBGPOS
::
sanitize
(
context
)))
return
false
;
OffsetTo
<
SubstLookupList
>
&
list
=
CastR
<
OffsetTo
<
SubstLookupList
>
>
(
lookupList
);
OffsetTo
<
SubstLookupList
>
&
list
=
CastR
<
OffsetTo
<
SubstLookupList
>
>
(
lookupList
);
return
SANITIZE_WITH_BASE
(
this
,
list
);
return
list
.
sanitize
(
context
,
this
);
}
}
};
};
ASSERT_SIZE
(
GSUB
,
10
);
ASSERT_SIZE
(
GSUB
,
10
);
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
41a93d2c
/*
/*
* Copyright (C) 2007,2008,2009 Red Hat, Inc.
* Copyright (C) 2007,2008,2009
,2010
Red Hat, Inc.
*
*
* This is part of HarfBuzz, a text shaping library.
* This is part of HarfBuzz, a text shaping library.
*
*
...
@@ -323,7 +323,7 @@ struct RuleSet
...
@@ -323,7 +323,7 @@ struct RuleSet
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
rule
);
return
rule
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
@@ -355,8 +355,8 @@ struct ContextFormat1
...
@@ -355,8 +355,8 @@ struct ContextFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
coverage
)
return
coverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
ruleSet
);
&&
ruleSet
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
@@ -398,9 +398,9 @@ struct ContextFormat2
...
@@ -398,9 +398,9 @@ struct ContextFormat2
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
coverage
)
return
coverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
classDef
)
&&
classDef
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
ruleSet
);
&&
ruleSet
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
@@ -447,7 +447,7 @@ struct ContextFormat3
...
@@ -447,7 +447,7 @@ struct ContextFormat3
unsigned
int
count
=
glyphCount
;
unsigned
int
count
=
glyphCount
;
if
(
!
context
->
check_array
(
coverage
,
OffsetTo
<
Coverage
>::
get_size
(),
count
))
return
false
;
if
(
!
context
->
check_array
(
coverage
,
OffsetTo
<
Coverage
>::
get_size
(),
count
))
return
false
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
if
(
!
SANITIZE_WITH_BASE
(
this
,
coverage
[
i
]
))
return
false
;
if
(
!
coverage
[
i
].
sanitize
(
context
,
this
))
return
false
;
LookupRecord
*
lookupRecord
=
&
StructAtOffset
<
LookupRecord
>
(
coverage
,
OffsetTo
<
Coverage
>::
get_size
()
*
count
);
LookupRecord
*
lookupRecord
=
&
StructAtOffset
<
LookupRecord
>
(
coverage
,
OffsetTo
<
Coverage
>::
get_size
()
*
count
);
return
context
->
check_array
(
lookupRecord
,
LookupRecord
::
get_size
(),
lookupCount
);
return
context
->
check_array
(
lookupRecord
,
LookupRecord
::
get_size
(),
lookupCount
);
}
}
...
@@ -609,7 +609,7 @@ struct ChainRuleSet
...
@@ -609,7 +609,7 @@ struct ChainRuleSet
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
rule
);
return
rule
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
@@ -641,8 +641,8 @@ struct ChainContextFormat1
...
@@ -641,8 +641,8 @@ struct ChainContextFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
coverage
)
return
coverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
ruleSet
);
&&
ruleSet
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
@@ -688,11 +688,11 @@ struct ChainContextFormat2
...
@@ -688,11 +688,11 @@ struct ChainContextFormat2
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_WITH_BASE
(
this
,
coverage
)
return
coverage
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
backtrackClassDef
)
&&
backtrackClassDef
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
inputClassDef
)
&&
inputClassDef
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
lookaheadClassDef
)
&&
lookaheadClassDef
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
ruleSet
);
&&
ruleSet
.
sanitize
(
context
,
this
);
}
}
private:
private:
...
@@ -750,11 +750,11 @@ struct ChainContextFormat3
...
@@ -750,11 +750,11 @@ struct ChainContextFormat3
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
if
(
!
SANITIZE_WITH_BASE
(
this
,
backtrack
))
return
false
;
if
(
!
backtrack
.
sanitize
(
context
,
this
))
return
false
;
OffsetArrayOf
<
Coverage
>
&
input
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
backtrack
);
OffsetArrayOf
<
Coverage
>
&
input
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
backtrack
);
if
(
!
SANITIZE_WITH_BASE
(
this
,
input
))
return
false
;
if
(
!
input
.
sanitize
(
context
,
this
))
return
false
;
OffsetArrayOf
<
Coverage
>
&
lookahead
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
input
);
OffsetArrayOf
<
Coverage
>
&
lookahead
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
input
);
if
(
!
SANITIZE_WITH_BASE
(
this
,
lookahead
))
return
false
;
if
(
!
lookahead
.
sanitize
(
context
,
this
))
return
false
;
ArrayOf
<
LookupRecord
>
&
lookup
=
StructAfter
<
ArrayOf
<
LookupRecord
>
>
(
lookahead
);
ArrayOf
<
LookupRecord
>
&
lookup
=
StructAfter
<
ArrayOf
<
LookupRecord
>
>
(
lookahead
);
return
SANITIZE
(
lookup
);
return
SANITIZE
(
lookup
);
}
}
...
@@ -914,9 +914,9 @@ struct GSUBGPOS
...
@@ -914,9 +914,9 @@ struct GSUBGPOS
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE
(
version
)
&&
likely
(
version
.
major
==
1
)
return
SANITIZE
(
version
)
&&
likely
(
version
.
major
==
1
)
&&
SANITIZE_WITH_BASE
(
this
,
scriptList
)
&&
scriptList
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
featureList
)
&&
featureList
.
sanitize
(
context
,
this
)
&&
SANITIZE_WITH_BASE
(
this
,
lookupList
);
&&
lookupList
.
sanitize
(
context
,
this
);
}
}
protected:
protected:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录