Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
0eb9fc6e
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看板
提交
0eb9fc6e
编写于
5月 10, 2010
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Change DEFINE_SIZE_VAR to DEFINE_SIZE_ARRAY
上级
596e471a
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
54 addition
and
52 deletion
+54
-52
src/hb-open-file-private.hh
src/hb-open-file-private.hh
+2
-2
src/hb-open-type-private.hh
src/hb-open-type-private.hh
+5
-5
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-common-private.hh
+15
-12
src/hb-ot-layout-gdef-private.hh
src/hb-ot-layout-gdef-private.hh
+5
-5
src/hb-ot-layout-gpos-private.hh
src/hb-ot-layout-gpos-private.hh
+12
-13
src/hb-ot-layout-gsub-private.hh
src/hb-ot-layout-gsub-private.hh
+7
-7
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+8
-8
未找到文件。
src/hb-open-file-private.hh
浏览文件 @
0eb9fc6e
...
...
@@ -112,7 +112,7 @@ typedef struct OffsetTable
USHORT
rangeShift
;
/* NumTables x 16-searchRange. */
TableDirectory
tableDir
[
VAR
];
/* TableDirectory entries. numTables items */
public:
DEFINE_SIZE_
VAR
(
12
,
TableDirectory
);
DEFINE_SIZE_
ARRAY
(
12
,
tableDir
);
}
OpenTypeFontFace
;
...
...
@@ -140,7 +140,7 @@ struct TTCHeaderVersion1
table
;
/* Array of offsets to the OffsetTable for each font
* from the beginning of the file */
public:
DEFINE_SIZE_
VAR
(
12
,
LongOffset
);
DEFINE_SIZE_
ARRAY
(
12
,
table
);
};
struct
TTCHeader
...
...
src/hb-open-type-private.hh
浏览文件 @
0eb9fc6e
...
...
@@ -103,11 +103,11 @@ inline Type& StructAfter(TObject &X)
_DEFINE_SIZE_ASSERTION (sizeof (*this) >= (size)); \
static const unsigned int min_size = (size)
#define DEFINE_SIZE_
VAR(size, _var_type
) \
_DEFINE_SIZE_ASSERTION (sizeof (*this) == (size) +
VAR0 * sizeof (_var_type)
); \
#define DEFINE_SIZE_
ARRAY(size, array
) \
_DEFINE_SIZE_ASSERTION (sizeof (*this) == (size) +
array[0].static_size
); \
static const unsigned int min_size = (size)
#define DEFINE_SIZE_
VAR
2(size, array1, array2) \
#define DEFINE_SIZE_
ARRAY
2(size, array1, array2) \
_DEFINE_SIZE_ASSERTION (sizeof (*this) == (size) + this->array1[0].static_size + this->array2[0].static_size); \
static const unsigned int min_size = (size)
...
...
@@ -586,7 +586,7 @@ struct GenericArrayOf
LenType
len
;
Type
array
[
VAR
];
public:
DEFINE_SIZE_
VAR
(
sizeof
(
LenType
),
Type
);
DEFINE_SIZE_
ARRAY
(
sizeof
(
LenType
),
array
);
};
/* An array with a USHORT number of elements. */
...
...
@@ -671,7 +671,7 @@ struct HeadlessArrayOf
USHORT
len
;
Type
array
[
VAR
];
public:
DEFINE_SIZE_
VAR
(
sizeof
(
USHORT
),
Type
);
DEFINE_SIZE_
ARRAY
(
sizeof
(
USHORT
),
array
);
};
...
...
src/hb-ot-layout-common-private.hh
浏览文件 @
0eb9fc6e
...
...
@@ -119,10 +119,13 @@ struct RecordListOf : RecordArrayOf<Type>
struct
IndexArray
:
ArrayOf
<
USHORT
>
{
inline
unsigned
int
operator
[]
(
unsigned
int
i
)
const
inline
USHORT
operator
[]
(
unsigned
int
i
)
const
{
if
(
unlikely
(
i
>=
this
->
len
))
return
NO_INDEX
;
if
(
unlikely
(
i
>=
this
->
len
))
{
USHORT
u
;
u
.
set
(
NO_INDEX
);
return
u
;
}
return
this
->
array
[
i
];
}
inline
unsigned
int
get_indexes
(
unsigned
int
start_offset
,
...
...
@@ -177,7 +180,7 @@ struct LangSys
* = 0xFFFF */
IndexArray
featureIndex
;
/* Array of indices into the FeatureList */
public:
DEFINE_SIZE_
VAR
(
6
,
USHORT
);
DEFINE_SIZE_
ARRAY
(
6
,
featureIndex
);
};
DEFINE_NULL_DATA
(
LangSys
,
"
\0\0\xFF\xFF
"
);
...
...
@@ -217,7 +220,7 @@ struct Script
langSys
;
/* Array of LangSysRecords--listed
* alphabetically by LangSysTag */
public:
DEFINE_SIZE_
VAR
(
4
,
Record
<
LangSys
>
);
DEFINE_SIZE_
ARRAY
(
4
,
langSys
);
};
typedef
RecordListOf
<
Script
>
ScriptList
;
...
...
@@ -248,7 +251,7 @@ struct Feature
* if not required */
IndexArray
lookupIndex
;
/* Array of LookupList indices */
public:
DEFINE_SIZE_
VAR
(
4
,
USHORT
);
DEFINE_SIZE_
ARRAY
(
4
,
lookupIndex
);
};
typedef
RecordListOf
<
Feature
>
FeatureList
;
...
...
@@ -307,7 +310,7 @@ struct Lookup
* structure. This field is only present if bit
* UseMarkFilteringSet of lookup flags is set. */
public:
DEFINE_SIZE_
VAR
2
(
6
,
subTable
,
markFilteringSetX
);
DEFINE_SIZE_
ARRAY
2
(
6
,
subTable
,
markFilteringSetX
);
};
typedef
OffsetListOf
<
Lookup
>
LookupList
;
...
...
@@ -346,7 +349,7 @@ struct CoverageFormat1
ArrayOf
<
GlyphID
>
glyphArray
;
/* Array of GlyphIDs--in numerical order */
public:
DEFINE_SIZE_
VAR
(
4
,
GlyphID
);
DEFINE_SIZE_
ARRAY
(
4
,
glyphArray
);
};
struct
CoverageRangeRecord
...
...
@@ -407,7 +410,7 @@ struct CoverageFormat2
* Start GlyphID. rangeCount entries
* long */
public:
DEFINE_SIZE_
VAR
(
4
,
CoverageR
angeRecord
);
DEFINE_SIZE_
ARRAY
(
4
,
r
angeRecord
);
};
struct
Coverage
...
...
@@ -471,7 +474,7 @@ struct ClassDefFormat1
ArrayOf
<
USHORT
>
classValue
;
/* Array of Class Values--one per GlyphID */
public:
DEFINE_SIZE_
VAR
(
6
,
USHORT
);
DEFINE_SIZE_
ARRAY
(
6
,
classValue
);
};
struct
ClassRangeRecord
...
...
@@ -529,7 +532,7 @@ struct ClassDefFormat2
rangeRecord
;
/* Array of glyph ranges--ordered by
* Start GlyphID */
public:
DEFINE_SIZE_
VAR
(
4
,
ClassR
angeRecord
);
DEFINE_SIZE_
ARRAY
(
4
,
r
angeRecord
);
};
struct
ClassDef
...
...
@@ -620,7 +623,7 @@ struct Device
*/
USHORT
deltaValue
[
VAR
];
/* Array of compressed data */
public:
DEFINE_SIZE_
VAR
(
6
,
USHORT
);
DEFINE_SIZE_
ARRAY
(
6
,
deltaValue
);
};
...
...
src/hb-ot-layout-gdef-private.hh
浏览文件 @
0eb9fc6e
...
...
@@ -80,7 +80,7 @@ struct AttachList
attachPoint
;
/* Array of AttachPoint tables
* in Coverage Index order */
public:
DEFINE_SIZE_
VAR
(
4
,
OffsetTo
<
AttachPoint
>
);
DEFINE_SIZE_
ARRAY
(
4
,
attachPoint
);
};
/*
...
...
@@ -228,7 +228,7 @@ struct LigGlyph
* --from beginning of LigGlyph table
* --in increasing coordinate order */
public:
DEFINE_SIZE_
VAR
(
2
,
OffsetTo
<
CaretValue
>
);
DEFINE_SIZE_
ARRAY
(
2
,
carets
);
};
struct
LigCaretList
...
...
@@ -264,7 +264,7 @@ struct LigCaretList
ligGlyph
;
/* Array of LigGlyph tables
* in Coverage Index order */
public:
DEFINE_SIZE_
VAR
(
4
,
OffsetTo
<
LigGlyph
>
);
DEFINE_SIZE_
ARRAY
(
4
,
ligGlyph
);
};
...
...
@@ -284,7 +284,7 @@ struct MarkGlyphSetsFormat1
coverage
;
/* Array of long offsets to mark set
* coverage tables */
public:
DEFINE_SIZE_
VAR
(
4
,
LongOffsetTo
<
Coverage
>
);
DEFINE_SIZE_
ARRAY
(
4
,
coverage
);
};
struct
MarkGlyphSets
...
...
@@ -394,7 +394,7 @@ struct GDEF
* header (may be NULL). Introduced
* in version 00010002. */
public:
DEFINE_SIZE_
VAR
(
12
,
OffsetTo
<
MarkGlyphSets
>
);
DEFINE_SIZE_
ARRAY
(
12
,
markGlyphSetsDef
);
};
...
...
src/hb-ot-layout-gpos-private.hh
浏览文件 @
0eb9fc6e
...
...
@@ -40,7 +40,7 @@
typedef
USHORT
Value
;
typedef
Value
ValueRecord
[
VAR
0
];
typedef
Value
ValueRecord
[
VAR
];
struct
ValueFormat
:
USHORT
{
...
...
@@ -364,7 +364,7 @@ struct AnchorMatrix
matrix
[
VAR
];
/* Matrix of offsets to Anchor tables--
* from beginning of AnchorMatrix table */
public:
DEFINE_SIZE_
VAR
(
2
,
OffsetTo
<
Anchor
>
);
DEFINE_SIZE_
ARRAY
(
2
,
matrix
);
};
...
...
@@ -462,7 +462,7 @@ struct SinglePosFormat1
* value(s)--applied to all glyphs in
* the Coverage table */
public:
DEFINE_SIZE_
VAR
(
6
,
Value
);
DEFINE_SIZE_
ARRAY
(
6
,
values
);
};
struct
SinglePosFormat2
...
...
@@ -506,7 +506,7 @@ struct SinglePosFormat2
ValueRecord
values
;
/* Array of ValueRecords--positioning
* values applied to glyphs */
public:
DEFINE_SIZE_
VAR
(
8
,
Value
);
DEFINE_SIZE_
ARRAY
(
8
,
values
);
};
struct
SinglePos
...
...
@@ -554,7 +554,7 @@ struct PairValueRecord
ValueRecord
values
;
/* Positioning data for the first glyph
* followed by for second glyph */
public:
DEFINE_SIZE_
VAR
(
2
,
Value
);
DEFINE_SIZE_
ARRAY
(
2
,
values
);
};
struct
PairSet
...
...
@@ -571,11 +571,10 @@ struct PairSet
private:
USHORT
len
;
/* Number of PairValueRecords */
PairValueRecord
array
[
VAR
];
/* Array of PairValueRecords--ordered
USHORT
array
[
VAR
];
/* Array of PairValueRecords--ordered
* by GlyphID of the second glyph */
public:
DEFINE_SIZE_
VAR
(
2
,
PairValueRecord
);
DEFINE_SIZE_
ARRAY
(
2
,
array
);
};
struct
PairPosFormat1
...
...
@@ -608,7 +607,7 @@ struct PairPosFormat1
const
PairSet
&
pair_set
=
this
+
pairSet
[
index
];
unsigned
int
count
=
pair_set
.
len
;
const
PairValueRecord
*
record
=
pair_set
.
array
;
const
PairValueRecord
*
record
=
CastP
<
PairValueRecord
>
(
pair_set
.
array
)
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
if
(
IN_GLYPH
(
j
)
==
record
->
secondGlyph
)
...
...
@@ -645,7 +644,7 @@ struct PairPosFormat1
PairSet
&
pair_set
=
const_cast
<
PairSet
&>
(
this
+
pairSet
[
i
]);
/* XXX clean this up */
unsigned
int
count2
=
pair_set
.
len
;
PairValueRecord
*
record
=
pair_set
.
array
;
PairValueRecord
*
record
=
CastP
<
PairValueRecord
>
(
pair_set
.
array
)
;
if
(
!
(
valueFormat1
.
sanitize_values_stride_unsafe
(
context
,
this
,
&
record
->
values
[
0
],
count2
,
stride
)
&&
valueFormat2
.
sanitize_values_stride_unsafe
(
context
,
this
,
&
record
->
values
[
len1
],
count2
,
stride
)))
return
false
;
...
...
@@ -669,7 +668,7 @@ struct PairPosFormat1
pairSet
;
/* Array of PairSet tables
* ordered by Coverage Index */
public:
DEFINE_SIZE_
VAR
(
10
,
OffsetTo
<
PairSet
>
);
DEFINE_SIZE_
ARRAY
(
10
,
pairSet
);
};
struct
PairPosFormat2
...
...
@@ -760,7 +759,7 @@ struct PairPosFormat2
* class1-major, class2-minor,
* Each entry has value1 and value2 */
public:
DEFINE_SIZE_
VAR
(
16
,
ValueRecord
);
DEFINE_SIZE_
ARRAY
(
16
,
values
);
};
struct
PairPos
...
...
@@ -1015,7 +1014,7 @@ struct CursivePosFormat1
entryExitRecord
;
/* Array of EntryExit records--in
* Coverage Index order */
public:
DEFINE_SIZE_
VAR
(
6
,
E
ntryExitRecord
);
DEFINE_SIZE_
ARRAY
(
6
,
e
ntryExitRecord
);
};
struct
CursivePos
...
...
src/hb-ot-layout-gsub-private.hh
浏览文件 @
0eb9fc6e
...
...
@@ -117,7 +117,7 @@ struct SingleSubstFormat2
substitute
;
/* Array of substitute
* GlyphIDs--ordered by Coverage Index */
public:
DEFINE_SIZE_
VAR
(
6
,
GlyphID
);
DEFINE_SIZE_
ARRAY
(
6
,
substitute
);
};
struct
SingleSubst
...
...
@@ -195,7 +195,7 @@ struct Sequence
ArrayOf
<
GlyphID
>
substitute
;
/* String of GlyphIDs to substitute */
public:
DEFINE_SIZE_
VAR
(
2
,
GlyphID
);
DEFINE_SIZE_
ARRAY
(
2
,
substitute
);
};
struct
MultipleSubstFormat1
...
...
@@ -230,7 +230,7 @@ struct MultipleSubstFormat1
sequence
;
/* Array of Sequence tables
* ordered by Coverage Index */
public:
DEFINE_SIZE_
VAR
(
6
,
OffsetTo
<
Sequence
>
);
DEFINE_SIZE_
ARRAY
(
6
,
sequence
);
};
struct
MultipleSubst
...
...
@@ -326,7 +326,7 @@ struct AlternateSubstFormat1
alternateSet
;
/* Array of AlternateSet tables
* ordered by Coverage Index */
public:
DEFINE_SIZE_
VAR
(
6
,
OffsetTo
<
AlternateSet
>
);
DEFINE_SIZE_
ARRAY
(
6
,
alternateSet
);
};
struct
AlternateSubst
...
...
@@ -443,7 +443,7 @@ struct Ligature
* with the second component--ordered
* in writing direction */
public:
DEFINE_SIZE_
VAR
(
4
,
GlyphID
);
DEFINE_SIZE_
ARRAY
(
4
,
component
);
};
struct
LigatureSet
...
...
@@ -476,7 +476,7 @@ struct LigatureSet
ligature
;
/* Array LigatureSet tables
* ordered by preference */
public:
DEFINE_SIZE_
VAR
(
2
,
OffsetTo
<
Ligature
>
);
DEFINE_SIZE_
ARRAY
(
2
,
ligature
);
};
struct
LigatureSubstFormat1
...
...
@@ -514,7 +514,7 @@ struct LigatureSubstFormat1
ligatureSet
;
/* Array LigatureSet tables
* ordered by Coverage Index */
public:
DEFINE_SIZE_
VAR
(
6
,
OffsetTo
<
LigatureSet
>
);
DEFINE_SIZE_
ARRAY
(
6
,
ligatureSet
);
};
struct
LigatureSubst
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
0eb9fc6e
...
...
@@ -303,7 +303,7 @@ struct Rule
LookupRecord
lookupRecordX
[
VAR
];
/* Array of LookupRecords--in
* design order */
public:
DEFINE_SIZE_
VAR
2
(
4
,
input
,
lookupRecordX
);
DEFINE_SIZE_
ARRAY
2
(
4
,
input
,
lookupRecordX
);
};
struct
RuleSet
...
...
@@ -331,7 +331,7 @@ struct RuleSet
rule
;
/* Array of Rule tables
* ordered by preference */
public:
DEFINE_SIZE_
VAR
(
2
,
OffsetTo
<
Rule
>
);
DEFINE_SIZE_
ARRAY
(
2
,
rule
);
};
...
...
@@ -370,7 +370,7 @@ struct ContextFormat1
ruleSet
;
/* Array of RuleSet tables
* ordered by Coverage Index */
public:
DEFINE_SIZE_
VAR
(
6
,
OffsetTo
<
RuleSet
>
);
DEFINE_SIZE_
ARRAY
(
6
,
ruleSet
);
};
...
...
@@ -418,7 +418,7 @@ struct ContextFormat2
ruleSet
;
/* Array of RuleSet tables
* ordered by class */
public:
DEFINE_SIZE_
VAR
(
8
,
OffsetTo
<
RuleSet
>
);
DEFINE_SIZE_
ARRAY
(
8
,
ruleSet
);
};
...
...
@@ -467,7 +467,7 @@ struct ContextFormat3
LookupRecord
lookupRecordX
[
VAR
];
/* Array of LookupRecords--in
* design order */
public:
DEFINE_SIZE_
VAR
2
(
6
,
coverage
,
lookupRecordX
);
DEFINE_SIZE_
ARRAY
2
(
6
,
coverage
,
lookupRecordX
);
};
struct
Context
...
...
@@ -623,7 +623,7 @@ struct ChainRuleSet
rule
;
/* Array of ChainRule tables
* ordered by preference */
public:
DEFINE_SIZE_
VAR
(
2
,
OffsetTo
<
ChainRule
>
);
DEFINE_SIZE_
ARRAY
(
2
,
rule
);
};
struct
ChainContextFormat1
...
...
@@ -661,7 +661,7 @@ struct ChainContextFormat1
ruleSet
;
/* Array of ChainRuleSet tables
* ordered by Coverage Index */
public:
DEFINE_SIZE_
VAR
(
6
,
OffsetTo
<
ChainRuleSet
>
);
DEFINE_SIZE_
ARRAY
(
6
,
ruleSet
);
};
struct
ChainContextFormat2
...
...
@@ -724,7 +724,7 @@ struct ChainContextFormat2
ruleSet
;
/* Array of ChainRuleSet tables
* ordered by class */
public:
DEFINE_SIZE_
VAR
(
12
,
OffsetTo
<
ChainRuleSet
>
);
DEFINE_SIZE_
ARRAY
(
12
,
ruleSet
);
};
struct
ChainContextFormat3
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录