Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
6f335ed1
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
6f335ed1
编写于
11月 14, 2017
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replace USHORT/SHORT/ULONG/etc with UINT16/INT16/UINT32/etc
上级
a130ee6d
变更
23
展开全部
隐藏空白更改
内联
并排
Showing
23 changed file
with
486 addition
and
487 deletion
+486
-487
src/hb-open-file-private.hh
src/hb-open-file-private.hh
+3
-3
src/hb-open-type-private.hh
src/hb-open-type-private.hh
+33
-34
src/hb-ot-cbdt-table.hh
src/hb-ot-cbdt-table.hh
+39
-39
src/hb-ot-cmap-table.hh
src/hb-ot-cmap-table.hh
+45
-45
src/hb-ot-glyf-table.hh
src/hb-ot-glyf-table.hh
+5
-5
src/hb-ot-head-table.hh
src/hb-ot-head-table.hh
+14
-14
src/hb-ot-hhea-table.hh
src/hb-ot-hhea-table.hh
+9
-9
src/hb-ot-kern-table.hh
src/hb-ot-kern-table.hh
+18
-18
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-common-private.hh
+59
-59
src/hb-ot-layout-gdef-table.hh
src/hb-ot-layout-gdef-table.hh
+11
-11
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gpos-table.hh
+47
-47
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsub-table.hh
+15
-15
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+86
-86
src/hb-ot-math-table.hh
src/hb-ot-math-table.hh
+13
-13
src/hb-ot-maxp-table.hh
src/hb-ot-maxp-table.hh
+1
-1
src/hb-ot-name-table.hh
src/hb-ot-name-table.hh
+8
-8
src/hb-ot-os2-table.hh
src/hb-ot-os2-table.hh
+35
-35
src/hb-ot-post-table.hh
src/hb-ot-post-table.hh
+8
-8
src/hb-ot-shape-complex-arabic-win1256.hh
src/hb-ot-shape-complex-arabic-win1256.hh
+16
-16
src/hb-ot-var-avar-table.hh
src/hb-ot-var-avar-table.hh
+2
-2
src/hb-ot-var-fvar-table.hh
src/hb-ot-var-fvar-table.hh
+10
-10
src/hb-ot-var-hvar-table.hh
src/hb-ot-var-hvar-table.hh
+4
-4
src/hb-ot-var-mvar-table.hh
src/hb-ot-var-mvar-table.hh
+5
-5
未找到文件。
src/hb-open-file-private.hh
浏览文件 @
6f335ed1
...
...
@@ -64,9 +64,9 @@ typedef struct TableRecord
Tag
tag
;
/* 4-byte identifier. */
CheckSum
checkSum
;
/* CheckSum for this table. */
U
LONG
offset
;
/* Offset from beginning of TrueType font
U
INT32
offset
;
/* Offset from beginning of TrueType font
* file. */
U
LONG
length
;
/* Length of this table. */
U
INT32
length
;
/* Length of this table. */
public:
DEFINE_SIZE_STATIC
(
16
);
}
OpenTypeTable
;
...
...
@@ -154,7 +154,7 @@ struct TTCHeaderVersion1
Tag
ttcTag
;
/* TrueType Collection ID string: 'ttcf' */
FixedVersion
<>
version
;
/* Version of the TTC Header (1.0),
* 0x00010000u */
ArrayOf
<
LOffsetTo
<
OffsetTable
>
,
U
LONG
>
ArrayOf
<
LOffsetTo
<
OffsetTable
>
,
U
INT32
>
table
;
/* Array of offsets to the OffsetTable for each font
* from the beginning of the file */
public:
...
...
src/hb-open-type-private.hh
浏览文件 @
6f335ed1
...
...
@@ -635,23 +635,22 @@ struct IntType
DEFINE_SIZE_STATIC
(
Size
);
};
typedef
IntType
<
int8_t
,
1
>
CHAR
;
/* 8-bit signed integer. */
typedef
IntType
<
uint8_t
,
1
>
BYTE
;
/* 8-bit unsigned integer. */
typedef
IntType
<
uint8_t
,
1
>
UINT8
;
/* 8-bit unsigned integer. */
typedef
IntType
<
int8_t
,
1
>
INT8
;
/* 8-bit signed integer. */
typedef
IntType
<
uint16_t
,
2
>
U
SHORT
;
/* 16-bit unsigned integer. */
typedef
IntType
<
int16_t
,
2
>
SHORT
;
/* 16-bit signed integer. */
typedef
IntType
<
uint32_t
,
4
>
U
LONG
;
/* 32-bit unsigned integer. */
typedef
IntType
<
int32_t
,
4
>
LONG
;
/* 32-bit signed integer. */
typedef
IntType
<
uint16_t
,
2
>
U
INT16
;
/* 16-bit unsigned integer. */
typedef
IntType
<
int16_t
,
2
>
INT16
;
/* 16-bit signed integer. */
typedef
IntType
<
uint32_t
,
4
>
U
INT32
;
/* 32-bit unsigned integer. */
typedef
IntType
<
int32_t
,
4
>
INT32
;
/* 32-bit signed integer. */
typedef
IntType
<
uint32_t
,
3
>
UINT24
;
/* 24-bit unsigned integer. */
/* 16-bit signed integer (
SHORT
) that describes a quantity in FUnits. */
typedef
SHORT
FWORD
;
/* 16-bit signed integer (
INT16
) that describes a quantity in FUnits. */
typedef
INT16
FWORD
;
/* 16-bit unsigned integer (U
SHORT
) that describes a quantity in FUnits. */
typedef
U
SHORT
UFWORD
;
/* 16-bit unsigned integer (U
INT16
) that describes a quantity in FUnits. */
typedef
U
INT16
UFWORD
;
/* 16-bit signed fixed number with the low 14 bits of fraction (2.14). */
struct
F2DOT14
:
SHORT
struct
F2DOT14
:
INT16
{
//inline float to_float (void) const { return ???; }
//inline void set_float (float f) { v.set (f * ???); }
...
...
@@ -660,7 +659,7 @@ struct F2DOT14 : SHORT
};
/* 32-bit signed fixed-point number (16.16). */
struct
Fixed
:
LONG
struct
Fixed
:
INT32
{
//inline float to_float (void) const { return ???; }
//inline void set_float (float f) { v.set (f * ???); }
...
...
@@ -678,15 +677,15 @@ struct LONGDATETIME
return_trace
(
likely
(
c
->
check_struct
(
this
)));
}
protected:
LONG
major
;
U
LONG
minor
;
INT32
major
;
U
INT32
minor
;
public:
DEFINE_SIZE_STATIC
(
8
);
};
/* Array of four uint8s (length = 32 bits) used to identify a script, language
* system, feature, or baseline */
struct
Tag
:
U
LONG
struct
Tag
:
U
INT32
{
/* What the char* converters return is NOT nul-terminated. Print using "%.4s" */
inline
operator
const
char
*
(
void
)
const
{
return
reinterpret_cast
<
const
char
*>
(
&
this
->
v
);
}
...
...
@@ -697,16 +696,16 @@ struct Tag : ULONG
DEFINE_NULL_DATA
(
Tag
,
" "
);
/* Glyph index number, same as uint16 (length = 16 bits) */
typedef
U
SHORT
GlyphID
;
typedef
U
INT16
GlyphID
;
/* Script/language-system/feature index */
struct
Index
:
U
SHORT
{
struct
Index
:
U
INT16
{
static
const
unsigned
int
NOT_FOUND_INDEX
=
0xFFFFu
;
};
DEFINE_NULL_DATA
(
Index
,
"
\xff\xff
"
);
/* Offset, Null offset = 0 */
template
<
typename
Type
=
U
SHORT
>
template
<
typename
Type
=
U
INT16
>
struct
Offset
:
Type
{
inline
bool
is_null
(
void
)
const
{
return
0
==
*
this
;
}
...
...
@@ -716,13 +715,13 @@ struct Offset : Type
/* CheckSum */
struct
CheckSum
:
U
LONG
struct
CheckSum
:
U
INT32
{
/* This is reference implementation from the spec. */
static
inline
uint32_t
CalcTableChecksum
(
const
U
LONG
*
Table
,
uint32_t
Length
)
static
inline
uint32_t
CalcTableChecksum
(
const
U
INT32
*
Table
,
uint32_t
Length
)
{
uint32_t
Sum
=
0L
;
const
U
LONG
*
EndPtr
=
Table
+
((
Length
+
3
)
&
~
3
)
/
ULONG
::
static_size
;
const
U
INT32
*
EndPtr
=
Table
+
((
Length
+
3
)
&
~
3
)
/
UINT32
::
static_size
;
while
(
Table
<
EndPtr
)
Sum
+=
*
Table
++
;
...
...
@@ -731,7 +730,7 @@ struct CheckSum : ULONG
/* Note: data should be 4byte aligned and have 4byte padding at the end. */
inline
void
set_for_data
(
const
void
*
data
,
unsigned
int
length
)
{
set
(
CalcTableChecksum
((
const
U
LONG
*
)
data
,
length
));
}
{
set
(
CalcTableChecksum
((
const
U
INT32
*
)
data
,
length
));
}
public:
DEFINE_SIZE_STATIC
(
4
);
...
...
@@ -742,7 +741,7 @@ struct CheckSum : ULONG
* Version Numbers
*/
template
<
typename
FixedType
=
U
SHORT
>
template
<
typename
FixedType
=
U
INT16
>
struct
FixedVersion
{
inline
uint32_t
to_int
(
void
)
const
{
return
(
major
<<
(
sizeof
(
FixedType
)
*
8
))
+
minor
;
}
...
...
@@ -766,7 +765,7 @@ struct FixedVersion
* Use: (base+offset)
*/
template
<
typename
Type
,
typename
OffsetType
=
U
SHORT
>
template
<
typename
Type
,
typename
OffsetType
=
U
INT16
>
struct
OffsetTo
:
Offset
<
OffsetType
>
{
inline
const
Type
&
operator
()
(
const
void
*
base
)
const
...
...
@@ -811,7 +810,7 @@ struct OffsetTo : Offset<OffsetType>
}
DEFINE_SIZE_STATIC
(
sizeof
(
OffsetType
));
};
template
<
typename
Type
>
struct
LOffsetTo
:
OffsetTo
<
Type
,
U
LONG
>
{};
template
<
typename
Type
>
struct
LOffsetTo
:
OffsetTo
<
Type
,
U
INT32
>
{};
template
<
typename
Base
,
typename
OffsetType
,
typename
Type
>
static
inline
const
Type
&
operator
+
(
const
Base
&
base
,
const
OffsetTo
<
Type
,
OffsetType
>
&
offset
)
{
return
offset
(
base
);
}
template
<
typename
Base
,
typename
OffsetType
,
typename
Type
>
...
...
@@ -823,7 +822,7 @@ static inline Type& operator + (Base &base, OffsetTo<Type, OffsetType> &offset)
*/
/* An array with a number of elements. */
template
<
typename
Type
,
typename
LenType
=
U
SHORT
>
template
<
typename
Type
,
typename
LenType
=
U
INT16
>
struct
ArrayOf
{
const
Type
*
sub_array
(
unsigned
int
start_offset
,
unsigned
int
*
pcount
/* IN/OUT */
)
const
...
...
@@ -933,10 +932,10 @@ struct ArrayOf
public:
DEFINE_SIZE_ARRAY
(
sizeof
(
LenType
),
array
);
};
template
<
typename
Type
>
struct
LArrayOf
:
ArrayOf
<
Type
,
U
LONG
>
{};
template
<
typename
Type
>
struct
LArrayOf
:
ArrayOf
<
Type
,
U
INT32
>
{};
/* Array of Offset's */
template
<
typename
Type
,
typename
OffsetType
=
U
SHORT
>
template
<
typename
Type
,
typename
OffsetType
=
U
INT16
>
struct
OffsetArrayOf
:
ArrayOf
<
OffsetTo
<
Type
,
OffsetType
>
>
{};
/* Array of offsets relative to the beginning of the array itself. */
...
...
@@ -964,7 +963,7 @@ struct OffsetListOf : OffsetArrayOf<Type>
/* An array starting at second element. */
template
<
typename
Type
,
typename
LenType
=
U
SHORT
>
template
<
typename
Type
,
typename
LenType
=
U
INT16
>
struct
HeadlessArrayOf
{
inline
const
Type
&
operator
[]
(
unsigned
int
i
)
const
...
...
@@ -1026,7 +1025,7 @@ struct HeadlessArrayOf
/*
* An array with sorted elements. Supports binary searching.
*/
template
<
typename
Type
,
typename
LenType
=
U
SHORT
>
template
<
typename
Type
,
typename
LenType
=
U
INT16
>
struct
SortedArrayOf
:
ArrayOf
<
Type
,
LenType
>
{
template
<
typename
SearchType
>
...
...
@@ -1065,10 +1064,10 @@ struct BinSearchHeader
}
protected:
U
SHORT
len
;
U
SHORT
searchRangeZ
;
U
SHORT
entrySelectorZ
;
U
SHORT
rangeShiftZ
;
U
INT16
len
;
U
INT16
searchRangeZ
;
U
INT16
entrySelectorZ
;
U
INT16
rangeShiftZ
;
public:
DEFINE_SIZE_STATIC
(
8
);
...
...
src/hb-ot-cbdt-table.hh
浏览文件 @
6f335ed1
...
...
@@ -47,20 +47,20 @@ struct SmallGlyphMetrics
extents
->
height
=
-
height
;
}
BYTE
height
;
BYTE
width
;
CHAR
bearingX
;
CHAR
bearingY
;
BYTE
advance
;
UINT8
height
;
UINT8
width
;
INT8
bearingX
;
INT8
bearingY
;
UINT8
advance
;
DEFINE_SIZE_STATIC
(
5
);
};
struct
BigGlyphMetrics
:
SmallGlyphMetrics
{
CHAR
vertBearingX
;
CHAR
vertBearingY
;
BYTE
vertAdvance
;
INT8
vertBearingX
;
INT8
vertBearingY
;
UINT8
vertAdvance
;
DEFINE_SIZE_STATIC
(
8
);
};
...
...
@@ -73,18 +73,18 @@ struct SBitLineMetrics
return_trace
(
c
->
check_struct
(
this
));
}
CHAR
ascender
;
CHAR
decender
;
BYTE
widthMax
;
CHAR
caretSlopeNumerator
;
CHAR
caretSlopeDenominator
;
CHAR
caretOffset
;
CHAR
minOriginSB
;
CHAR
minAdvanceSB
;
CHAR
maxBeforeBL
;
CHAR
minAfterBL
;
CHAR
padding1
;
CHAR
padding2
;
INT8
ascender
;
INT8
decender
;
UINT8
widthMax
;
INT8
caretSlopeNumerator
;
INT8
caretSlopeDenominator
;
INT8
caretOffset
;
INT8
minOriginSB
;
INT8
minAdvanceSB
;
INT8
maxBeforeBL
;
INT8
minAfterBL
;
INT8
padding1
;
INT8
padding2
;
DEFINE_SIZE_STATIC
(
12
);
};
...
...
@@ -102,9 +102,9 @@ struct IndexSubtableHeader
return_trace
(
c
->
check_struct
(
this
));
}
U
SHORT
indexFormat
;
U
SHORT
imageFormat
;
U
LONG
imageDataOffset
;
U
INT16
indexFormat
;
U
INT16
imageFormat
;
U
INT32
imageDataOffset
;
DEFINE_SIZE_STATIC
(
8
);
};
...
...
@@ -137,8 +137,8 @@ struct IndexSubtableFormat1Or3
DEFINE_SIZE_ARRAY
(
8
,
offsetArrayZ
);
};
struct
IndexSubtableFormat1
:
IndexSubtableFormat1Or3
<
U
LONG
>
{};
struct
IndexSubtableFormat3
:
IndexSubtableFormat1Or3
<
U
SHORT
>
{};
struct
IndexSubtableFormat1
:
IndexSubtableFormat1Or3
<
U
INT32
>
{};
struct
IndexSubtableFormat3
:
IndexSubtableFormat1Or3
<
U
INT16
>
{};
struct
IndexSubtable
{
...
...
@@ -214,8 +214,8 @@ struct IndexSubtableRecord
offset
,
length
,
format
);
}
U
SHORT
firstGlyphIndex
;
U
SHORT
lastGlyphIndex
;
U
INT16
firstGlyphIndex
;
U
INT16
lastGlyphIndex
;
LOffsetTo
<
IndexSubtable
>
offsetToSubtable
;
DEFINE_SIZE_STATIC
(
8
);
...
...
@@ -276,17 +276,17 @@ struct BitmapSizeTable
protected:
LOffsetTo
<
IndexSubtableArray
>
indexSubtableArrayOffset
;
U
LONG
indexTablesSize
;
U
LONG
numberOfIndexSubtables
;
U
LONG
colorRef
;
U
INT32
indexTablesSize
;
U
INT32
numberOfIndexSubtables
;
U
INT32
colorRef
;
SBitLineMetrics
horizontal
;
SBitLineMetrics
vertical
;
U
SHORT
startGlyphIndex
;
U
SHORT
endGlyphIndex
;
BYTE
ppemX
;
BYTE
ppemY
;
BYTE
bitDepth
;
CHAR
flags
;
U
INT16
startGlyphIndex
;
U
INT16
endGlyphIndex
;
UINT8
ppemX
;
UINT8
ppemY
;
UINT8
bitDepth
;
INT8
flags
;
public:
DEFINE_SIZE_STATIC
(
48
);
...
...
@@ -300,8 +300,8 @@ struct BitmapSizeTable
struct
GlyphBitmapDataFormat17
{
SmallGlyphMetrics
glyphMetrics
;
U
LONG
dataLen
;
BYTE
dataZ
[
VAR
];
U
INT32
dataLen
;
UINT8
dataZ
[
VAR
];
DEFINE_SIZE_ARRAY
(
9
,
dataZ
);
};
...
...
@@ -460,7 +460,7 @@ struct CBDT
protected:
FixedVersion
<>
version
;
BYTE
dataZ
[
VAR
];
UINT8
dataZ
[
VAR
];
public:
DEFINE_SIZE_ARRAY
(
4
,
dataZ
);
...
...
src/hb-ot-cmap-table.hh
浏览文件 @
6f335ed1
...
...
@@ -58,10 +58,10 @@ struct CmapSubtableFormat0
}
protected:
U
SHORT
format
;
/* Format number is set to 0. */
U
SHORT
lengthZ
;
/* Byte length of this subtable. */
U
SHORT
languageZ
;
/* Ignore. */
BYTE
glyphIdArray
[
256
];
/* An array that maps character
U
INT16
format
;
/* Format number is set to 0. */
U
INT16
lengthZ
;
/* Byte length of this subtable. */
U
INT16
languageZ
;
/* Ignore. */
UINT8
glyphIdArray
[
256
];
/* An array that maps character
* code to glyph index values. */
public:
DEFINE_SIZE_STATIC
(
6
+
256
);
...
...
@@ -88,8 +88,8 @@ struct CmapSubtableFormat4
/* Custom two-array bsearch. */
int
min
=
0
,
max
=
(
int
)
thiz
->
segCount
-
1
;
const
U
SHORT
*
startCount
=
thiz
->
startCount
;
const
U
SHORT
*
endCount
=
thiz
->
endCount
;
const
U
INT16
*
startCount
=
thiz
->
startCount
;
const
U
INT16
*
endCount
=
thiz
->
endCount
;
unsigned
int
i
;
while
(
min
<=
max
)
{
...
...
@@ -127,11 +127,11 @@ struct CmapSubtableFormat4
return
true
;
}
const
U
SHORT
*
endCount
;
const
U
SHORT
*
startCount
;
const
U
SHORT
*
idDelta
;
const
U
SHORT
*
idRangeOffset
;
const
U
SHORT
*
glyphIdArray
;
const
U
INT16
*
endCount
;
const
U
INT16
*
startCount
;
const
U
INT16
*
idDelta
;
const
U
INT16
*
idRangeOffset
;
const
U
INT16
*
glyphIdArray
;
unsigned
int
segCount
;
unsigned
int
glyphIdArrayLength
;
};
...
...
@@ -165,24 +165,24 @@ struct CmapSubtableFormat4
}
protected:
U
SHORT
format
;
/* Format number is set to 4. */
U
SHORT
length
;
/* This is the length in bytes of the
U
INT16
format
;
/* Format number is set to 4. */
U
INT16
length
;
/* This is the length in bytes of the
* subtable. */
U
SHORT
languageZ
;
/* Ignore. */
U
SHORT
segCountX2
;
/* 2 x segCount. */
U
SHORT
searchRangeZ
;
/* 2 * (2**floor(log2(segCount))) */
U
SHORT
entrySelectorZ
;
/* log2(searchRange/2) */
U
SHORT
rangeShiftZ
;
/* 2 x segCount - searchRange */
U
INT16
languageZ
;
/* Ignore. */
U
INT16
segCountX2
;
/* 2 x segCount. */
U
INT16
searchRangeZ
;
/* 2 * (2**floor(log2(segCount))) */
U
INT16
entrySelectorZ
;
/* log2(searchRange/2) */
U
INT16
rangeShiftZ
;
/* 2 x segCount - searchRange */
U
SHORT
values
[
VAR
];
U
INT16
values
[
VAR
];
#if 0
U
SHORT
endCount[segCount]; /* End characterCode for each segment,
U
INT16
endCount[segCount]; /* End characterCode for each segment,
* last=0xFFFFu. */
U
SHORT
reservedPad; /* Set to 0. */
U
SHORT
startCount[segCount]; /* Start character code for each segment. */
SHORT
idDelta[segCount]; /* Delta for all character codes in segment. */
U
SHORT
idRangeOffset[segCount];/* Offsets into glyphIdArray or 0 */
U
SHORT
glyphIdArray[VAR]; /* Glyph index array (arbitrary length) */
U
INT16
reservedPad; /* Set to 0. */
U
INT16
startCount[segCount]; /* Start character code for each segment. */
INT16
idDelta[segCount]; /* Delta for all character codes in segment. */
U
INT16
idRangeOffset[segCount];/* Offsets into glyphIdArray or 0 */
U
INT16
glyphIdArray[VAR]; /* Glyph index array (arbitrary length) */
#endif
public:
...
...
@@ -208,9 +208,9 @@ struct CmapSubtableLongGroup
}
private:
U
LONG
startCharCode
;
/* First character code in this group. */
U
LONG
endCharCode
;
/* Last character code in this group. */
U
LONG
glyphID
;
/* Glyph index; interpretation depends on
U
INT32
startCharCode
;
/* First character code in this group. */
U
INT32
endCharCode
;
/* Last character code in this group. */
U
INT32
glyphID
;
/* Glyph index; interpretation depends on
* subtable format. */
public:
DEFINE_SIZE_STATIC
(
12
);
...
...
@@ -247,8 +247,8 @@ struct CmapSubtableTrimmed
DEFINE_SIZE_ARRAY
(
5
*
sizeof
(
UINT
),
glyphIdArray
);
};
struct
CmapSubtableFormat6
:
CmapSubtableTrimmed
<
U
SHORT
>
{};
struct
CmapSubtableFormat10
:
CmapSubtableTrimmed
<
U
LONG
>
{};
struct
CmapSubtableFormat6
:
CmapSubtableTrimmed
<
U
INT16
>
{};
struct
CmapSubtableFormat10
:
CmapSubtableTrimmed
<
U
INT32
>
{};
template
<
typename
T
>
struct
CmapSubtableLongSegmented
...
...
@@ -269,11 +269,11 @@ struct CmapSubtableLongSegmented
}
protected:
U
SHORT
format
;
/* Subtable format; set to 12. */
U
SHORT
reservedZ
;
/* Reserved; set to 0. */
U
LONG
lengthZ
;
/* Byte length of this subtable. */
U
LONG
languageZ
;
/* Ignore. */
SortedArrayOf
<
CmapSubtableLongGroup
,
U
LONG
>
U
INT16
format
;
/* Subtable format; set to 12. */
U
INT16
reservedZ
;
/* Reserved; set to 0. */
U
INT32
lengthZ
;
/* Byte length of this subtable. */
U
INT32
languageZ
;
/* Ignore. */
SortedArrayOf
<
CmapSubtableLongGroup
,
U
INT32
>
groups
;
/* Groupings. */
public:
DEFINE_SIZE_ARRAY
(
16
,
groups
);
...
...
@@ -316,13 +316,13 @@ struct UnicodeValueRange
}
UINT24
startUnicodeValue
;
/* First value in this range. */
BYTE
additionalCount
;
/* Number of additional values in this
UINT8
additionalCount
;
/* Number of additional values in this
* range. */
public:
DEFINE_SIZE_STATIC
(
4
);
};
typedef
SortedArrayOf
<
UnicodeValueRange
,
U
LONG
>
DefaultUVS
;
typedef
SortedArrayOf
<
UnicodeValueRange
,
U
INT32
>
DefaultUVS
;
struct
UVSMapping
{
...
...
@@ -343,7 +343,7 @@ struct UVSMapping
DEFINE_SIZE_STATIC
(
5
);
};
typedef
SortedArrayOf
<
UVSMapping
,
U
LONG
>
NonDefaultUVS
;
typedef
SortedArrayOf
<
UVSMapping
,
U
INT32
>
NonDefaultUVS
;
struct
VariationSelectorRecord
{
...
...
@@ -405,9 +405,9 @@ struct CmapSubtableFormat14
}
protected:
U
SHORT
format
;
/* Format number is set to 14. */
U
LONG
lengthZ
;
/* Byte length of this subtable. */
SortedArrayOf
<
VariationSelectorRecord
,
U
LONG
>
U
INT16
format
;
/* Format number is set to 14. */
U
INT32
lengthZ
;
/* Byte length of this subtable. */
SortedArrayOf
<
VariationSelectorRecord
,
U
INT32
>
record
;
/* Variation selector records; sorted
* in increasing order of `varSelector'. */
public:
...
...
@@ -451,7 +451,7 @@ struct CmapSubtable
public:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
CmapSubtableFormat0
format0
;
CmapSubtableFormat4
format4
;
CmapSubtableFormat6
format6
;
...
...
@@ -484,8 +484,8 @@ struct EncodingRecord
subtable
.
sanitize
(
c
,
base
));
}
U
SHORT
platformID
;
/* Platform ID. */
U
SHORT
encodingID
;
/* Platform-specific encoding ID. */
U
INT16
platformID
;
/* Platform ID. */
U
INT16
encodingID
;
/* Platform-specific encoding ID. */
LOffsetTo
<
CmapSubtable
>
subtable
;
/* Byte offset from beginning of table to the subtable for this encoding. */
public:
...
...
@@ -654,7 +654,7 @@ struct cmap
}
protected:
U
SHORT
version
;
/* Table version number (0). */
U
INT16
version
;
/* Table version number (0). */
SortedArrayOf
<
EncodingRecord
>
encodingRecord
;
/* Encoding tables. */
public:
...
...
src/hb-ot-glyf-table.hh
浏览文件 @
6f335ed1
...
...
@@ -54,7 +54,7 @@ struct loca
}
protected:
BYTE
dataX
[
VAR
];
/* Location data. */
UINT8
dataX
[
VAR
];
/* Location data. */
DEFINE_SIZE_ARRAY
(
0
,
dataX
);
};
...
...
@@ -80,7 +80,7 @@ struct glyf
struct
GlyphHeader
{
SHORT
numberOfContours
;
/* If the number of contours is
INT16
numberOfContours
;
/* If the number of contours is
* greater than or equal to zero,
* this is a simple glyph; if negative,
* this is a composite glyph. */
...
...
@@ -131,13 +131,13 @@ struct glyf
unsigned
int
start_offset
,
end_offset
;
if
(
short_offset
)
{
const
U
SHORT
*
offsets
=
(
const
USHORT
*
)
loca_table
->
dataX
;
const
U
INT16
*
offsets
=
(
const
UINT16
*
)
loca_table
->
dataX
;
start_offset
=
2
*
offsets
[
glyph
];
end_offset
=
2
*
offsets
[
glyph
+
1
];
}
else
{
const
U
LONG
*
offsets
=
(
const
ULONG
*
)
loca_table
->
dataX
;
const
U
INT32
*
offsets
=
(
const
UINT32
*
)
loca_table
->
dataX
;
start_offset
=
offsets
[
glyph
];
end_offset
=
offsets
[
glyph
+
1
];
}
...
...
@@ -169,7 +169,7 @@ struct glyf
};
protected:
BYTE
dataX
[
VAR
];
/* Glyphs data. */
UINT8
dataX
[
VAR
];
/* Glyphs data. */
DEFINE_SIZE_ARRAY
(
0
,
dataX
);
};
...
...
src/hb-ot-head-table.hh
浏览文件 @
6f335ed1
...
...
@@ -64,11 +64,11 @@ struct head
FixedVersion
<>
version
;
/* Version of the head table--currently
* 0x00010000u for version 1.0. */
FixedVersion
<>
fontRevision
;
/* Set by font manufacturer. */
U
LONG
checkSumAdjustment
;
/* To compute: set it to 0, sum the
* entire font as U
LONG
, then store
U
INT32
checkSumAdjustment
;
/* To compute: set it to 0, sum the
* entire font as U
INT32
, then store
* 0xB1B0AFBAu - sum. */
U
LONG
magicNumber
;
/* Set to 0x5F0F3CF5u. */
U
SHORT
flags
;
/* Bit 0: Baseline for font at y=0;
U
INT32
magicNumber
;
/* Set to 0x5F0F3CF5u. */
U
INT16
flags
;
/* Bit 0: Baseline for font at y=0;
* Bit 1: Left sidebearing point at x=0;
* Bit 2: Instructions may depend on point size;
* Bit 3: Force ppem to integer values for all
...
...
@@ -114,18 +114,18 @@ struct head
* encoded in the cmap subtables represent proper
* support for those code points.
* Bit 15: Reserved, set to 0. */
U
SHORT
unitsPerEm
;
/* Valid range is from 16 to 16384. This value
U
INT16
unitsPerEm
;
/* Valid range is from 16 to 16384. This value
* should be a power of 2 for fonts that have
* TrueType outlines. */
LONGDATETIME
created
;
/* Number of seconds since 12:00 midnight,
January 1, 1904. 64-bit integer */
LONGDATETIME
modified
;
/* Number of seconds since 12:00 midnight,
January 1, 1904. 64-bit integer */
SHORT
xMin
;
/* For all glyph bounding boxes. */
SHORT
yMin
;
/* For all glyph bounding boxes. */
SHORT
xMax
;
/* For all glyph bounding boxes. */
SHORT
yMax
;
/* For all glyph bounding boxes. */
U
SHORT
macStyle
;
/* Bit 0: Bold (if set to 1);
INT16
xMin
;
/* For all glyph bounding boxes. */
INT16
yMin
;
/* For all glyph bounding boxes. */
INT16
xMax
;
/* For all glyph bounding boxes. */
INT16
yMax
;
/* For all glyph bounding boxes. */
U
INT16
macStyle
;
/* Bit 0: Bold (if set to 1);
* Bit 1: Italic (if set to 1)
* Bit 2: Underline (if set to 1)
* Bit 3: Outline (if set to 1)
...
...
@@ -133,16 +133,16 @@ struct head
* Bit 5: Condensed (if set to 1)
* Bit 6: Extended (if set to 1)
* Bits 7-15: Reserved (set to 0). */
U
SHORT
lowestRecPPEM
;
/* Smallest readable size in pixels. */
SHORT
fontDirectionHint
;
/* Deprecated (Set to 2).
U
INT16
lowestRecPPEM
;
/* Smallest readable size in pixels. */
INT16
fontDirectionHint
;
/* Deprecated (Set to 2).
* 0: Fully mixed directional glyphs;
* 1: Only strongly left to right;
* 2: Like 1 but also contains neutrals;
* -1: Only strongly right to left;
* -2: Like -1 but also contains neutrals. */
public:
SHORT
indexToLocFormat
;
/* 0 for short offsets, 1 for long. */
SHORT
glyphDataFormat
;
/* 0 for current format. */
INT16
indexToLocFormat
;
/* 0 for short offsets, 1 for long. */
INT16
glyphDataFormat
;
/* 0 for current format. */
DEFINE_SIZE_STATIC
(
54
);
};
...
...
src/hb-ot-hhea-table.hh
浏览文件 @
6f335ed1
...
...
@@ -64,21 +64,21 @@ struct _hea
* (xMax - xMin)) for horizontal. */
FWORD
maxExtent
;
/* horizontal: Max(lsb + (xMax - xMin)),
* vertical: minLeadingBearing+(yMax-yMin). */
SHORT
caretSlopeRise
;
/* Used to calculate the slope of the
INT16
caretSlopeRise
;
/* Used to calculate the slope of the
* cursor (rise/run); 1 for vertical caret,
* 0 for horizontal.*/
SHORT
caretSlopeRun
;
/* 0 for vertical caret, 1 for horizontal. */
SHORT
caretOffset
;
/* The amount by which a slanted
INT16
caretSlopeRun
;
/* 0 for vertical caret, 1 for horizontal. */
INT16
caretOffset
;
/* The amount by which a slanted
* highlight on a glyph needs
* to be shifted to produce the
* best appearance. Set to 0 for
* non-slanted fonts. */
SHORT
reserved1
;
/* Set to 0. */
SHORT
reserved2
;
/* Set to 0. */
SHORT
reserved3
;
/* Set to 0. */
SHORT
reserved4
;
/* Set to 0. */
SHORT
metricDataFormat
;
/* 0 for current format. */
U
SHORT
numberOfLongMetrics
;
/* Number of LongMetric entries in metric
INT16
reserved1
;
/* Set to 0. */
INT16
reserved2
;
/* Set to 0. */
INT16
reserved3
;
/* Set to 0. */
INT16
reserved4
;
/* Set to 0. */
INT16
metricDataFormat
;
/* 0 for current format. */
U
INT16
numberOfLongMetrics
;
/* Number of LongMetric entries in metric
* table. */
public:
DEFINE_SIZE_STATIC
(
36
);
...
...
src/hb-ot-kern-table.hh
浏览文件 @
6f335ed1
...
...
@@ -104,8 +104,8 @@ struct KernClassTable
}
protected:
U
SHORT
firstGlyph
;
/* First glyph in class range. */
ArrayOf
<
U
SHORT
>
classes
;
/* Glyph classes. */
U
INT16
firstGlyph
;
/* First glyph in class range. */
ArrayOf
<
U
INT16
>
classes
;
/* Glyph classes. */
public:
DEFINE_SIZE_ARRAY
(
4
,
classes
);
};
...
...
@@ -136,7 +136,7 @@ struct KernSubTableFormat2
}
protected:
U
SHORT
rowWidth
;
/* The width, in bytes, of a row in the table. */
U
INT16
rowWidth
;
/* The width, in bytes, of a row in the table. */
OffsetTo
<
KernClassTable
>
leftClassTable
;
/* Offset from beginning of this subtable to
* left-hand class table. */
...
...
@@ -275,19 +275,19 @@ struct KernOT : KernTable<KernOT>
};
protected:
U
SHORT
versionZ
;
/* Unused. */
U
SHORT
length
;
/* Length of the subtable (including this header). */
BYTE
format
;
/* Subtable format. */
BYTE
coverage
;
/* Coverage bits. */
U
INT16
versionZ
;
/* Unused. */
U
INT16
length
;
/* Length of the subtable (including this header). */
UINT8
format
;
/* Subtable format. */
UINT8
coverage
;
/* Coverage bits. */
KernSubTable
subtable
;
/* Subtable data. */
public:
DEFINE_SIZE_MIN
(
6
);
};
protected:
U
SHORT
version
;
/* Version--0x0000u */
U
SHORT
nTables
;
/* Number of subtables in the kerning table. */
BYTE
data
[
VAR
];
U
INT16
version
;
/* Version--0x0000u */
U
INT16
nTables
;
/* Number of subtables in the kerning table. */
UINT8
data
[
VAR
];
public:
DEFINE_SIZE_ARRAY
(
4
,
data
);
};
...
...
@@ -314,10 +314,10 @@ struct KernAAT : KernTable<KernAAT>
};
protected:
U
LONG
length
;
/* Length of the subtable (including this header). */
BYTE
coverage
;
/* Coverage bits. */
BYTE
format
;
/* Subtable format. */
U
SHORT
tupleIndex
;
/* The tuple index (used for variations fonts).
U
INT32
length
;
/* Length of the subtable (including this header). */
UINT8
coverage
;
/* Coverage bits. */
UINT8
format
;
/* Subtable format. */
U
INT16
tupleIndex
;
/* The tuple index (used for variations fonts).
* This value specifies which tuple this subtable covers. */
KernSubTable
subtable
;
/* Subtable data. */
public:
...
...
@@ -325,9 +325,9 @@ struct KernAAT : KernTable<KernAAT>
};
protected:
U
LONG
version
;
/* Version--0x00010000u */
U
LONG
nTables
;
/* Number of subtables in the kerning table. */
BYTE
data
[
VAR
];
U
INT32
version
;
/* Version--0x00010000u */
U
INT32
nTables
;
/* Number of subtables in the kerning table. */
UINT8
data
[
VAR
];
public:
DEFINE_SIZE_ARRAY
(
8
,
data
);
};
...
...
@@ -380,7 +380,7 @@ struct kern
protected:
union
{
U
SHORT
major
;
U
INT16
major
;
KernOT
ot
;
KernAAT
aat
;
}
u
;
...
...
src/hb-ot-layout-common-private.hh
浏览文件 @
6f335ed1
...
...
@@ -161,7 +161,7 @@ struct RangeRecord
GlyphID
start
;
/* First GlyphID in the range */
GlyphID
end
;
/* Last GlyphID in the range */
U
SHORT
value
;
/* Value */
U
INT16
value
;
/* Value */
public:
DEFINE_SIZE_STATIC
(
6
);
};
...
...
@@ -175,7 +175,7 @@ struct IndexArray : ArrayOf<Index>
unsigned
int
*
_indexes
/* OUT */
)
const
{
if
(
_count
)
{
const
U
SHORT
*
arr
=
this
->
sub_array
(
start_offset
,
_count
);
const
U
INT16
*
arr
=
this
->
sub_array
(
start_offset
,
_count
);
unsigned
int
count
=
*
_count
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
_indexes
[
i
]
=
arr
[
i
];
...
...
@@ -218,7 +218,7 @@ struct LangSys
Offset
<>
lookupOrderZ
;
/* = Null (reserved for an offset to a
* reordering table) */
U
SHORT
reqFeatureIndex
;
/* Index of a feature required for this
U
INT16
reqFeatureIndex
;
/* Index of a feature required for this
* language system--if no required features
* = 0xFFFFu */
IndexArray
featureIndex
;
/* Array of indices into the FeatureList */
...
...
@@ -343,12 +343,12 @@ struct FeatureParamsSize
return_trace
(
true
);
}
U
SHORT
designSize
;
/* Represents the design size in 720/inch
U
INT16
designSize
;
/* Represents the design size in 720/inch
* units (decipoints). The design size entry
* must be non-zero. When there is a design
* size but no recommended size range, the
* rest of the array will consist of zeros. */
U
SHORT
subfamilyID
;
/* Has no independent meaning, but serves
U
INT16
subfamilyID
;
/* Has no independent meaning, but serves
* as an identifier that associates fonts
* in a subfamily. All fonts which share a
* Preferred or Font Family name and which
...
...
@@ -358,7 +358,7 @@ struct FeatureParamsSize
* same subfamily value. If this value is
* zero, the remaining fields in the array
* will be ignored. */
U
SHORT
subfamilyNameID
;
/* If the preceding value is non-zero, this
U
INT16
subfamilyNameID
;
/* If the preceding value is non-zero, this
* value must be set in the range 256 - 32767
* (inclusive). It records the value of a
* field in the name table, which must
...
...
@@ -372,10 +372,10 @@ struct FeatureParamsSize
* subfamily in a menu. Applications will
* choose the appropriate version based on
* their selection criteria. */
U
SHORT
rangeStart
;
/* Large end of the recommended usage range
U
INT16
rangeStart
;
/* Large end of the recommended usage range
* (inclusive), stored in 720/inch units
* (decipoints). */
U
SHORT
rangeEnd
;
/* Small end of the recommended usage range
U
INT16
rangeEnd
;
/* Small end of the recommended usage range
(exclusive), stored in 720/inch units
* (decipoints). */
public:
...
...
@@ -393,12 +393,12 @@ struct FeatureParamsStylisticSet
return_trace
(
c
->
check_struct
(
this
));
}
U
SHORT
version
;
/* (set to 0): This corresponds to a “minor”
U
INT16
version
;
/* (set to 0): This corresponds to a “minor”
* version number. Additional data may be
* added to the end of this Feature Parameters
* table in the future. */
U
SHORT
uiNameID
;
/* The 'name' table name ID that specifies a
U
INT16
uiNameID
;
/* The 'name' table name ID that specifies a
* string (or strings, for multiple languages)
* for a user-interface label for this
* feature. The values of uiLabelNameId and
...
...
@@ -426,25 +426,25 @@ struct FeatureParamsCharacterVariants
characters
.
sanitize
(
c
));
}
U
SHORT
format
;
/* Format number is set to 0. */
U
SHORT
featUILableNameID
;
/* The ‘name’ table name ID that
U
INT16
format
;
/* Format number is set to 0. */
U
INT16
featUILableNameID
;
/* The ‘name’ table name ID that
* specifies a string (or strings,
* for multiple languages) for a
* user-interface label for this
* feature. (May be nullptr.) */
U
SHORT
featUITooltipTextNameID
;
/* The ‘name’ table name ID that
U
INT16
featUITooltipTextNameID
;
/* The ‘name’ table name ID that
* specifies a string (or strings,
* for multiple languages) that an
* application can use for tooltip
* text for this feature. (May be
* nullptr.) */
U
SHORT
sampleTextNameID
;
/* The ‘name’ table name ID that
U
INT16
sampleTextNameID
;
/* The ‘name’ table name ID that
* specifies sample text that
* illustrates the effect of this
* feature. (May be nullptr.) */
U
SHORT
numNamedParameters
;
/* Number of named parameters. (May
U
INT16
numNamedParameters
;
/* Number of named parameters. (May
* be zero.) */
U
SHORT
firstParamUILabelNameID
;
/* The first ‘name’ table name ID
U
INT16
firstParamUILabelNameID
;
/* The first ‘name’ table name ID
* used to specify strings for
* user-interface labels for the
* feature parameters. (Must be zero
...
...
@@ -562,7 +562,7 @@ struct Feature
typedef
RecordListOf
<
Feature
>
FeatureList
;
struct
LookupFlag
:
U
SHORT
struct
LookupFlag
:
U
INT16
{
enum
Flags
{
RightToLeft
=
0x0001u
,
...
...
@@ -608,7 +608,7 @@ struct Lookup
unsigned
int
flag
=
lookupFlag
;
if
(
unlikely
(
flag
&
LookupFlag
::
UseMarkFilteringSet
))
{
const
U
SHORT
&
markFilteringSet
=
StructAfter
<
USHORT
>
(
subTable
);
const
U
INT16
&
markFilteringSet
=
StructAfter
<
UINT16
>
(
subTable
);
flag
+=
(
markFilteringSet
<<
16
);
}
return
flag
;
...
...
@@ -640,7 +640,7 @@ struct Lookup
if
(
unlikely
(
!
subTable
.
serialize
(
c
,
num_subtables
)))
return_trace
(
false
);
if
(
lookupFlag
&
LookupFlag
::
UseMarkFilteringSet
)
{
U
SHORT
&
markFilteringSet
=
StructAfter
<
USHORT
>
(
subTable
);
U
INT16
&
markFilteringSet
=
StructAfter
<
UINT16
>
(
subTable
);
markFilteringSet
.
set
(
lookup_props
>>
16
);
}
return_trace
(
true
);
...
...
@@ -653,18 +653,18 @@ struct Lookup
if
(
!
(
c
->
check_struct
(
this
)
&&
subTable
.
sanitize
(
c
)))
return_trace
(
false
);
if
(
lookupFlag
&
LookupFlag
::
UseMarkFilteringSet
)
{
const
U
SHORT
&
markFilteringSet
=
StructAfter
<
USHORT
>
(
subTable
);
const
U
INT16
&
markFilteringSet
=
StructAfter
<
UINT16
>
(
subTable
);
if
(
!
markFilteringSet
.
sanitize
(
c
))
return_trace
(
false
);
}
return_trace
(
true
);
}
private:
U
SHORT
lookupType
;
/* Different enumerations for GSUB and GPOS */
U
SHORT
lookupFlag
;
/* Lookup qualifiers */
U
INT16
lookupType
;
/* Different enumerations for GSUB and GPOS */
U
INT16
lookupFlag
;
/* Lookup qualifiers */
ArrayOf
<
Offset
<>
>
subTable
;
/* Array of SubTables */
U
SHORT
markFilteringSetX
[
VAR
];
/* Index (base 0) into GDEF mark glyph sets
U
INT16
markFilteringSetX
[
VAR
];
/* Index (base 0) into GDEF mark glyph sets
* structure. This field is only present if bit
* UseMarkFilteringSet of lookup flags is set. */
public:
...
...
@@ -737,7 +737,7 @@ struct CoverageFormat1
private:
protected:
U
SHORT
coverageFormat
;
/* Format identifier--format = 1 */
U
INT16
coverageFormat
;
/* Format identifier--format = 1 */
SortedArrayOf
<
GlyphID
>
glyphArray
;
/* Array of GlyphIDs--in numerical order */
public:
...
...
@@ -860,7 +860,7 @@ struct CoverageFormat2
private:
protected:
U
SHORT
coverageFormat
;
/* Format identifier--format = 2 */
U
INT16
coverageFormat
;
/* Format identifier--format = 2 */
SortedArrayOf
<
RangeRecord
>
rangeRecord
;
/* Array of glyph ranges--ordered by
* Start GlyphID. rangeCount entries
...
...
@@ -985,7 +985,7 @@ struct Coverage
protected:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
CoverageFormat1
format1
;
CoverageFormat2
format2
;
}
u
;
...
...
@@ -1047,9 +1047,9 @@ struct ClassDefFormat1
}
protected:
U
SHORT
classFormat
;
/* Format identifier--format = 1 */
U
INT16
classFormat
;
/* Format identifier--format = 1 */
GlyphID
startGlyph
;
/* First GlyphID of the classValueArray */
ArrayOf
<
U
SHORT
>
ArrayOf
<
U
INT16
>
classValue
;
/* Array of Class Values--one per GlyphID */
public:
DEFINE_SIZE_ARRAY
(
6
,
classValue
);
...
...
@@ -1107,7 +1107,7 @@ struct ClassDefFormat2
}
protected:
U
SHORT
classFormat
;
/* Format identifier--format = 2 */
U
INT16
classFormat
;
/* Format identifier--format = 2 */
SortedArrayOf
<
RangeRecord
>
rangeRecord
;
/* Array of glyph ranges--ordered by
* Start GlyphID */
...
...
@@ -1155,7 +1155,7 @@ struct ClassDef
protected:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
ClassDefFormat1
format1
;
ClassDefFormat2
format2
;
}
u
;
...
...
@@ -1240,8 +1240,8 @@ struct VarRegionList
}
protected:
U
SHORT
axisCount
;
U
SHORT
regionCount
;
U
INT16
axisCount
;
U
INT16
regionCount
;
VarRegionAxis
axesZ
[
VAR
];
public:
DEFINE_SIZE_ARRAY
(
4
,
axesZ
);
...
...
@@ -1265,13 +1265,13 @@ struct VarData
unsigned
int
count
=
regionIndices
.
len
;
unsigned
int
scount
=
shortCount
;
const
BYTE
*
bytes
=
&
StructAfter
<
BYTE
>
(
regionIndices
);
const
BYTE
*
row
=
bytes
+
inner
*
(
scount
+
count
);
const
UINT8
*
bytes
=
&
StructAfter
<
UINT8
>
(
regionIndices
);
const
UINT8
*
row
=
bytes
+
inner
*
(
scount
+
count
);
float
delta
=
0.
;
unsigned
int
i
=
0
;
const
SHORT
*
scursor
=
reinterpret_cast
<
const
SHORT
*>
(
row
);
const
INT16
*
scursor
=
reinterpret_cast
<
const
INT16
*>
(
row
);
for
(;
i
<
scount
;
i
++
)
{
float
scalar
=
regions
.
evaluate
(
regionIndices
.
array
[
i
],
coords
,
coord_count
);
...
...
@@ -1293,15 +1293,15 @@ struct VarData
return_trace
(
c
->
check_struct
(
this
)
&&
regionIndices
.
sanitize
(
c
)
&&
shortCount
<=
regionIndices
.
len
&&
c
->
check_array
(
&
StructAfter
<
BYTE
>
(
regionIndices
),
c
->
check_array
(
&
StructAfter
<
UINT8
>
(
regionIndices
),
get_row_size
(),
itemCount
));
}
protected:
U
SHORT
itemCount
;
U
SHORT
shortCount
;
ArrayOf
<
U
SHORT
>
regionIndices
;
BYTE
bytesX
[
VAR
];
U
INT16
itemCount
;
U
INT16
shortCount
;
ArrayOf
<
U
INT16
>
regionIndices
;
UINT8
bytesX
[
VAR
];
public:
DEFINE_SIZE_ARRAY2
(
6
,
regionIndices
,
bytesX
);
};
...
...
@@ -1337,9 +1337,9 @@ struct VariationStore
}
protected:
U
SHORT
format
;
U
INT16
format
;
LOffsetTo
<
VarRegionList
>
regions
;
OffsetArrayOf
<
VarData
,
U
LONG
>
dataSets
;
OffsetArrayOf
<
VarData
,
U
INT32
>
dataSets
;
public:
DEFINE_SIZE_ARRAY
(
8
,
dataSets
);
};
...
...
@@ -1366,8 +1366,8 @@ struct ConditionFormat1
}
protected:
U
SHORT
format
;
/* Format identifier--format = 1 */
U
SHORT
axisIndex
;
U
INT16
format
;
/* Format identifier--format = 1 */
U
INT16
axisIndex
;
F2DOT14
filterRangeMinValue
;
F2DOT14
filterRangeMaxValue
;
public:
...
...
@@ -1396,7 +1396,7 @@ struct Condition
protected:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
ConditionFormat1
format1
;
}
u
;
public:
...
...
@@ -1421,7 +1421,7 @@ struct ConditionSet
}
protected:
OffsetArrayOf
<
Condition
,
U
LONG
>
conditions
;
OffsetArrayOf
<
Condition
,
U
INT32
>
conditions
;
public:
DEFINE_SIZE_ARRAY
(
2
,
conditions
);
};
...
...
@@ -1437,7 +1437,7 @@ struct FeatureTableSubstitutionRecord
}
protected:
U
SHORT
featureIndex
;
U
INT16
featureIndex
;
LOffsetTo
<
Feature
>
feature
;
public:
DEFINE_SIZE_STATIC
(
6
);
...
...
@@ -1557,8 +1557,8 @@ struct HintingDevice
inline
unsigned
int
get_size
(
void
)
const
{
unsigned
int
f
=
deltaFormat
;
if
(
unlikely
(
f
<
1
||
f
>
3
||
startSize
>
endSize
))
return
3
*
U
SHORT
::
static_size
;
return
U
SHORT
::
static_size
*
(
4
+
((
endSize
-
startSize
)
>>
(
4
-
f
)));
if
(
unlikely
(
f
<
1
||
f
>
3
||
startSize
>
endSize
))
return
3
*
U
INT16
::
static_size
;
return
U
INT16
::
static_size
*
(
4
+
((
endSize
-
startSize
)
>>
(
4
-
f
)));
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
...
...
@@ -1603,14 +1603,14 @@ struct HintingDevice
}
protected:
U
SHORT
startSize
;
/* Smallest size to correct--in ppem */
U
SHORT
endSize
;
/* Largest size to correct--in ppem */
U
SHORT
deltaFormat
;
/* Format of DeltaValue array data: 1, 2, or 3
U
INT16
startSize
;
/* Smallest size to correct--in ppem */
U
INT16
endSize
;
/* Largest size to correct--in ppem */
U
INT16
deltaFormat
;
/* Format of DeltaValue array data: 1, 2, or 3
* 1 Signed 2-bit value, 8 values per uint16
* 2 Signed 4-bit value, 4 values per uint16
* 3 Signed 8-bit value, 2 values per uint16
*/
U
SHORT
deltaValue
[
VAR
];
/* Array of compressed data */
U
INT16
deltaValue
[
VAR
];
/* Array of compressed data */
public:
DEFINE_SIZE_ARRAY
(
6
,
deltaValue
);
};
...
...
@@ -1641,9 +1641,9 @@ struct VariationDevice
}
protected:
U
SHORT
outerIndex
;
U
SHORT
innerIndex
;
U
SHORT
deltaFormat
;
/* Format identifier for this table: 0x0x8000 */
U
INT16
outerIndex
;
U
INT16
innerIndex
;
U
INT16
deltaFormat
;
/* Format identifier for this table: 0x0x8000 */
public:
DEFINE_SIZE_STATIC
(
6
);
};
...
...
@@ -1651,10 +1651,10 @@ struct VariationDevice
struct
DeviceHeader
{
protected:
U
SHORT
reserved1
;
U
SHORT
reserved2
;
U
INT16
reserved1
;
U
INT16
reserved2
;
public:
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
public:
DEFINE_SIZE_STATIC
(
6
);
};
...
...
src/hb-ot-layout-gdef-table.hh
浏览文件 @
6f335ed1
...
...
@@ -41,7 +41,7 @@ namespace OT {
* Attachment List Table
*/
typedef
ArrayOf
<
U
SHORT
>
AttachPoint
;
/* Array of contour point indices--in
typedef
ArrayOf
<
U
INT16
>
AttachPoint
;
/* Array of contour point indices--in
* increasing numerical order */
struct
AttachList
...
...
@@ -62,7 +62,7 @@ struct AttachList
const
AttachPoint
&
points
=
this
+
attachPoint
[
index
];
if
(
point_count
)
{
const
U
SHORT
*
array
=
points
.
sub_array
(
start_offset
,
point_count
);
const
U
INT16
*
array
=
points
.
sub_array
(
start_offset
,
point_count
);
unsigned
int
count
=
*
point_count
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
point_array
[
i
]
=
array
[
i
];
...
...
@@ -109,8 +109,8 @@ struct CaretValueFormat1
}
protected:
U
SHORT
caretValueFormat
;
/* Format identifier--format = 1 */
SHORT
coordinate
;
/* X or Y value, in design units */
U
INT16
caretValueFormat
;
/* Format identifier--format = 1 */
INT16
coordinate
;
/* X or Y value, in design units */
public:
DEFINE_SIZE_STATIC
(
4
);
};
...
...
@@ -136,8 +136,8 @@ struct CaretValueFormat2
}
protected:
U
SHORT
caretValueFormat
;
/* Format identifier--format = 2 */
U
SHORT
caretValuePoint
;
/* Contour point index on glyph */
U
INT16
caretValueFormat
;
/* Format identifier--format = 2 */
U
INT16
caretValuePoint
;
/* Contour point index on glyph */
public:
DEFINE_SIZE_STATIC
(
4
);
};
...
...
@@ -160,8 +160,8 @@ struct CaretValueFormat3
}
protected:
U
SHORT
caretValueFormat
;
/* Format identifier--format = 3 */
SHORT
coordinate
;
/* X or Y value, in design units */
U
INT16
caretValueFormat
;
/* Format identifier--format = 3 */
INT16
coordinate
;
/* X or Y value, in design units */
OffsetTo
<
Device
>
deviceTable
;
/* Offset to Device table for X or Y
* value--from beginning of CaretValue
...
...
@@ -199,7 +199,7 @@ struct CaretValue
protected:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
CaretValueFormat1
format1
;
CaretValueFormat2
format2
;
CaretValueFormat3
format3
;
...
...
@@ -294,7 +294,7 @@ struct MarkGlyphSetsFormat1
}
protected:
U
SHORT
format
;
/* Format identifier--format = 1 */
U
INT16
format
;
/* Format identifier--format = 1 */
ArrayOf
<
LOffsetTo
<
Coverage
>
>
coverage
;
/* Array of long offsets to mark set
* coverage tables */
...
...
@@ -324,7 +324,7 @@ struct MarkGlyphSets
protected:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
MarkGlyphSetsFormat1
format1
;
}
u
;
public:
...
...
src/hb-ot-layout-gpos-table.hh
浏览文件 @
6f335ed1
...
...
@@ -51,11 +51,11 @@ enum attach_type_t {
/* Shared Tables: ValueRecord, Anchor Table, and MarkArray */
typedef
U
SHORT
Value
;
typedef
U
INT16
Value
;
typedef
Value
ValueRecord
[
VAR
];
struct
ValueFormat
:
U
SHORT
struct
ValueFormat
:
U
INT16
{
enum
Flags
{
xPlacement
=
0x0001u
,
/* Includes horizontal adjustment for placement */
...
...
@@ -74,14 +74,14 @@ struct ValueFormat : USHORT
/* All fields are options. Only those available advance the value pointer. */
#if 0
SHORT
xPlacement; /* Horizontal adjustment for
INT16
xPlacement; /* Horizontal adjustment for
* placement--in design units */
SHORT
yPlacement; /* Vertical adjustment for
INT16
yPlacement; /* Vertical adjustment for
* placement--in design units */
SHORT
xAdvance; /* Horizontal adjustment for
INT16
xAdvance; /* Horizontal adjustment for
* advance--in design units (only used
* for horizontal writing) */
SHORT
yAdvance; /* Vertical adjustment for advance--in
INT16
yAdvance; /* Vertical adjustment for advance--in
* design units (only used for vertical
* writing) */
Offset xPlaDevice; /* Offset to Device table for
...
...
@@ -178,8 +178,8 @@ struct ValueFormat : USHORT
static
inline
const
OffsetTo
<
Device
>&
get_device
(
const
Value
*
value
)
{
return
*
CastP
<
OffsetTo
<
Device
>
>
(
value
);
}
static
inline
const
SHORT
&
get_short
(
const
Value
*
value
)
{
return
*
CastP
<
SHORT
>
(
value
);
}
static
inline
const
INT16
&
get_short
(
const
Value
*
value
)
{
return
*
CastP
<
INT16
>
(
value
);
}
public:
...
...
@@ -247,9 +247,9 @@ struct AnchorFormat1
}
protected:
U
SHORT
format
;
/* Format identifier--format = 1 */
SHORT
xCoordinate
;
/* Horizontal value--in design units */
SHORT
yCoordinate
;
/* Vertical value--in design units */
U
INT16
format
;
/* Format identifier--format = 1 */
INT16
xCoordinate
;
/* Horizontal value--in design units */
INT16
yCoordinate
;
/* Vertical value--in design units */
public:
DEFINE_SIZE_STATIC
(
6
);
};
...
...
@@ -278,10 +278,10 @@ struct AnchorFormat2
}
protected:
U
SHORT
format
;
/* Format identifier--format = 2 */
SHORT
xCoordinate
;
/* Horizontal value--in design units */
SHORT
yCoordinate
;
/* Vertical value--in design units */
U
SHORT
anchorPoint
;
/* Index to glyph contour point */
U
INT16
format
;
/* Format identifier--format = 2 */
INT16
xCoordinate
;
/* Horizontal value--in design units */
INT16
yCoordinate
;
/* Vertical value--in design units */
U
INT16
anchorPoint
;
/* Index to glyph contour point */
public:
DEFINE_SIZE_STATIC
(
8
);
};
...
...
@@ -308,9 +308,9 @@ struct AnchorFormat3
}
protected:
U
SHORT
format
;
/* Format identifier--format = 3 */
SHORT
xCoordinate
;
/* Horizontal value--in design units */
SHORT
yCoordinate
;
/* Vertical value--in design units */
U
INT16
format
;
/* Format identifier--format = 3 */
INT16
xCoordinate
;
/* Horizontal value--in design units */
INT16
yCoordinate
;
/* Vertical value--in design units */
OffsetTo
<
Device
>
xDeviceTable
;
/* Offset to Device table for X
* coordinate-- from beginning of
...
...
@@ -351,7 +351,7 @@ struct Anchor
protected:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
AnchorFormat1
format1
;
AnchorFormat2
format2
;
AnchorFormat3
format3
;
...
...
@@ -382,7 +382,7 @@ struct AnchorMatrix
return_trace
(
true
);
}
U
SHORT
rows
;
/* Number of rows */
U
INT16
rows
;
/* Number of rows */
protected:
OffsetTo
<
Anchor
>
matrixZ
[
VAR
];
/* Matrix of offsets to Anchor tables--
...
...
@@ -403,7 +403,7 @@ struct MarkRecord
}
protected:
U
SHORT
klass
;
/* Class defined for this mark */
U
INT16
klass
;
/* Class defined for this mark */
OffsetTo
<
Anchor
>
markAnchor
;
/* Offset to Anchor table--from
* beginning of MarkArray table */
...
...
@@ -492,7 +492,7 @@ struct SinglePosFormat1
}
protected:
U
SHORT
format
;
/* Format identifier--format = 1 */
U
INT16
format
;
/* Format identifier--format = 1 */
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table--from
* beginning of subtable */
...
...
@@ -544,13 +544,13 @@ struct SinglePosFormat2
}
protected:
U
SHORT
format
;
/* Format identifier--format = 2 */
U
INT16
format
;
/* Format identifier--format = 2 */
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table--from
* beginning of subtable */
ValueFormat
valueFormat
;
/* Defines the types of data in the
* ValueRecord */
U
SHORT
valueCount
;
/* Number of ValueRecords */
U
INT16
valueCount
;
/* Number of ValueRecords */
ValueRecord
values
;
/* Array of ValueRecords--positioning
* values applied to glyphs */
public:
...
...
@@ -573,7 +573,7 @@ struct SinglePos
protected:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
SinglePosFormat1
format1
;
SinglePosFormat2
format2
;
}
u
;
...
...
@@ -604,7 +604,7 @@ struct PairSet
TRACE_COLLECT_GLYPHS
(
this
);
unsigned
int
len1
=
valueFormats
[
0
].
get_len
();
unsigned
int
len2
=
valueFormats
[
1
].
get_len
();
unsigned
int
record_size
=
U
SHORT
::
static_size
*
(
1
+
len1
+
len2
);
unsigned
int
record_size
=
U
INT16
::
static_size
*
(
1
+
len1
+
len2
);
const
PairValueRecord
*
record
=
CastP
<
PairValueRecord
>
(
arrayZ
);
unsigned
int
count
=
len
;
...
...
@@ -623,7 +623,7 @@ struct PairSet
hb_buffer_t
*
buffer
=
c
->
buffer
;
unsigned
int
len1
=
valueFormats
[
0
].
get_len
();
unsigned
int
len2
=
valueFormats
[
1
].
get_len
();
unsigned
int
record_size
=
U
SHORT
::
static_size
*
(
1
+
len1
+
len2
);
unsigned
int
record_size
=
U
INT16
::
static_size
*
(
1
+
len1
+
len2
);
const
PairValueRecord
*
record_array
=
CastP
<
PairValueRecord
>
(
arrayZ
);
unsigned
int
count
=
len
;
...
...
@@ -668,7 +668,7 @@ struct PairSet
{
TRACE_SANITIZE
(
this
);
if
(
!
(
c
->
check_struct
(
this
)
&&
c
->
check_array
(
arrayZ
,
U
SHORT
::
static_size
*
closure
->
stride
,
len
)))
return_trace
(
false
);
&&
c
->
check_array
(
arrayZ
,
U
INT16
::
static_size
*
closure
->
stride
,
len
)))
return_trace
(
false
);
unsigned
int
count
=
len
;
const
PairValueRecord
*
record
=
CastP
<
PairValueRecord
>
(
arrayZ
);
...
...
@@ -677,8 +677,8 @@ struct PairSet
}
protected:
U
SHORT
len
;
/* Number of PairValueRecords */
U
SHORT
arrayZ
[
VAR
];
/* Array of PairValueRecords--ordered
U
INT16
len
;
/* Number of PairValueRecords */
U
INT16
arrayZ
[
VAR
];
/* Array of PairValueRecords--ordered
* by GlyphID of the second glyph */
public:
DEFINE_SIZE_ARRAY
(
2
,
arrayZ
);
...
...
@@ -733,7 +733,7 @@ struct PairPosFormat1
}
protected:
U
SHORT
format
;
/* Format identifier--format = 1 */
U
INT16
format
;
/* Format identifier--format = 1 */
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table--from
* beginning of subtable */
...
...
@@ -823,7 +823,7 @@ struct PairPosFormat2
}
protected:
U
SHORT
format
;
/* Format identifier--format = 2 */
U
INT16
format
;
/* Format identifier--format = 2 */
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table--from
* beginning of subtable */
...
...
@@ -841,9 +841,9 @@ struct PairPosFormat2
classDef2
;
/* Offset to ClassDef table--from
* beginning of PairPos subtable--for
* the second glyph of the pair */
U
SHORT
class1Count
;
/* Number of classes in ClassDef1
U
INT16
class1Count
;
/* Number of classes in ClassDef1
* table--includes Class0 */
U
SHORT
class2Count
;
/* Number of classes in ClassDef2
U
INT16
class2Count
;
/* Number of classes in ClassDef2
* table--includes Class0 */
ValueRecord
values
;
/* Matrix of value pairs:
* class1-major, class2-minor,
...
...
@@ -868,7 +868,7 @@ struct PairPos
protected:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
PairPosFormat1
format1
;
PairPosFormat2
format2
;
}
u
;
...
...
@@ -1022,7 +1022,7 @@ struct CursivePosFormat1
}
protected:
U
SHORT
format
;
/* Format identifier--format = 1 */
U
INT16
format
;
/* Format identifier--format = 1 */
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table--from
* beginning of subtable */
...
...
@@ -1048,7 +1048,7 @@ struct CursivePos
protected:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
CursivePosFormat1
format1
;
}
u
;
};
...
...
@@ -1113,14 +1113,14 @@ struct MarkBasePosFormat1
}
protected:
U
SHORT
format
;
/* Format identifier--format = 1 */
U
INT16
format
;
/* Format identifier--format = 1 */
OffsetTo
<
Coverage
>
markCoverage
;
/* Offset to MarkCoverage table--from
* beginning of MarkBasePos subtable */
OffsetTo
<
Coverage
>
baseCoverage
;
/* Offset to BaseCoverage table--from
* beginning of MarkBasePos subtable */
U
SHORT
classCount
;
/* Number of classes defined for marks */
U
INT16
classCount
;
/* Number of classes defined for marks */
OffsetTo
<
MarkArray
>
markArray
;
/* Offset to MarkArray table--from
* beginning of MarkBasePos subtable */
...
...
@@ -1146,7 +1146,7 @@ struct MarkBasePos
protected:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
MarkBasePosFormat1
format1
;
}
u
;
};
...
...
@@ -1230,7 +1230,7 @@ struct MarkLigPosFormat1
}
protected:
U
SHORT
format
;
/* Format identifier--format = 1 */
U
INT16
format
;
/* Format identifier--format = 1 */
OffsetTo
<
Coverage
>
markCoverage
;
/* Offset to Mark Coverage table--from
* beginning of MarkLigPos subtable */
...
...
@@ -1238,7 +1238,7 @@ struct MarkLigPosFormat1
ligatureCoverage
;
/* Offset to Ligature Coverage
* table--from beginning of MarkLigPos
* subtable */
U
SHORT
classCount
;
/* Number of defined mark classes */
U
INT16
classCount
;
/* Number of defined mark classes */
OffsetTo
<
MarkArray
>
markArray
;
/* Offset to MarkArray table--from
* beginning of MarkLigPos subtable */
...
...
@@ -1264,7 +1264,7 @@ struct MarkLigPos
protected:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
MarkLigPosFormat1
format1
;
}
u
;
};
...
...
@@ -1344,7 +1344,7 @@ struct MarkMarkPosFormat1
}
protected:
U
SHORT
format
;
/* Format identifier--format = 1 */
U
INT16
format
;
/* Format identifier--format = 1 */
OffsetTo
<
Coverage
>
mark1Coverage
;
/* Offset to Combining Mark1 Coverage
* table--from beginning of MarkMarkPos
...
...
@@ -1353,7 +1353,7 @@ struct MarkMarkPosFormat1
mark2Coverage
;
/* Offset to Combining Mark2 Coverage
* table--from beginning of MarkMarkPos
* subtable */
U
SHORT
classCount
;
/* Number of defined mark classes */
U
INT16
classCount
;
/* Number of defined mark classes */
OffsetTo
<
MarkArray
>
mark1Array
;
/* Offset to Mark1Array table--from
* beginning of MarkMarkPos subtable */
...
...
@@ -1379,7 +1379,7 @@ struct MarkMarkPos
protected:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
MarkMarkPosFormat1
format1
;
}
u
;
};
...
...
@@ -1438,7 +1438,7 @@ struct PosLookupSubTable
protected:
union
{
U
SHORT
sub_format
;
U
INT16
sub_format
;
SinglePos
single
;
PairPos
pair
;
CursivePos
cursive
;
...
...
src/hb-ot-layout-gsub-table.hh
浏览文件 @
6f335ed1
...
...
@@ -110,11 +110,11 @@ struct SingleSubstFormat1
}
protected:
U
SHORT
format
;
/* Format identifier--format = 1 */
U
INT16
format
;
/* Format identifier--format = 1 */
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table--from
* beginning of Substitution table */
SHORT
deltaGlyphID
;
/* Add to original GlyphID to get
INT16
deltaGlyphID
;
/* Add to original GlyphID to get
* substitute GlyphID */
public:
DEFINE_SIZE_STATIC
(
6
);
...
...
@@ -195,7 +195,7 @@ struct SingleSubstFormat2
}
protected:
U
SHORT
format
;
/* Format identifier--format = 2 */
U
INT16
format
;
/* Format identifier--format = 2 */
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table--from
* beginning of Substitution table */
...
...
@@ -249,7 +249,7 @@ struct SingleSubst
protected:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
SingleSubstFormat1
format1
;
SingleSubstFormat2
format2
;
}
u
;
...
...
@@ -400,7 +400,7 @@ struct MultipleSubstFormat1
}
protected:
U
SHORT
format
;
/* Format identifier--format = 1 */
U
INT16
format
;
/* Format identifier--format = 1 */
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table--from
* beginning of Substitution table */
...
...
@@ -442,7 +442,7 @@ struct MultipleSubst
protected:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
MultipleSubstFormat1
format1
;
}
u
;
};
...
...
@@ -552,7 +552,7 @@ struct AlternateSubstFormat1
}
protected:
U
SHORT
format
;
/* Format identifier--format = 1 */
U
INT16
format
;
/* Format identifier--format = 1 */
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table--from
* beginning of Substitution table */
...
...
@@ -594,7 +594,7 @@ struct AlternateSubst
protected:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
AlternateSubstFormat1
format1
;
}
u
;
};
...
...
@@ -868,7 +868,7 @@ struct LigatureSubstFormat1
}
protected:
U
SHORT
format
;
/* Format identifier--format = 1 */
U
INT16
format
;
/* Format identifier--format = 1 */
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table--from
* beginning of Substitution table */
...
...
@@ -918,7 +918,7 @@ struct LigatureSubst
protected:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
LigatureSubstFormat1
format1
;
}
u
;
};
...
...
@@ -1016,11 +1016,11 @@ struct ReverseChainSingleSubstFormat1
unsigned
int
start_index
=
0
,
end_index
=
0
;
if
(
match_backtrack
(
c
,
backtrack
.
len
,
(
U
SHORT
*
)
backtrack
.
array
,
backtrack
.
len
,
(
U
INT16
*
)
backtrack
.
array
,
match_coverage
,
this
,
&
start_index
)
&&
match_lookahead
(
c
,
lookahead
.
len
,
(
U
SHORT
*
)
lookahead
.
array
,
lookahead
.
len
,
(
U
INT16
*
)
lookahead
.
array
,
match_coverage
,
this
,
1
,
&
end_index
))
{
...
...
@@ -1048,7 +1048,7 @@ struct ReverseChainSingleSubstFormat1
}
protected:
U
SHORT
format
;
/* Format identifier--format = 1 */
U
INT16
format
;
/* Format identifier--format = 1 */
OffsetTo
<
Coverage
>
coverage
;
/* Offset to Coverage table--from
* beginning of table */
...
...
@@ -1082,7 +1082,7 @@ struct ReverseChainSingleSubst
protected:
union
{
U
SHORT
format
;
/* Format identifier */
U
INT16
format
;
/* Format identifier */
ReverseChainSingleSubstFormat1
format1
;
}
u
;
};
...
...
@@ -1128,7 +1128,7 @@ struct SubstLookupSubTable
protected:
union
{
U
SHORT
sub_format
;
U
INT16
sub_format
;
SingleSubst
single
;
MultipleSubst
multiple
;
AlternateSubst
alternate
;
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
6f335ed1
此差异已折叠。
点击以展开。
src/hb-ot-math-table.hh
浏览文件 @
6f335ed1
...
...
@@ -48,7 +48,7 @@ struct MathValueRecord
}
protected:
SHORT
value
;
/* The X or Y value in design units */
INT16
value
;
/* The X or Y value in design units */
OffsetTo
<
Device
>
deviceTable
;
/* Offset to the device table - from the
* beginning of parent table. May be nullptr.
* Suggested format for device table is 1. */
...
...
@@ -154,10 +154,10 @@ struct MathConstants
}
protected:
SHORT
percentScaleDown
[
2
];
U
SHORT
minHeight
[
2
];
INT16
percentScaleDown
[
2
];
U
INT16
minHeight
[
2
];
MathValueRecord
mathValueRecords
[
51
];
SHORT
radicalDegreeBottomRaisePercent
;
INT16
radicalDegreeBottomRaisePercent
;
public:
DEFINE_SIZE_STATIC
(
214
);
...
...
@@ -279,7 +279,7 @@ struct MathKern
}
protected:
U
SHORT
heightCount
;
U
INT16
heightCount
;
MathValueRecord
mathValueRecords
[
VAR
];
/* Array of correction heights at
* which the kern value changes.
* Sorted by the height value in
...
...
@@ -425,7 +425,7 @@ struct MathGlyphVariantRecord
protected:
GlyphID
variantGlyph
;
/* Glyph ID for the variant. */
U
SHORT
advanceMeasurement
;
/* Advance width/height, in design units, of the
U
INT16
advanceMeasurement
;
/* Advance width/height, in design units, of the
* variant, in the direction of requested
* glyph extension. */
...
...
@@ -433,7 +433,7 @@ struct MathGlyphVariantRecord
DEFINE_SIZE_STATIC
(
4
);
};
struct
PartFlags
:
U
SHORT
struct
PartFlags
:
U
INT16
{
enum
Flags
{
Extender
=
0x0001u
,
/* If set, the part can be skipped or repeated. */
...
...
@@ -473,15 +473,15 @@ struct MathGlyphPartRecord
protected:
GlyphID
glyph
;
/* Glyph ID for the part. */
U
SHORT
startConnectorLength
;
/* Advance width/ height of the straight bar
U
INT16
startConnectorLength
;
/* Advance width/ height of the straight bar
* connector material, in design units, is at
* the beginning of the glyph, in the
* direction of the extension. */
U
SHORT
endConnectorLength
;
/* Advance width/ height of the straight bar
U
INT16
endConnectorLength
;
/* Advance width/ height of the straight bar
* connector material, in design units, is at
* the end of the glyph, in the direction of
* the extension. */
U
SHORT
fullAdvance
;
/* Full advance width/height for this part,
U
INT16
fullAdvance
;
/* Full advance width/height for this part,
* in the direction of the extension.
* In design units. */
PartFlags
partFlags
;
/* Part qualifiers. */
...
...
@@ -651,7 +651,7 @@ struct MathVariants
}
protected:
U
SHORT
minConnectorOverlap
;
/* Minimum overlap of connecting
U
INT16
minConnectorOverlap
;
/* Minimum overlap of connecting
* glyphs during glyph construction,
* in design units. */
OffsetTo
<
Coverage
>
vertGlyphCoverage
;
/* Offset to Coverage table -
...
...
@@ -660,10 +660,10 @@ struct MathVariants
OffsetTo
<
Coverage
>
horizGlyphCoverage
;
/* Offset to Coverage table -
* from the beginning of MathVariants
* table. */
U
SHORT
vertGlyphCount
;
/* Number of glyphs for which
U
INT16
vertGlyphCount
;
/* Number of glyphs for which
* information is provided for
* vertically growing variants. */
U
SHORT
horizGlyphCount
;
/* Number of glyphs for which
U
INT16
horizGlyphCount
;
/* Number of glyphs for which
* information is provided for
* horizontally growing variants. */
...
...
src/hb-ot-maxp-table.hh
浏览文件 @
6f335ed1
...
...
@@ -60,7 +60,7 @@ struct maxp
protected:
FixedVersion
<>
version
;
/* Version of the maxp table (0.5 or 1.0),
* 0x00005000u or 0x00010000u. */
U
SHORT
numGlyphs
;
/* The number of glyphs in the font. */
U
INT16
numGlyphs
;
/* The number of glyphs in the font. */
public:
DEFINE_SIZE_STATIC
(
6
);
};
...
...
src/hb-ot-name-table.hh
浏览文件 @
6f335ed1
...
...
@@ -65,12 +65,12 @@ struct NameRecord
return_trace
(
c
->
check_struct
(
this
)
&&
c
->
check_range
((
char
*
)
base
,
(
unsigned
int
)
length
+
offset
));
}
U
SHORT
platformID
;
/* Platform ID. */
U
SHORT
encodingID
;
/* Platform-specific encoding ID. */
U
SHORT
languageID
;
/* Language ID. */
U
SHORT
nameID
;
/* Name ID. */
U
SHORT
length
;
/* String length (in bytes). */
U
SHORT
offset
;
/* String offset from start of storage area (in bytes). */
U
INT16
platformID
;
/* Platform ID. */
U
INT16
encodingID
;
/* Platform-specific encoding ID. */
U
INT16
languageID
;
/* Language ID. */
U
INT16
nameID
;
/* Name ID. */
U
INT16
length
;
/* String length (in bytes). */
U
INT16
offset
;
/* String offset from start of storage area (in bytes). */
public:
DEFINE_SIZE_STATIC
(
12
);
};
...
...
@@ -123,8 +123,8 @@ struct name
}
/* We only implement format 0 for now. */
U
SHORT
format
;
/* Format selector (=0/1). */
U
SHORT
count
;
/* Number of name records. */
U
INT16
format
;
/* Format selector (=0/1). */
U
INT16
count
;
/* Number of name records. */
Offset
<>
stringOffset
;
/* Offset to start of string storage (from start of table). */
NameRecord
nameRecord
[
VAR
];
/* The name records where count is the number of records. */
public:
...
...
src/hb-ot-os2-table.hh
浏览文件 @
6f335ed1
...
...
@@ -50,50 +50,50 @@ struct os2
}
public:
U
SHORT
version
;
U
INT16
version
;
/* Version 0 */
SHORT
xAvgCharWidth
;
U
SHORT
usWeightClass
;
U
SHORT
usWidthClass
;
U
SHORT
fsType
;
SHORT
ySubscriptXSize
;
SHORT
ySubscriptYSize
;
SHORT
ySubscriptXOffset
;
SHORT
ySubscriptYOffset
;
SHORT
ySuperscriptXSize
;
SHORT
ySuperscriptYSize
;
SHORT
ySuperscriptXOffset
;
SHORT
ySuperscriptYOffset
;
SHORT
yStrikeoutSize
;
SHORT
yStrikeoutPosition
;
SHORT
sFamilyClass
;
BYTE
panose
[
10
];
U
LONG
ulUnicodeRange
[
4
];
INT16
xAvgCharWidth
;
U
INT16
usWeightClass
;
U
INT16
usWidthClass
;
U
INT16
fsType
;
INT16
ySubscriptXSize
;
INT16
ySubscriptYSize
;
INT16
ySubscriptXOffset
;
INT16
ySubscriptYOffset
;
INT16
ySuperscriptXSize
;
INT16
ySuperscriptYSize
;
INT16
ySuperscriptXOffset
;
INT16
ySuperscriptYOffset
;
INT16
yStrikeoutSize
;
INT16
yStrikeoutPosition
;
INT16
sFamilyClass
;
UINT8
panose
[
10
];
U
INT32
ulUnicodeRange
[
4
];
Tag
achVendID
;
U
SHORT
fsSelection
;
U
SHORT
usFirstCharIndex
;
U
SHORT
usLastCharIndex
;
SHORT
sTypoAscender
;
SHORT
sTypoDescender
;
SHORT
sTypoLineGap
;
U
SHORT
usWinAscent
;
U
SHORT
usWinDescent
;
U
INT16
fsSelection
;
U
INT16
usFirstCharIndex
;
U
INT16
usLastCharIndex
;
INT16
sTypoAscender
;
INT16
sTypoDescender
;
INT16
sTypoLineGap
;
U
INT16
usWinAscent
;
U
INT16
usWinDescent
;
/* Version 1 */
//U
LONG
ulCodePageRange1;
//U
LONG
ulCodePageRange2;
//U
INT32
ulCodePageRange1;
//U
INT32
ulCodePageRange2;
/* Version 2 */
//
SHORT
sxHeight;
//
SHORT
sCapHeight;
//U
SHORT
usDefaultChar;
//U
SHORT
usBreakChar;
//U
SHORT
usMaxContext;
//
INT16
sxHeight;
//
INT16
sCapHeight;
//U
INT16
usDefaultChar;
//U
INT16
usBreakChar;
//U
INT16
usMaxContext;
/* Version 5 */
//U
SHORT
usLowerOpticalPointSize;
//U
SHORT
usUpperOpticalPointSize;
//U
INT16
usLowerOpticalPointSize;
//U
INT16
usUpperOpticalPointSize;
public:
DEFINE_SIZE_STATIC
(
78
);
...
...
src/hb-ot-post-table.hh
浏览文件 @
6f335ed1
...
...
@@ -56,10 +56,10 @@ struct postV2Tail
return_trace
(
glyphNameIndex
.
sanitize
(
c
));
}
ArrayOf
<
U
SHORT
>
glyphNameIndex
;
/* This is not an offset, but is the
ArrayOf
<
U
INT16
>
glyphNameIndex
;
/* This is not an offset, but is the
* ordinal number of the glyph in 'post'
* string tables. */
BYTE
namesX
[
VAR
];
/* Glyph names with length bytes [variable]
UINT8
namesX
[
VAR
];
/* Glyph names with length bytes [variable]
* (a Pascal string). */
DEFINE_SIZE_ARRAY2
(
2
,
glyphNameIndex
,
namesX
);
...
...
@@ -234,7 +234,7 @@ struct post
private:
hb_blob_t
*
blob
;
uint32_t
version
;
const
ArrayOf
<
U
SHORT
>
*
glyphNameIndex
;
const
ArrayOf
<
U
INT16
>
*
glyphNameIndex
;
hb_prealloced_array_t
<
uint32_t
,
1
>
index_to_offset
;
const
uint8_t
*
pool
;
mutable
uint16_t
*
gids_sorted_by_name
;
...
...
@@ -261,16 +261,16 @@ struct post
* from the value of this field. */
FWORD
underlineThickness
;
/* Suggested values for the underline
thickness. */
U
LONG
isFixedPitch
;
/* Set to 0 if the font is proportionally
U
INT32
isFixedPitch
;
/* Set to 0 if the font is proportionally
* spaced, non-zero if the font is not
* proportionally spaced (i.e. monospaced). */
U
LONG
minMemType42
;
/* Minimum memory usage when an OpenType font
U
INT32
minMemType42
;
/* Minimum memory usage when an OpenType font
* is downloaded. */
U
LONG
maxMemType42
;
/* Maximum memory usage when an OpenType font
U
INT32
maxMemType42
;
/* Maximum memory usage when an OpenType font
* is downloaded. */
U
LONG
minMemType1
;
/* Minimum memory usage when an OpenType font
U
INT32
minMemType1
;
/* Minimum memory usage when an OpenType font
* is downloaded as a Type 1 font. */
U
LONG
maxMemType1
;
/* Maximum memory usage when an OpenType font
U
INT32
maxMemType1
;
/* Maximum memory usage when an OpenType font
* is downloaded as a Type 1 font. */
/*postV2Tail v2[VAR];*/
DEFINE_SIZE_STATIC
(
32
);
...
...
src/hb-ot-shape-complex-arabic-win1256.hh
浏览文件 @
6f335ed1
...
...
@@ -43,16 +43,16 @@
#define OT_TABLE_END }
#define OT_LABEL_START(Name) unsigned char Name[
#define OT_LABEL_END ];
#define OT_
BYTE
(u8) +1
/*byte*/
#define OT_U
SHORT
(u16) +2
/*bytes*/
#define OT_
UINT8
(u8) +1
/*byte*/
#define OT_U
INT16
(u16) +2
/*bytes*/
#else
#undef OT_MEASURE
#define OT_TABLE_START TABLE_NAME = {
#define OT_TABLE_END };
#define OT_LABEL_START(Name) {
#define OT_LABEL_END },
#define OT_
BYTE
(u8) (u8),
#define OT_U
SHORT
(u16) (unsigned char)((u16)>>8), (unsigned char)((u16)&0xFFu),
#define OT_
UINT8
(u8) (u8),
#define OT_U
INT16
(u16) (unsigned char)((u16)>>8), (unsigned char)((u16)&0xFFu),
#define OT_COUNT(Name, ItemSize) ((unsigned int) sizeof(((struct TABLE_NAME*)0)->Name) \
/ (unsigned int)(ItemSize) \
/* OT_ASSERT it's divisible (and positive). */
)
...
...
@@ -80,24 +80,24 @@
*/
#define OT_TAG(a,b,c,d) \
OT_
BYTE(a) OT_BYTE(b) OT_BYTE(c) OT_BYTE
(d)
OT_
UINT8(a) OT_UINT8(b) OT_UINT8(c) OT_UINT8
(d)
#define OT_OFFSET(From, To)
/* Offset from From to To in bytes */
\
OT_U
SHORT
(OT_DISTANCE(From, To))
OT_U
INT16
(OT_DISTANCE(From, To))
#define OT_GLYPHID
/* GlyphID */
\
OT_U
SHORT
OT_U
INT16
#define OT_UARRAY(Name, Items) \
OT_LABEL_START(Name) \
OT_U
SHORT
(OT_COUNT(Name##Data, 2)) \
OT_U
INT16
(OT_COUNT(Name##Data, 2)) \
OT_LABEL(Name##Data) \
Items \
OT_LABEL_END
#define OT_UHEADLESSARRAY(Name, Items) \
OT_LABEL_START(Name) \
OT_U
SHORT
(OT_COUNT(Name##Data, 2) + 1) \
OT_U
INT16
(OT_COUNT(Name##Data, 2) + 1) \
OT_LABEL(Name##Data) \
Items \
OT_LABEL_END
...
...
@@ -111,19 +111,19 @@
#define OT_LOOKUP(Name, LookupType, LookupFlag, SubLookupOffsets) \
OT_LABEL_START(Name) \
OT_U
SHORT
(LookupType) \
OT_U
SHORT
(LookupFlag) \
OT_U
INT16
(LookupType) \
OT_U
INT16
(LookupFlag) \
OT_LABEL_END \
OT_UARRAY(Name##SubLookupOffsetsArray, OT_LIST(SubLookupOffsets))
#define OT_SUBLOOKUP(Name, SubFormat, Items) \
OT_LABEL_START(Name) \
OT_U
SHORT
(SubFormat) \
OT_U
INT16
(SubFormat) \
Items
#define OT_COVERAGE1(Name, Items) \
OT_LABEL_START(Name) \
OT_U
SHORT
(1) \
OT_U
INT16
(1) \
OT_LABEL_END \
OT_UARRAY(Name##Glyphs, OT_LIST(Items))
...
...
@@ -174,7 +174,7 @@
/* Table manifest. */
#define MANIFEST(Items) \
OT_LABEL_START(manifest) \
OT_U
SHORT
(OT_COUNT(manifestData, 6)) \
OT_U
INT16
(OT_COUNT(manifestData, 6)) \
OT_LABEL(manifestData) \
Items \
OT_LABEL_END
...
...
@@ -304,8 +304,8 @@ OT_TABLE_END
#undef OT_TABLE_END
#undef OT_LABEL_START
#undef OT_LABEL_END
#undef OT_
BYTE
#undef OT_U
SHORT
#undef OT_
UINT8
#undef OT_U
INT16
#undef OT_DISTANCE
#undef OT_COUNT
...
...
src/hb-ot-var-avar-table.hh
浏览文件 @
6f335ed1
...
...
@@ -133,8 +133,8 @@ struct avar
protected:
FixedVersion
<>
version
;
/* Version of the avar table
* initially set to 0x00010000u */
U
SHORT
reserved
;
/* This field is permanently reserved. Set to 0. */
U
SHORT
axisCount
;
/* The number of variation axes in the font. This
U
INT16
reserved
;
/* This field is permanently reserved. Set to 0. */
U
INT16
axisCount
;
/* The number of variation axes in the font. This
* must be the same number as axisCount in the
* 'fvar' table. */
SegmentMaps
axisSegmentMapsZ
;
...
...
src/hb-ot-var-fvar-table.hh
浏览文件 @
6f335ed1
...
...
@@ -42,11 +42,11 @@ struct InstanceRecord
}
protected:
U
SHORT
subfamilyNameID
;
/* The name ID for entries in the 'name' table
U
INT16
subfamilyNameID
;
/* The name ID for entries in the 'name' table
* that provide subfamily names for this instance. */
U
SHORT
reserved
;
/* Reserved for future use — set to 0. */
U
INT16
reserved
;
/* Reserved for future use — set to 0. */
Fixed
coordinates
[
VAR
];
/* The coordinates array for this instance. */
//U
SHORT
postScriptNameIDX;/*Optional. The name ID for entries in the 'name'
//U
INT16
postScriptNameIDX;/*Optional. The name ID for entries in the 'name'
// * table that provide PostScript names for this
// * instance. */
...
...
@@ -67,8 +67,8 @@ struct AxisRecord
Fixed
minValue
;
/* The minimum coordinate value for the axis. */
Fixed
defaultValue
;
/* The default coordinate value for the axis. */
Fixed
maxValue
;
/* The maximum coordinate value for the axis. */
U
SHORT
reserved
;
/* Reserved for future use — set to 0. */
U
SHORT
axisNameID
;
/* The name ID for entries in the 'name' table that
U
INT16
reserved
;
/* Reserved for future use — set to 0. */
U
INT16
axisNameID
;
/* The name ID for entries in the 'name' table that
* provide a display name for this axis. */
public:
...
...
@@ -188,14 +188,14 @@ struct fvar
* initially set to 0x00010000u */
Offset
<>
things
;
/* Offset in bytes from the beginning of the table
* to the start of the AxisRecord array. */
U
SHORT
reserved
;
/* This field is permanently reserved. Set to 2. */
U
SHORT
axisCount
;
/* The number of variation axes in the font (the
U
INT16
reserved
;
/* This field is permanently reserved. Set to 2. */
U
INT16
axisCount
;
/* The number of variation axes in the font (the
* number of records in the axes array). */
U
SHORT
axisSize
;
/* The size in bytes of each VariationAxisRecord —
U
INT16
axisSize
;
/* The size in bytes of each VariationAxisRecord —
* set to 20 (0x0014) for this version. */
U
SHORT
instanceCount
;
/* The number of named instances defined in the font
U
INT16
instanceCount
;
/* The number of named instances defined in the font
* (the number of records in the instances array). */
U
SHORT
instanceSize
;
/* The size in bytes of each InstanceRecord — set
U
INT16
instanceSize
;
/* The size in bytes of each InstanceRecord — set
* to either axisCount * sizeof(Fixed) + 4, or to
* axisCount * sizeof(Fixed) + 6. */
...
...
src/hb-ot-var-hvar-table.hh
浏览文件 @
6f335ed1
...
...
@@ -55,7 +55,7 @@ struct DeltaSetIndexMap
unsigned
int
u
=
0
;
{
/* Fetch it. */
unsigned
int
w
=
get_width
();
const
BYTE
*
p
=
mapData
+
w
*
v
;
const
UINT8
*
p
=
mapData
+
w
*
v
;
for
(;
w
;
w
--
)
u
=
(
u
<<
8
)
+
*
p
++
;
}
...
...
@@ -78,10 +78,10 @@ struct DeltaSetIndexMap
{
return
(
format
&
0xF
)
+
1
;
}
protected:
U
SHORT
format
;
/* A packed field that describes the compressed
U
INT16
format
;
/* A packed field that describes the compressed
* representation of delta-set indices. */
U
SHORT
mapCount
;
/* The number of mapping entries. */
BYTE
mapData
[
VAR
];
/* The delta-set index mapping data. */
U
INT16
mapCount
;
/* The number of mapping entries. */
UINT8
mapData
[
VAR
];
/* The delta-set index mapping data. */
public:
DEFINE_SIZE_ARRAY
(
4
,
mapData
);
...
...
src/hb-ot-var-mvar-table.hh
浏览文件 @
6f335ed1
...
...
@@ -43,7 +43,7 @@ struct VariationValueRecord
public:
Tag
valueTag
;
/* Four-byte tag identifying a font-wide measure. */
U
LONG
varIdx
;
/* Outer/inner index into VariationStore item. */
U
INT32
varIdx
;
/* Outer/inner index into VariationStore item. */
public:
DEFINE_SIZE_STATIC
(
8
);
...
...
@@ -95,13 +95,13 @@ protected:
protected:
FixedVersion
<>
version
;
/* Version of the metrics variation table
* initially set to 0x00010000u */
U
SHORT
reserved
;
/* Not used; set to 0. */
U
SHORT
valueRecordSize
;
/* The size in bytes of each value record —
U
INT16
reserved
;
/* Not used; set to 0. */
U
INT16
valueRecordSize
;
/* The size in bytes of each value record —
* must be greater than zero. */
U
SHORT
valueRecordCount
;
/* The number of value records — may be zero. */
U
INT16
valueRecordCount
;
/* The number of value records — may be zero. */
OffsetTo
<
VariationStore
>
varStore
;
/* Offset to item variation store table. */
BYTE
values
[
VAR
];
/* Array of value records. The records must be
UINT8
values
[
VAR
];
/* Array of value records. The records must be
* in binary order of their valueTag field. */
public:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录