Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
1d66cdcf
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看板
提交
1d66cdcf
编写于
11月 10, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Better fix for MSVC 2008
Follow up on
b4c61130
Fixes
https://github.com/harfbuzz/harfbuzz/issues/1374
上级
b4c61130
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
20 addition
and
13 deletion
+20
-13
src/hb-machinery.hh
src/hb-machinery.hh
+4
-4
src/hb-open-type.hh
src/hb-open-type.hh
+8
-0
src/hb-ot-cmap-table.hh
src/hb-ot-cmap-table.hh
+2
-2
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gpos-table.hh
+2
-2
src/hb-ot-var-avar-table.hh
src/hb-ot-var-avar-table.hh
+4
-5
未找到文件。
src/hb-machinery.hh
浏览文件 @
1d66cdcf
...
...
@@ -110,17 +110,17 @@ static inline Type& StructAfter(TObject &X)
static const unsigned int min_size = (size)
#define DEFINE_SIZE_ARRAY(size, array) \
DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + VAR *
sizeof (array[0])
); \
DEFINE_COMPILES_ASSERTION ((void)
array
[0].static_size) \
DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + VAR *
(array).item_size
); \
DEFINE_COMPILES_ASSERTION ((void)
(array)
[0].static_size) \
enum { min_size = (size) }
#define DEFINE_SIZE_ARRAY_SIZED(size, array) \
inline unsigned int get_size (void) const { return (size -
array.min_size + array
.get_size ()); } \
inline unsigned int get_size (void) const { return (size -
(array).min_size + (array)
.get_size ()); } \
DEFINE_SIZE_ARRAY(size, array)
#define DEFINE_SIZE_ARRAY2(size, array1, array2) \
DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + sizeof (this->array1[0]) + sizeof (this->array2[0])); \
DEFINE_COMPILES_ASSERTION ((void)
array1[0].static_size; (void) array2
[0].static_size) \
DEFINE_COMPILES_ASSERTION ((void)
(array1)[0].static_size; (void) (array2)
[0].static_size) \
static const unsigned int min_size = (size)
...
...
src/hb-open-type.hh
浏览文件 @
1d66cdcf
...
...
@@ -335,6 +335,8 @@ static inline Type& operator + (Base &base, OffsetTo<Type, OffsetType, has_null>
template
<
typename
Type
>
struct
UnsizedArrayOf
{
enum
{
item_size
=
Type
::
static_size
};
HB_NO_CREATE_COPY_ASSIGN_TEMPLATE
(
UnsizedArrayOf
,
Type
);
/* Unlikely other places, use "int i" instead of "unsigned int i" for our
...
...
@@ -435,6 +437,8 @@ struct UnsizedOffsetListOf : UnsizedOffsetArrayOf<Type, OffsetType, has_null>
template
<
typename
Type
,
typename
LenType
=
HBUINT16
>
struct
ArrayOf
{
enum
{
item_size
=
Type
::
static_size
};
HB_NO_CREATE_COPY_ASSIGN_TEMPLATE2
(
ArrayOf
,
Type
,
LenType
);
inline
const
Type
*
sub_array
(
unsigned
int
start_offset
,
unsigned
int
*
pcount
/* IN/OUT */
)
const
...
...
@@ -603,6 +607,8 @@ struct OffsetListOf : OffsetArrayOf<Type>
template
<
typename
Type
,
typename
LenType
=
HBUINT16
>
struct
HeadlessArrayOf
{
enum
{
item_size
=
Type
::
static_size
};
HB_NO_CREATE_COPY_ASSIGN_TEMPLATE2
(
HeadlessArrayOf
,
Type
,
LenType
);
inline
const
Type
&
operator
[]
(
unsigned
int
i
)
const
...
...
@@ -801,6 +807,8 @@ struct VarSizedBinSearchHeader
template
<
typename
Type
>
struct
VarSizedBinSearchArrayOf
{
enum
{
item_size
=
Type
::
static_size
};
HB_NO_CREATE_COPY_ASSIGN_TEMPLATE
(
VarSizedBinSearchArrayOf
,
Type
);
inline
const
Type
&
operator
[]
(
unsigned
int
i
)
const
...
...
src/hb-ot-cmap-table.hh
浏览文件 @
1d66cdcf
...
...
@@ -636,7 +636,7 @@ struct DefaultUVS : SortedArrayOf<UnicodeValueRange, HBUINT32>
}
public:
DEFINE_SIZE_ARRAY
(
4
,
arrayZ
);
DEFINE_SIZE_ARRAY
(
4
,
*
this
);
};
struct
UVSMapping
...
...
@@ -668,7 +668,7 @@ struct NonDefaultUVS : SortedArrayOf<UVSMapping, HBUINT32>
}
public:
DEFINE_SIZE_ARRAY
(
4
,
arrayZ
);
DEFINE_SIZE_ARRAY
(
4
,
*
this
);
};
struct
VariationSelectorRecord
...
...
src/hb-ot-layout-gpos-table.hh
浏览文件 @
1d66cdcf
...
...
@@ -53,7 +53,7 @@ enum attach_type_t {
typedef
HBUINT16
Value
;
typedef
Value
ValueRecord
[
VAR
]
;
typedef
UnsizedArrayOf
<
Value
>
ValueRecord
;
struct
ValueFormat
:
HBUINT16
{
...
...
@@ -879,7 +879,7 @@ struct PairPosFormat2
unsigned
int
stride
=
len1
+
len2
;
unsigned
int
record_size
=
valueFormat1
.
get_size
()
+
valueFormat2
.
get_size
();
unsigned
int
count
=
(
unsigned
int
)
class1Count
*
(
unsigned
int
)
class2Count
;
return_trace
(
c
->
check_array
(
values
,
count
,
record_size
)
&&
return_trace
(
c
->
check_array
(
(
const
void
*
)
values
,
count
,
record_size
)
&&
valueFormat1
.
sanitize_values_stride_unsafe
(
c
,
this
,
&
values
[
0
],
count
,
stride
)
&&
valueFormat2
.
sanitize_values_stride_unsafe
(
c
,
this
,
&
values
[
len1
],
count
,
stride
));
}
...
...
src/hb-ot-var-avar-table.hh
浏览文件 @
1d66cdcf
...
...
@@ -94,7 +94,7 @@ struct SegmentMaps : ArrayOf<AxisValueMap>
}
public:
DEFINE_SIZE_ARRAY
(
2
,
arrayZ
);
DEFINE_SIZE_ARRAY
(
2
,
*
this
);
};
struct
avar
...
...
@@ -109,7 +109,7 @@ struct avar
c
->
check_struct
(
this
))))
return_trace
(
false
);
const
SegmentMaps
*
map
=
axisSegmentMapsZ
.
arrayZ
;
const
SegmentMaps
*
map
=
&
firstAxisSegmentMaps
;
unsigned
int
count
=
axisCount
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
...
...
@@ -125,7 +125,7 @@ struct avar
{
unsigned
int
count
=
MIN
<
unsigned
int
>
(
coords_length
,
axisCount
);
const
SegmentMaps
*
map
=
axisSegmentMapsZ
.
arrayZ
;
const
SegmentMaps
*
map
=
&
firstAxisSegmentMaps
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
coords
[
i
]
=
map
->
map
(
coords
[
i
]);
...
...
@@ -140,8 +140,7 @@ struct avar
HBUINT16
axisCount
;
/* The number of variation axes in the font. This
* must be the same number as axisCount in the
* 'fvar' table. */
UnsizedArrayOf
<
SegmentMaps
>
axisSegmentMapsZ
;
SegmentMaps
firstAxisSegmentMaps
;
public:
DEFINE_SIZE_MIN
(
8
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录