Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
0e0af11c
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看板
提交
0e0af11c
编写于
11月 11, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[hdmx] Renames
上级
da6aa3b0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
23 addition
and
23 deletion
+23
-23
src/hb-ot-hdmx-table.hh
src/hb-ot-hdmx-table.hh
+23
-23
未找到文件。
src/hb-ot-hdmx-table.hh
浏览文件 @
0e0af11c
...
@@ -44,15 +44,15 @@ struct DeviceRecord
...
@@ -44,15 +44,15 @@ struct DeviceRecord
struct
SubsetView
struct
SubsetView
{
{
const
DeviceRecord
*
source_device_record
;
const
DeviceRecord
*
source_device_record
;
unsigned
int
size
_device_r
ecord
;
unsigned
int
size
DeviceR
ecord
;
hb_subset_plan_t
*
subset_plan
;
hb_subset_plan_t
*
subset_plan
;
inline
void
init
(
const
DeviceRecord
*
source_device_record
,
inline
void
init
(
const
DeviceRecord
*
source_device_record
,
unsigned
int
size
_device_r
ecord
,
unsigned
int
size
DeviceR
ecord
,
hb_subset_plan_t
*
subset_plan
)
hb_subset_plan_t
*
subset_plan
)
{
{
this
->
source_device_record
=
source_device_record
;
this
->
source_device_record
=
source_device_record
;
this
->
size
_device_record
=
size_device_r
ecord
;
this
->
size
DeviceRecord
=
sizeDeviceR
ecord
;
this
->
subset_plan
=
subset_plan
;
this
->
subset_plan
=
subset_plan
;
}
}
...
@@ -68,7 +68,7 @@ struct DeviceRecord
...
@@ -68,7 +68,7 @@ struct DeviceRecord
const
HBUINT8
*
width
=
&
(
this
->
source_device_record
->
widthsZ
[
gid
]);
const
HBUINT8
*
width
=
&
(
this
->
source_device_record
->
widthsZ
[
gid
]);
if
(
width
<
((
const
HBUINT8
*
)
this
->
source_device_record
)
+
size
_device_r
ecord
)
if
(
width
<
((
const
HBUINT8
*
)
this
->
source_device_record
)
+
size
DeviceR
ecord
)
return
width
;
return
width
;
else
else
return
nullptr
;
return
nullptr
;
...
@@ -92,8 +92,8 @@ struct DeviceRecord
...
@@ -92,8 +92,8 @@ struct DeviceRecord
return_trace
(
false
);
return_trace
(
false
);
}
}
this
->
pixel
_size
.
set
(
subset_view
.
source_device_record
->
pixel_s
ize
);
this
->
pixel
Size
.
set
(
subset_view
.
source_device_record
->
pixelS
ize
);
this
->
max
_width
.
set
(
subset_view
.
source_device_record
->
max_w
idth
);
this
->
max
Width
.
set
(
subset_view
.
source_device_record
->
maxW
idth
);
for
(
unsigned
int
i
=
0
;
i
<
subset_view
.
len
();
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
subset_view
.
len
();
i
++
)
{
{
...
@@ -109,16 +109,16 @@ struct DeviceRecord
...
@@ -109,16 +109,16 @@ struct DeviceRecord
return_trace
(
true
);
return_trace
(
true
);
}
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
,
unsigned
int
size
_device_r
ecord
)
const
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
,
unsigned
int
size
DeviceR
ecord
)
const
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
return_trace
(
likely
(
c
->
check_struct
(
this
)
&&
return_trace
(
likely
(
c
->
check_struct
(
this
)
&&
c
->
check_range
(
this
,
size
_device_r
ecord
)));
c
->
check_range
(
this
,
size
DeviceR
ecord
)));
}
}
HBUINT8
pixel
_size
;
/* Pixel size for following widths (as ppem). */
HBUINT8
pixel
Size
;
/* Pixel size for following widths (as ppem). */
HBUINT8
max
_width
;
/* Maximum width. */
HBUINT8
max
Width
;
/* Maximum width. */
UnsizedArrayOf
<
HBUINT8
>
widthsZ
;
/* Array of widths (numGlyphs is from the 'maxp' table). */
UnsizedArrayOf
<
HBUINT8
>
widthsZ
;
/* Array of widths (numGlyphs is from the 'maxp' table). */
public:
public:
DEFINE_SIZE_ARRAY
(
2
,
widthsZ
);
DEFINE_SIZE_ARRAY
(
2
,
widthsZ
);
};
};
...
@@ -130,13 +130,13 @@ struct hdmx
...
@@ -130,13 +130,13 @@ struct hdmx
inline
unsigned
int
get_size
(
void
)
const
inline
unsigned
int
get_size
(
void
)
const
{
{
return
min_size
+
num
_records
*
size_device_r
ecord
;
return
min_size
+
num
Records
*
sizeDeviceR
ecord
;
}
}
inline
const
DeviceRecord
&
operator
[]
(
unsigned
int
i
)
const
inline
const
DeviceRecord
&
operator
[]
(
unsigned
int
i
)
const
{
{
if
(
unlikely
(
i
>=
num
_r
ecords
))
return
Null
(
DeviceRecord
);
if
(
unlikely
(
i
>=
num
R
ecords
))
return
Null
(
DeviceRecord
);
return
StructAtOffset
<
DeviceRecord
>
(
&
this
->
dataZ
,
i
*
size
_device_r
ecord
);
return
StructAtOffset
<
DeviceRecord
>
(
&
this
->
dataZ
,
i
*
size
DeviceR
ecord
);
}
}
inline
bool
serialize
(
hb_serialize_context_t
*
c
,
const
hdmx
*
source_hdmx
,
hb_subset_plan_t
*
plan
)
inline
bool
serialize
(
hb_serialize_context_t
*
c
,
const
hdmx
*
source_hdmx
,
hb_subset_plan_t
*
plan
)
...
@@ -146,13 +146,13 @@ struct hdmx
...
@@ -146,13 +146,13 @@ struct hdmx
if
(
unlikely
(
!
c
->
extend_min
((
*
this
))))
return_trace
(
false
);
if
(
unlikely
(
!
c
->
extend_min
((
*
this
))))
return_trace
(
false
);
this
->
version
.
set
(
source_hdmx
->
version
);
this
->
version
.
set
(
source_hdmx
->
version
);
this
->
num
_records
.
set
(
source_hdmx
->
num_r
ecords
);
this
->
num
Records
.
set
(
source_hdmx
->
numR
ecords
);
this
->
size
_device_r
ecord
.
set
(
DeviceRecord
::
get_size
(
plan
->
glyphs
.
len
));
this
->
size
DeviceR
ecord
.
set
(
DeviceRecord
::
get_size
(
plan
->
glyphs
.
len
));
for
(
unsigned
int
i
=
0
;
i
<
source_hdmx
->
num
_r
ecords
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
source_hdmx
->
num
R
ecords
;
i
++
)
{
{
DeviceRecord
::
SubsetView
subset_view
;
DeviceRecord
::
SubsetView
subset_view
;
subset_view
.
init
(
&
(
*
source_hdmx
)[
i
],
source_hdmx
->
size
_device_r
ecord
,
plan
);
subset_view
.
init
(
&
(
*
source_hdmx
)[
i
],
source_hdmx
->
size
DeviceR
ecord
,
plan
);
if
(
!
c
->
start_embed
<
DeviceRecord
>
()
->
serialize
(
c
,
subset_view
))
if
(
!
c
->
start_embed
<
DeviceRecord
>
()
->
serialize
(
c
,
subset_view
))
return_trace
(
false
);
return_trace
(
false
);
...
@@ -163,7 +163,7 @@ struct hdmx
...
@@ -163,7 +163,7 @@ struct hdmx
static
inline
size_t
get_subsetted_size
(
const
hdmx
*
source_hdmx
,
hb_subset_plan_t
*
plan
)
static
inline
size_t
get_subsetted_size
(
const
hdmx
*
source_hdmx
,
hb_subset_plan_t
*
plan
)
{
{
return
min_size
+
source_hdmx
->
num
_r
ecords
*
DeviceRecord
::
get_size
(
plan
->
glyphs
.
len
);
return
min_size
+
source_hdmx
->
num
R
ecords
*
DeviceRecord
::
get_size
(
plan
->
glyphs
.
len
);
}
}
inline
bool
subset
(
hb_subset_plan_t
*
plan
)
const
inline
bool
subset
(
hb_subset_plan_t
*
plan
)
const
...
@@ -201,15 +201,15 @@ struct hdmx
...
@@ -201,15 +201,15 @@ struct hdmx
{
{
TRACE_SANITIZE
(
this
);
TRACE_SANITIZE
(
this
);
return_trace
(
c
->
check_struct
(
this
)
&&
version
==
0
&&
return_trace
(
c
->
check_struct
(
this
)
&&
version
==
0
&&
!
hb_unsigned_mul_overflows
(
num
_records
,
size_device_r
ecord
)
&&
!
hb_unsigned_mul_overflows
(
num
Records
,
sizeDeviceR
ecord
)
&&
size
_device_r
ecord
>=
DeviceRecord
::
min_size
&&
size
DeviceR
ecord
>=
DeviceRecord
::
min_size
&&
c
->
check_range
(
this
,
get_size
()));
c
->
check_range
(
this
,
get_size
()));
}
}
protected:
protected:
HBUINT16
version
;
/* Table version number (0) */
HBUINT16
version
;
/* Table version number (0) */
HBUINT16
num
_r
ecords
;
/* Number of device records. */
HBUINT16
num
R
ecords
;
/* Number of device records. */
HBUINT32
size
_device_r
ecord
;
/* Size of a device record, 32-bit aligned. */
HBUINT32
size
DeviceR
ecord
;
/* Size of a device record, 32-bit aligned. */
UnsizedArrayOf
<
HBUINT8
>
dataZ
;
/* Array of device records. */
UnsizedArrayOf
<
HBUINT8
>
dataZ
;
/* Array of device records. */
public:
public:
DEFINE_SIZE_ARRAY
(
8
,
dataZ
);
DEFINE_SIZE_ARRAY
(
8
,
dataZ
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录