Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
abc12f7b
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,发现更多精彩内容 >>
提交
abc12f7b
编写于
5月 08, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move null pool to hb-private
上级
08e280fd
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
79 addition
and
85 deletion
+79
-85
src/dump-emoji.cc
src/dump-emoji.cc
+3
-3
src/dump-fon.cc
src/dump-fon.cc
+7
-7
src/hb-aat-layout.cc
src/hb-aat-layout.cc
+4
-4
src/hb-open-type-private.hh
src/hb-open-type-private.hh
+3
-45
src/hb-ot-cmap-table.hh
src/hb-ot-cmap-table.hh
+2
-2
src/hb-ot-color.cc
src/hb-ot-color.cc
+2
-2
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-common-private.hh
+10
-3
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+11
-11
src/hb-ot-math.cc
src/hb-ot-math.cc
+2
-2
src/hb-ot-var.cc
src/hb-ot-var.cc
+3
-3
src/hb-private.hh
src/hb-private.hh
+29
-0
src/hb-subset.cc
src/hb-subset.cc
+2
-2
src/main.cc
src/main.cc
+1
-1
未找到文件。
src/dump-emoji.cc
浏览文件 @
abc12f7b
...
...
@@ -47,7 +47,7 @@
#include <stdio.h>
#ifndef HB_NO_VISIBILITY
const
void
*
const
OT
::
_hb_NullPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
=
{};
const
void
*
const
_hb_NullPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
=
{};
#endif
void
cbdt_callback
(
const
uint8_t
*
data
,
unsigned
int
length
,
...
...
@@ -91,7 +91,7 @@ void svg_callback (const uint8_t* data, unsigned int length,
void
colr_cpal_rendering
(
cairo_font_face_t
*
cairo_face
,
unsigned
int
upem
,
unsigned
int
num_glyphs
,
const
OT
::
COLR
*
colr
,
const
OT
::
CPAL
*
cpal
)
{
for
(
int
i
=
0
;
i
<
num_glyphs
;
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
num_glyphs
;
++
i
)
{
unsigned
int
first_layer_index
,
num_layers
;
if
(
colr
->
get_base_glyph_record
(
i
,
&
first_layer_index
,
&
num_layers
))
...
...
@@ -171,7 +171,7 @@ void dump_glyphs (cairo_font_face_t *cairo_face, unsigned int upem, unsigned int
{
// Dump every glyph available on the font
return
;
// disabled for now
for
(
int
i
=
0
;
i
<
num_glyphs
;
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
num_glyphs
;
++
i
)
{
cairo_text_extents_t
extents
;
cairo_glyph_t
glyph
=
{
0
};
...
...
src/dump-fon.cc
浏览文件 @
abc12f7b
...
...
@@ -27,7 +27,7 @@
#include "hb-open-type-private.hh"
#ifndef HB_NO_VISIBILITY
const
void
*
const
OT
::
_hb_NullPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
=
{};
const
void
*
const
_hb_NullPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
=
{};
#endif
template
<
typename
Type
,
int
Bytes
>
struct
LEInt
;
...
...
@@ -344,7 +344,7 @@ struct NE_TYPEINFO
{
const
NE_TYPEINFO
&
next
=
OT
::
StructAfter
<
NE_TYPEINFO
>
(
*
this
);
if
(
type_id
==
0
)
return
OT
::
Null
(
NE_TYPEINFO
);
return
Null
(
NE_TYPEINFO
);
return
next
;
}
...
...
@@ -352,7 +352,7 @@ struct NE_TYPEINFO
{
if
(
idx
<
count
)
return
resources
[
idx
].
get_font
(
base
,
shift
);
return
OT
::
Null
(
LE_FONTINFO16
);
return
Null
(
LE_FONTINFO16
);
}
inline
unsigned
int
get_count
()
const
...
...
@@ -401,7 +401,7 @@ struct NE_RESOURCE_TABLE
return_trace
(
false
);
const
NE_TYPEINFO
*
n
=
&
chain
;
while
(
n
!=
&
OT
::
Null
(
NE_TYPEINFO
)
&&
c
->
check_struct
(
n
)
&&
n
->
get_type_id
()
!=
0
)
while
(
n
!=
&
Null
(
NE_TYPEINFO
)
&&
c
->
check_struct
(
n
)
&&
n
->
get_type_id
()
!=
0
)
{
if
(
n
->
get_type_id
()
==
NE_TYPEINFO
::
FONT
)
return_trace
(
n
->
sanitize
(
c
,
base
,
alignmentShiftCount
));
...
...
@@ -418,13 +418,13 @@ struct NE_RESOURCE_TABLE
inline
const
NE_TYPEINFO
&
get_fonts_entry
()
const
{
const
NE_TYPEINFO
*
n
=
&
chain
;
while
(
n
!=
&
OT
::
Null
(
NE_TYPEINFO
)
&&
n
->
get_type_id
()
!=
0
)
while
(
n
!=
&
Null
(
NE_TYPEINFO
)
&&
n
->
get_type_id
()
!=
0
)
{
if
(
n
->
get_type_id
()
==
NE_TYPEINFO
::
FONT
)
return
*
n
;
n
=
&
n
->
next
();
}
return
OT
::
Null
(
NE_TYPEINFO
);
return
Null
(
NE_TYPEINFO
);
}
protected:
...
...
@@ -447,7 +447,7 @@ struct LE_IMAGE_OS2_HEADER
inline
const
NE_RESOURCE_TABLE
&
get_resource_table
()
const
{
if
(
magic
!=
0x454E
)
// Only NE containers are support for now, NE == 0x454E
return
OT
::
Null
(
NE_RESOURCE_TABLE
);
return
Null
(
NE_RESOURCE_TABLE
);
return
this
+
rsrctab
;
}
...
...
src/hb-aat-layout.cc
浏览文件 @
abc12f7b
...
...
@@ -52,7 +52,7 @@ _get_ankr (hb_face_t *face, hb_blob_t **blob = nullptr)
{
if (blob)
*blob = hb_blob_get_empty ();
return
OT::
Null(AAT::ankr);
return Null(AAT::ankr);
}
hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
const AAT::ankr& ankr = *(layout->ankr.get ());
...
...
@@ -68,7 +68,7 @@ _get_kerx (hb_face_t *face, hb_blob_t **blob = nullptr)
{
if (blob)
*blob = hb_blob_get_empty ();
return
OT::
Null(AAT::kerx);
return Null(AAT::kerx);
}
hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
/* XXX this doesn't call set_num_glyphs on sanitizer. */
...
...
@@ -85,7 +85,7 @@ _get_morx (hb_face_t *face, hb_blob_t **blob = nullptr)
{
if (blob)
*blob = hb_blob_get_empty ();
return
OT::
Null(AAT::morx);
return Null(AAT::morx);
}
hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
/* XXX this doesn't call set_num_glyphs on sanitizer. */
...
...
@@ -102,7 +102,7 @@ _get_trak (hb_face_t *face, hb_blob_t **blob = nullptr)
{
if (blob)
*blob = hb_blob_get_empty ();
return
OT::
Null(AAT::trak);
return Null(AAT::trak);
}
hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
const AAT::trak& trak = *(layout->trak.get ());
...
...
src/hb-open-type-private.hh
浏览文件 @
abc12f7b
...
...
@@ -126,46 +126,6 @@ static inline Type& StructAfter(TObject &X)
/*
* Null objects
*/
/* Global nul-content Null pool. Enlarge as necessary. */
#define HB_NULL_POOL_SIZE 264
static_assert
(
HB_NULL_POOL_SIZE
%
sizeof
(
void
*
)
==
0
,
"Align HB_NULL_POOL_SIZE."
);
#ifdef HB_NO_VISIBILITY
static
#else
extern
HB_INTERNAL
#endif
const
void
*
const
_hb_NullPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
#ifdef HB_NO_VISIBILITY
=
{}
#endif
;
/* Generic nul-content Null objects. */
template
<
typename
Type
>
static
inline
const
Type
&
Null
(
void
)
{
static_assert
(
sizeof
(
Type
)
<=
HB_NULL_POOL_SIZE
,
"Increase HB_NULL_POOL_SIZE."
);
return
*
CastP
<
Type
>
(
_hb_NullPool
);
}
/* Specializaiton for arbitrary-content arbitrary-sized Null objects. */
#define DEFINE_NULL_DATA(Type, data) \
static const char _Null##Type[sizeof (Type) + 1] = data;
/* +1 is for nul-termination in data */
\
template <> \
/*static*/
inline const Type& Null<Type> (void) { \
return *CastP<Type> (_Null##Type); \
}
/* The following line really exists such that we end in a place needing semicolon */
\
static_assert (Type::min_size + 1 <= sizeof (_Null##Type), "Null pool too small. Enlarge.")
/* Accessor macro. */
#define Null(Type) Null<Type>()
/*
* Dispatch
*/
...
...
@@ -726,7 +686,6 @@ struct Tag : HBUINT32
public:
DEFINE_SIZE_STATIC
(
4
);
};
DEFINE_NULL_DATA
(
Tag
,
" "
);
/* Glyph index number, same as uint16 (length = 16 bits) */
typedef
HBUINT16
GlyphID
;
...
...
@@ -738,7 +697,6 @@ typedef HBUINT16 NameID;
struct
Index
:
HBUINT16
{
static
const
unsigned
int
NOT_FOUND_INDEX
=
0xFFFFu
;
};
DEFINE_NULL_DATA
(
Index
,
"
\xff\xff
"
);
/* Offset, Null offset = 0 */
template
<
typename
Type
>
...
...
@@ -1236,7 +1194,7 @@ struct hb_lazy_loader_t
inline
void
fini
(
void
)
{
if
(
instance
&&
instance
!=
&
OT
::
Null
(
T
))
if
(
instance
&&
instance
!=
&
Null
(
T
))
{
instance
->
fini
();
free
(
instance
);
...
...
@@ -1251,12 +1209,12 @@ struct hb_lazy_loader_t
{
p
=
(
T
*
)
calloc
(
1
,
sizeof
(
T
));
if
(
unlikely
(
!
p
))
p
=
const_cast
<
T
*>
(
&
OT
::
Null
(
T
));
p
=
const_cast
<
T
*>
(
&
Null
(
T
));
else
p
->
init
(
face
);
if
(
unlikely
(
!
hb_atomic_ptr_cmpexch
(
const_cast
<
T
**>
(
&
instance
),
nullptr
,
p
)))
{
if
(
p
!=
&
OT
::
Null
(
T
))
if
(
p
!=
&
Null
(
T
))
p
->
fini
();
goto
retry
;
}
...
...
src/hb-ot-cmap-table.hh
浏览文件 @
abc12f7b
...
...
@@ -682,7 +682,7 @@ struct cmap
if
(
subtable
)
symbol
=
true
;
}
/* Meh. */
if
(
!
subtable
)
subtable
=
&
OT
::
Null
(
OT
::
CmapSubtable
);
if
(
!
subtable
)
subtable
=
&
Null
(
OT
::
CmapSubtable
);
/* UVS subtable. */
if
(
!
subtable_uvs
)
...
...
@@ -692,7 +692,7 @@ struct cmap
subtable_uvs
=
&
st
->
u
.
format14
;
}
/* Meh. */
if
(
!
subtable_uvs
)
subtable_uvs
=
&
OT
::
Null
(
OT
::
CmapSubtableFormat14
);
if
(
!
subtable_uvs
)
subtable_uvs
=
&
Null
(
OT
::
CmapSubtableFormat14
);
this
->
uvs_table
=
subtable_uvs
;
...
...
src/hb-ot-color.cc
浏览文件 @
abc12f7b
...
...
@@ -44,7 +44,7 @@ HB_MARK_AS_FLAG_T (hb_ot_color_palette_flags_t)
static inline const OT::COLR&
_get_colr (hb_face_t *face)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return
OT::
Null(OT::COLR);
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::COLR);
hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
return *(layout->colr.get ());
}
...
...
@@ -52,7 +52,7 @@ _get_colr (hb_face_t *face)
static inline const OT::CPAL&
_get_cpal (hb_face_t *face)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return
OT::
Null(OT::CPAL);
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::CPAL);
hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
return *(layout->cpal.get ());
}
...
...
src/hb-ot-layout-common-private.hh
浏览文件 @
abc12f7b
...
...
@@ -165,7 +165,6 @@ struct RangeRecord
public:
DEFINE_SIZE_STATIC
(
6
);
};
DEFINE_NULL_DATA
(
RangeRecord
,
"
\000\001
"
);
struct
IndexArray
:
ArrayOf
<
Index
>
...
...
@@ -225,7 +224,6 @@ struct LangSys
public:
DEFINE_SIZE_ARRAY
(
6
,
featureIndex
);
};
DEFINE_NULL_DATA
(
LangSys
,
"
\0\0\xFF\xFF
"
);
struct
Script
...
...
@@ -247,7 +245,16 @@ struct Script
{
return
langSys
.
find_index
(
tag
,
index
);
}
inline
bool
has_default_lang_sys
(
void
)
const
{
return
defaultLangSys
!=
0
;
}
inline
const
LangSys
&
get_default_lang_sys
(
void
)
const
{
return
this
+
defaultLangSys
;
}
inline
const
LangSys
&
get_default_lang_sys
(
void
)
const
{
if
(
!
defaultLangSys
)
{
/* This is the ONLY place where our null data is not all zeros.
* So, return special data instead of using the null pool. */
return
*
reinterpret_cast
<
const
LangSys
*>
(
"
\0\0\xFF\xFF
"
);
}
return
this
+
defaultLangSys
;
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
,
const
Record
<
Script
>::
sanitize_closure_t
*
=
nullptr
)
const
...
...
src/hb-ot-layout.cc
浏览文件 @
abc12f7b
...
...
@@ -47,7 +47,7 @@
#ifndef HB_NO_VISIBILITY
const
void
*
const
OT
::
_hb_NullPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
=
{};
const
void
*
const
_hb_NullPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
=
{};
#endif
...
...
@@ -102,7 +102,7 @@ _hb_ot_layout_create (hb_face_t *face)
* https://lists.freedesktop.org/archives/harfbuzz/2016-February/005489.html
*/
if
(
3
==
layout
->
gdef
->
get_glyph_class
(
5
))
layout
->
gdef
=
&
OT
::
Null
(
OT
::
GDEF
);
layout
->
gdef
=
&
Null
(
OT
::
GDEF
);
}
else
if
(
0
/* sha1sum:96eda93f7d33e79962451c6c39a6b51ee893ce8c tahoma.ttf from Windows 8 */
...
...
@@ -174,7 +174,7 @@ _hb_ot_layout_create (hb_face_t *face)
* https://bugzilla.mozilla.org/show_bug.cgi?id=1279693
* https://bugzilla.mozilla.org/show_bug.cgi?id=1279875
*/
layout
->
gdef
=
&
OT
::
Null
(
OT
::
GDEF
);
layout
->
gdef
=
&
Null
(
OT
::
GDEF
);
}
}
...
...
@@ -226,7 +226,7 @@ _hb_ot_layout_destroy (hb_ot_layout_t *layout)
// static inline const OT::BASE&
// _get_base (hb_face_t *face)
// {
// if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return
OT::
Null(OT::BASE);
// if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::BASE);
// hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
// return *(layout->base.get ());
// }
...
...
@@ -234,19 +234,19 @@ _hb_ot_layout_destroy (hb_ot_layout_t *layout)
static
inline
const
OT
::
GDEF
&
_get_gdef
(
hb_face_t
*
face
)
{
if
(
unlikely
(
!
hb_ot_shaper_face_data_ensure
(
face
)))
return
OT
::
Null
(
OT
::
GDEF
);
if
(
unlikely
(
!
hb_ot_shaper_face_data_ensure
(
face
)))
return
Null
(
OT
::
GDEF
);
return
*
hb_ot_layout_from_face
(
face
)
->
gdef
;
}
static
inline
const
OT
::
GSUB
&
_get_gsub
(
hb_face_t
*
face
)
{
if
(
unlikely
(
!
hb_ot_shaper_face_data_ensure
(
face
)))
return
OT
::
Null
(
OT
::
GSUB
);
if
(
unlikely
(
!
hb_ot_shaper_face_data_ensure
(
face
)))
return
Null
(
OT
::
GSUB
);
return
*
hb_ot_layout_from_face
(
face
)
->
gsub
;
}
static
inline
const
OT
::
GPOS
&
_get_gpos
(
hb_face_t
*
face
)
{
if
(
unlikely
(
!
hb_ot_shaper_face_data_ensure
(
face
)))
return
OT
::
Null
(
OT
::
GPOS
);
if
(
unlikely
(
!
hb_ot_shaper_face_data_ensure
(
face
)))
return
Null
(
OT
::
GPOS
);
return
*
hb_ot_layout_from_face
(
face
)
->
gpos
;
}
...
...
@@ -318,7 +318,7 @@ get_gsubgpos_table (hb_face_t *face,
switch
(
table_tag
)
{
case
HB_OT_TAG_GSUB
:
return
_get_gsub
(
face
);
case
HB_OT_TAG_GPOS
:
return
_get_gpos
(
face
);
default:
return
OT
::
Null
(
OT
::
GSUBGPOS
);
default:
return
Null
(
OT
::
GSUBGPOS
);
}
}
...
...
@@ -898,7 +898,7 @@ hb_ot_layout_feature_with_variations_get_lookups (hb_face_t *face,
hb_bool_t
hb_ot_layout_has_substitution
(
hb_face_t
*
face
)
{
return
&
_get_gsub
(
face
)
!=
&
OT
::
Null
(
OT
::
GSUB
);
return
&
_get_gsub
(
face
)
!=
&
Null
(
OT
::
GSUB
);
}
/**
...
...
@@ -962,7 +962,7 @@ hb_ot_layout_lookup_substitute_closure (hb_face_t *face,
hb_bool_t
hb_ot_layout_has_positioning
(
hb_face_t
*
face
)
{
return
&
_get_gpos
(
face
)
!=
&
OT
::
Null
(
OT
::
GPOS
);
return
&
_get_gpos
(
face
)
!=
&
Null
(
OT
::
GPOS
);
}
void
...
...
@@ -1298,5 +1298,5 @@ hb_ot_layout_substitute_lookup (OT::hb_ot_apply_context_t *c,
// hb_bool_t
// hb_ot_base_has_data (hb_face_t *face)
// {
// return &_get_base (face) != &
OT::
Null(OT::BASE);
// return &_get_base (face) != &Null(OT::BASE);
// }
src/hb-ot-math.cc
浏览文件 @
abc12f7b
...
...
@@ -32,7 +32,7 @@
static
inline
const
OT
::
MATH
&
_get_math
(
hb_face_t
*
face
)
{
if
(
unlikely
(
!
hb_ot_shaper_face_data_ensure
(
face
)))
return
OT
::
Null
(
OT
::
MATH
);
if
(
unlikely
(
!
hb_ot_shaper_face_data_ensure
(
face
)))
return
Null
(
OT
::
MATH
);
hb_ot_layout_t
*
layout
=
hb_ot_layout_from_face
(
face
);
return
*
(
layout
->
math
.
get
());
}
...
...
@@ -55,7 +55,7 @@ _get_math (hb_face_t *face)
hb_bool_t
hb_ot_math_has_data
(
hb_face_t
*
face
)
{
return
&
_get_math
(
face
)
!=
&
OT
::
Null
(
OT
::
MATH
);
return
&
_get_math
(
face
)
!=
&
Null
(
OT
::
MATH
);
}
/**
...
...
src/hb-ot-var.cc
浏览文件 @
abc12f7b
...
...
@@ -39,14 +39,14 @@
static
inline
const
OT
::
fvar
&
_get_fvar
(
hb_face_t
*
face
)
{
if
(
unlikely
(
!
hb_ot_shaper_face_data_ensure
(
face
)))
return
OT
::
Null
(
OT
::
fvar
);
if
(
unlikely
(
!
hb_ot_shaper_face_data_ensure
(
face
)))
return
Null
(
OT
::
fvar
);
hb_ot_layout_t
*
layout
=
hb_ot_layout_from_face
(
face
);
return
*
(
layout
->
fvar
.
get
());
}
static
inline
const
OT
::
avar
&
_get_avar
(
hb_face_t
*
face
)
{
if
(
unlikely
(
!
hb_ot_shaper_face_data_ensure
(
face
)))
return
OT
::
Null
(
OT
::
avar
);
if
(
unlikely
(
!
hb_ot_shaper_face_data_ensure
(
face
)))
return
Null
(
OT
::
avar
);
hb_ot_layout_t
*
layout
=
hb_ot_layout_from_face
(
face
);
return
*
(
layout
->
avar
.
get
());
}
...
...
@@ -65,7 +65,7 @@ _get_avar (hb_face_t *face)
hb_bool_t
hb_ot_var_has_data
(
hb_face_t
*
face
)
{
return
&
_get_fvar
(
face
)
!=
&
OT
::
Null
(
OT
::
fvar
);
return
&
_get_fvar
(
face
)
!=
&
Null
(
OT
::
fvar
);
}
/**
...
...
src/hb-private.hh
浏览文件 @
abc12f7b
...
...
@@ -1089,4 +1089,33 @@ round (double x)
#endif
/*
* Null objects
*/
/* Global nul-content Null pool. Enlarge as necessary. */
#define HB_NULL_POOL_SIZE 264
static_assert
(
HB_NULL_POOL_SIZE
%
sizeof
(
void
*
)
==
0
,
"Align HB_NULL_POOL_SIZE."
);
#ifdef HB_NO_VISIBILITY
static
#else
extern
HB_INTERNAL
#endif
const
void
*
const
_hb_NullPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
#ifdef HB_NO_VISIBILITY
=
{}
#endif
;
/* Generic nul-content Null objects. */
template
<
typename
Type
>
static
inline
const
Type
&
Null
(
void
)
{
static_assert
(
sizeof
(
Type
)
<=
HB_NULL_POOL_SIZE
,
"Increase HB_NULL_POOL_SIZE."
);
return
*
reinterpret_cast
<
const
Type
*>
(
_hb_NullPool
);
}
#define Null(Type) Null<Type>()
#endif
/* HB_PRIVATE_HH */
src/hb-subset.cc
浏览文件 @
abc12f7b
...
...
@@ -45,7 +45,7 @@
#if !defined(HB_NO_VISIBILITY) && !defined(HB_SUBSET_BUILTIN)
const
void
*
const
OT
::
_hb_NullPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
=
{};
const
void
*
const
_hb_NullPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
=
{};
#endif
...
...
@@ -91,7 +91,7 @@ _subset (hb_subset_plan_t *plan)
hb_tag_t
tag
=
TableType
::
tableTag
;
hb_bool_t
result
=
false
;
if
(
table
!=
&
OT
::
Null
(
TableType
))
if
(
table
!=
&
Null
(
TableType
))
{
result
=
table
->
subset
(
plan
);
}
else
{
...
...
src/main.cc
浏览文件 @
abc12f7b
...
...
@@ -38,7 +38,7 @@
using
namespace
OT
;
#ifndef HB_NO_VISIBILITY
const
void
*
const
OT
::
_hb_NullPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
=
{};
const
void
*
const
_hb_NullPool
[
HB_NULL_POOL_SIZE
/
sizeof
(
void
*
)]
=
{};
#endif
int
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录