Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
92806ee0
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,发现更多精彩内容 >>
提交
92806ee0
编写于
8月 05, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move null data definitions to hb-static.cc
Also remove " " null data for Tag. Just use zeroes.
上级
1b4d5a24
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
19 addition
and
11 deletion
+19
-11
src/hb-open-type-private.hh
src/hb-open-type-private.hh
+1
-2
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-common-private.hh
+2
-3
src/hb-private.hh
src/hb-private.hh
+7
-5
src/hb-static.cc
src/hb-static.cc
+9
-1
未找到文件。
src/hb-open-type-private.hh
浏览文件 @
92806ee0
...
@@ -140,7 +140,6 @@ struct Tag : HBUINT32
...
@@ -140,7 +140,6 @@ struct Tag : HBUINT32
public:
public:
DEFINE_SIZE_STATIC
(
4
);
DEFINE_SIZE_STATIC
(
4
);
};
};
DEFINE_NULL_DATA
(
OT
,
Tag
,
" "
);
/* Glyph index number, same as uint16 (length = 16 bits) */
/* Glyph index number, same as uint16 (length = 16 bits) */
typedef
HBUINT16
GlyphID
;
typedef
HBUINT16
GlyphID
;
...
@@ -152,7 +151,7 @@ typedef HBUINT16 NameID;
...
@@ -152,7 +151,7 @@ typedef HBUINT16 NameID;
struct
Index
:
HBUINT16
{
struct
Index
:
HBUINT16
{
static
const
unsigned
int
NOT_FOUND_INDEX
=
0xFFFFu
;
static
const
unsigned
int
NOT_FOUND_INDEX
=
0xFFFFu
;
};
};
DE
FINE_NULL_DATA
(
OT
,
Index
,
"
\xff\xff
"
);
DE
CLARE_NULL_NAMESPACE_BYTES
(
OT
,
Index
);
/* Offset, Null offset = 0 */
/* Offset, Null offset = 0 */
template
<
typename
Type
>
template
<
typename
Type
>
...
...
src/hb-ot-layout-common-private.hh
浏览文件 @
92806ee0
...
@@ -173,7 +173,7 @@ struct RangeRecord
...
@@ -173,7 +173,7 @@ struct RangeRecord
public:
public:
DEFINE_SIZE_STATIC
(
6
);
DEFINE_SIZE_STATIC
(
6
);
};
};
DE
FINE_NULL_DATA
(
OT
,
RangeRecord
,
"
\000\001
"
);
DE
CLARE_NULL_NAMESPACE_BYTES
(
OT
,
RangeRecord
);
struct
IndexArray
:
ArrayOf
<
Index
>
struct
IndexArray
:
ArrayOf
<
Index
>
...
@@ -240,8 +240,7 @@ struct LangSys
...
@@ -240,8 +240,7 @@ struct LangSys
public:
public:
DEFINE_SIZE_ARRAY
(
6
,
featureIndex
);
DEFINE_SIZE_ARRAY
(
6
,
featureIndex
);
};
};
DEFINE_NULL_DATA
(
OT
,
LangSys
,
"
\0\0\xFF\xFF
"
);
DECLARE_NULL_NAMESPACE_BYTES
(
OT
,
LangSys
);
struct
Script
struct
Script
{
{
...
...
src/hb-private.hh
浏览文件 @
92806ee0
...
@@ -391,16 +391,18 @@ static inline Type const & Null (void) {
...
@@ -391,16 +391,18 @@ static inline Type const & Null (void) {
#define Null(Type) Null<Type>()
#define Null(Type) Null<Type>()
/* Specializaiton for arbitrary-content arbitrary-sized Null objects. */
/* Specializaiton for arbitrary-content arbitrary-sized Null objects. */
#define DE
FINE_NULL_DATA(Namespace, Type, data
) \
#define DE
CLARE_NULL_NAMESPACE_BYTES(Namespace, Type
) \
}
/* Close namespace. */
\
}
/* Close namespace. */
\
static const char _Null##Type[sizeof (Namespace::Type) + 1] = data;
/* +1 is for nul-termination in data */
\
extern HB_INTERNAL const unsigned char _hb_Null_##Namespace##_##Type[sizeof (Namespace::Type)];
\
template <> \
template <> \
/*static*/
inline const Namespace::Type& Null<Namespace::Type> (void) { \
/*static*/
inline const Namespace::Type& Null<Namespace::Type> (void) { \
return *reinterpret_cast<const Namespace::Type *> (_
Null
##Type); \
return *reinterpret_cast<const Namespace::Type *> (_
hb_Null_##Namespace##_
##Type); \
} \
} \
namespace Namespace { \
namespace Namespace { \
/* The following line really exists such that we end in a place needing semicolon */
\
static_assert (Namespace::Type::min_size <= sizeof (Type), "Null pool too small. Enlarge."); \
static_assert (Namespace::Type::min_size + 1 <= sizeof (_Null##Type), "Null pool too small. Enlarge.")
#define DEFINE_NULL_NAMESPACE_BYTES(Namespace, Type) \
const unsigned char _hb_Null_##Namespace##_##Type[sizeof (Namespace::Type)]
/* Global writable pool. Enlarge as necessary. */
/* Global writable pool. Enlarge as necessary. */
...
...
src/hb-static.cc
浏览文件 @
92806ee0
...
@@ -25,8 +25,11 @@
...
@@ -25,8 +25,11 @@
*/
*/
#include "hb-private.hh"
#include "hb-private.hh"
#include "hb-face-private.hh"
#include "hb-open-type-private.hh"
#include "hb-open-type-private.hh"
#include "hb-ot-layout-common-private.hh"
#include "hb-face-private.hh"
#include "hb-ot-head-table.hh"
#include "hb-ot-head-table.hh"
#include "hb-ot-maxp-table.hh"
#include "hb-ot-maxp-table.hh"
...
@@ -35,6 +38,11 @@
...
@@ -35,6 +38,11 @@
hb_vector_size_impl_t
const
_hb_NullPool
[(
HB_NULL_POOL_SIZE
+
sizeof
(
hb_vector_size_impl_t
)
-
1
)
/
sizeof
(
hb_vector_size_impl_t
)]
=
{};
hb_vector_size_impl_t
const
_hb_NullPool
[(
HB_NULL_POOL_SIZE
+
sizeof
(
hb_vector_size_impl_t
)
-
1
)
/
sizeof
(
hb_vector_size_impl_t
)]
=
{};
/*thread_local*/
hb_vector_size_impl_t
_hb_CrapPool
[(
HB_NULL_POOL_SIZE
+
sizeof
(
hb_vector_size_impl_t
)
-
1
)
/
sizeof
(
hb_vector_size_impl_t
)]
=
{};
/*thread_local*/
hb_vector_size_impl_t
_hb_CrapPool
[(
HB_NULL_POOL_SIZE
+
sizeof
(
hb_vector_size_impl_t
)
-
1
)
/
sizeof
(
hb_vector_size_impl_t
)]
=
{};
DEFINE_NULL_NAMESPACE_BYTES
(
OT
,
Index
)
=
{
0xFF
,
0xFF
};
DEFINE_NULL_NAMESPACE_BYTES
(
OT
,
LangSys
)
=
{
0x00
,
0x00
,
0xFF
,
0xFF
,
0x00
,
0x00
};
DEFINE_NULL_NAMESPACE_BYTES
(
OT
,
RangeRecord
)
=
{
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
};
void
void
hb_face_t
::
load_num_glyphs
(
void
)
const
hb_face_t
::
load_num_glyphs
(
void
)
const
{
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录