Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
0dff25f0
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,发现更多精彩内容 >>
提交
0dff25f0
编写于
5月 08, 2009
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[HB] Remove get_size()
上级
25c6c9a3
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
3 addition
and
111 deletion
+3
-111
src/hb-ot-layout-gdef-private.h
src/hb-ot-layout-gdef-private.h
+0
-9
src/hb-ot-layout-gsub-private.h
src/hb-ot-layout-gsub-private.h
+0
-63
src/hb-ot-layout-open-private.h
src/hb-ot-layout-open-private.h
+3
-39
未找到文件。
src/hb-ot-layout-gdef-private.h
浏览文件 @
0dff25f0
...
...
@@ -151,15 +151,6 @@ ASSERT_SIZE (CaretValueFormat3, 6);
struct
CaretValue
{
DEFINE_NON_INSTANTIABLE
(
CaretValue
);
unsigned
int
get_size
(
void
)
const
{
switch
(
u
.
caretValueFormat
)
{
case
1
:
return
sizeof
(
u
.
format1
);
case
2
:
return
sizeof
(
u
.
format2
);
case
3
:
return
sizeof
(
u
.
format3
);
default:
return
sizeof
(
u
.
caretValueFormat
);
}
}
/* XXX we need access to a load-contour-point vfunc here */
int
get_caret_value
(
int
ppem
)
const
{
switch
(
u
.
caretValueFormat
)
{
...
...
src/hb-ot-layout-gsub-private.h
浏览文件 @
0dff25f0
...
...
@@ -117,14 +117,6 @@ struct SingleSubst {
private:
unsigned
int
get_size
(
void
)
const
{
switch
(
u
.
substFormat
)
{
case
1
:
return
sizeof
(
u
.
format1
);
case
2
:
return
sizeof
(
u
.
format2
);
default:
return
sizeof
(
u
.
substFormat
);
}
}
inline
bool
single_substitute
(
hb_codepoint_t
&
glyph_id
)
const
{
switch
(
u
.
substFormat
)
{
case
1
:
return
u
.
format1
.
single_substitute
(
glyph_id
);
...
...
@@ -259,13 +251,6 @@ struct MultipleSubst {
private:
unsigned
int
get_size
(
void
)
const
{
switch
(
u
.
substFormat
)
{
case
1
:
return
sizeof
(
u
.
format1
);
default:
return
sizeof
(
u
.
substFormat
);
}
}
inline
bool
substitute
(
SUBTABLE_SUBSTITUTE_ARGS_DEF
)
const
{
switch
(
u
.
substFormat
)
{
case
1
:
return
u
.
format1
.
substitute
(
SUBTABLE_SUBSTITUTE_ARGS
);
...
...
@@ -366,13 +351,6 @@ struct AlternateSubst {
private:
unsigned
int
get_size
(
void
)
const
{
switch
(
u
.
substFormat
)
{
case
1
:
return
sizeof
(
u
.
format1
);
default:
return
sizeof
(
u
.
substFormat
);
}
}
inline
bool
substitute
(
SUBTABLE_SUBSTITUTE_ARGS_DEF
)
const
{
switch
(
u
.
substFormat
)
{
case
1
:
return
u
.
format1
.
substitute
(
SUBTABLE_SUBSTITUTE_ARGS
);
...
...
@@ -544,13 +522,6 @@ struct LigatureSubst {
private:
unsigned
int
get_size
(
void
)
const
{
switch
(
u
.
substFormat
)
{
case
1
:
return
sizeof
(
u
.
format1
);
default:
return
sizeof
(
u
.
substFormat
);
}
}
inline
bool
substitute
(
SUBTABLE_SUBSTITUTE_ARGS_DEF
)
const
{
switch
(
u
.
substFormat
)
{
case
1
:
return
u
.
format1
.
substitute
(
SUBTABLE_SUBSTITUTE_ARGS
);
...
...
@@ -769,15 +740,6 @@ struct ContextSubst {
private:
unsigned
int
get_size
(
void
)
const
{
switch
(
u
.
substFormat
)
{
case
1
:
return
sizeof
(
u
.
format1
);
case
2
:
return
sizeof
(
u
.
format2
);
case
3
:
return
sizeof
(
u
.
format3
);
default:
return
sizeof
(
u
.
substFormat
);
}
}
inline
bool
substitute
(
SUBTABLE_SUBSTITUTE_ARGS_DEF
)
const
{
switch
(
u
.
substFormat
)
{
case
1
:
return
u
.
format1
.
substitute
(
SUBTABLE_SUBSTITUTE_ARGS
);
...
...
@@ -971,13 +933,6 @@ struct ExtensionSubst {
private:
unsigned
int
get_size
(
void
)
const
{
switch
(
u
.
substFormat
)
{
case
1
:
return
sizeof
(
u
.
format1
);
default:
return
sizeof
(
u
.
substFormat
);
}
}
inline
unsigned
int
get_type
(
void
)
const
{
switch
(
u
.
substFormat
)
{
case
1
:
return
u
.
format1
.
get_type
();
...
...
@@ -1046,24 +1001,6 @@ struct SubstLookupSubTable {
friend
struct
SubstLookup
;
unsigned
int
get_size
(
unsigned
int
lookup_type
)
const
{
switch
(
lookup_type
)
{
case
GSUB_Single
:
return
u
.
single
.
get_size
();
case
GSUB_Multiple
:
return
u
.
multiple
.
get_size
();
case
GSUB_Alternate
:
return
u
.
alternate
.
get_size
();
case
GSUB_Ligature
:
return
u
.
ligature
.
get_size
();
case
GSUB_Context
:
/*
case GSUB_ChainingContext:
*/
case
GSUB_Extension
:
return
u
.
extension
.
get_size
();
/*
case GSUB_ReverseChainingContextSingle:
*/
default:
return
sizeof
(
LookupSubTable
);
}
}
inline
bool
substitute
(
SUBTABLE_SUBSTITUTE_ARGS_DEF
,
unsigned
int
lookup_type
)
const
{
switch
(
lookup_type
)
{
...
...
src/hb-ot-layout-open-private.h
浏览文件 @
0dff25f0
...
...
@@ -67,20 +67,12 @@
#define DEFINE_LEN(Type, array, num) \
inline unsigned int get_len(void) const { return num; } \
/* get_size() is a method returning the size in bytes of an array-like object */
#define DEFINE_SIZE(Type, array, num) \
inline unsigned int get_size(void) const { return sizeof (*this) + sizeof (Type) * num; }
#define DEFINE_LEN_AND_SIZE(Type, array, num) \
DEFINE_LEN(Type, array, num) \
DEFINE_SIZE(Type, array, num)
/* An array type is one that contains a variable number of objects
* as its last item. An array object is extended with len() and size()
* methods, as well as overloaded [] operator. */
#define DEFINE_ARRAY_TYPE(Type, array, num) \
DEFINE_INDEX_OPERATOR(Type, array, num) \
DEFINE_LEN
_AND_SIZE
(Type, array, num)
DEFINE_LEN(Type, array, num)
#define DEFINE_INDEX_OPERATOR(Type, array, num) \
inline const Type& operator[] (unsigned int i) const { \
if (HB_UNLIKELY (i >= num)) return Null##Type; \
...
...
@@ -92,7 +84,7 @@
* object. */
#define DEFINE_OFFSET_ARRAY_TYPE(Type, array, num) \
DEFINE_OFFSET_INDEX_OPERATOR(Type, array, num) \
DEFINE_LEN
_AND_SIZE
(Offset, array, num)
DEFINE_LEN(Offset, array, num)
#define DEFINE_OFFSET_INDEX_OPERATOR(Type, array, num) \
inline const Type& operator[] (unsigned int i) const { \
if (HB_UNLIKELY (i >= num)) return Null##Type; \
...
...
@@ -105,7 +97,7 @@
* relative to the beginning of the current object. */
#define DEFINE_RECORD_ARRAY_TYPE(Type, array, num) \
DEFINE_RECORD_ACCESSOR(Type, array, num) \
DEFINE_LEN
_AND_SIZE
(Record, array, num)
DEFINE_LEN(Record, array, num)
#define DEFINE_RECORD_ACCESSOR(Type, array, num) \
inline const Type& operator[] (unsigned int i) const { \
if (HB_UNLIKELY (i >= num)) return Null##Type; \
...
...
@@ -477,7 +469,6 @@ struct OpenTypeFontFile {
return
((
char
*
)
this
)
+
table
.
offset
;
}
/* Array interface sans get_size() */
unsigned
int
get_len
(
void
)
const
{
switch
(
tag
)
{
default:
return
0
;
...
...
@@ -789,14 +780,6 @@ ASSERT_SIZE (CoverageFormat2, 4);
struct
Coverage
{
DEFINE_NON_INSTANTIABLE
(
Coverage
);
unsigned
int
get_size
(
void
)
const
{
switch
(
u
.
coverageFormat
)
{
case
1
:
return
u
.
format1
.
get_size
();
case
2
:
return
u
.
format2
.
get_size
();
default:
return
sizeof
(
u
.
coverageFormat
);
}
}
unsigned
int
get_coverage
(
hb_codepoint_t
glyph_id
)
const
{
switch
(
u
.
coverageFormat
)
{
case
1
:
return
u
.
format1
.
get_coverage
(
glyph_id
);
...
...
@@ -888,14 +871,6 @@ ASSERT_SIZE (ClassDefFormat2, 4);
struct
ClassDef
{
DEFINE_NON_INSTANTIABLE
(
ClassDef
);
unsigned
int
get_size
(
void
)
const
{
switch
(
u
.
classFormat
)
{
case
1
:
return
u
.
format1
.
get_size
();
case
2
:
return
u
.
format2
.
get_size
();
default:
return
sizeof
(
u
.
classFormat
);
}
}
hb_ot_layout_class_t
get_class
(
hb_codepoint_t
glyph_id
)
const
{
switch
(
u
.
classFormat
)
{
case
1
:
return
u
.
format1
.
get_class
(
glyph_id
);
...
...
@@ -920,17 +895,6 @@ DEFINE_NULL (ClassDef, 2);
struct
Device
{
DEFINE_NON_INSTANTIABLE
(
Device
);
unsigned
int
get_size
(
void
)
const
{
int
count
=
endSize
-
startSize
+
1
;
if
(
count
<
0
)
count
=
0
;
switch
(
deltaFormat
)
{
case
1
:
return
sizeof
(
Device
)
+
sizeof
(
USHORT
)
*
((
count
+
7
)
/
8
);
case
2
:
return
sizeof
(
Device
)
+
sizeof
(
USHORT
)
*
((
count
+
3
)
/
4
);
case
3
:
return
sizeof
(
Device
)
+
sizeof
(
USHORT
)
*
((
count
+
1
)
/
2
);
default:
return
sizeof
(
Device
);
}
}
int
get_delta
(
int
ppem_size
)
const
{
if
(
ppem_size
>=
startSize
&&
ppem_size
<=
endSize
&&
deltaFormat
>=
1
&&
deltaFormat
<=
3
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录