Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
b710176c
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看板
提交
b710176c
编写于
5月 08, 2019
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[hdmx] Touch up
上级
e8ef0e62
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
10 deletion
+14
-10
src/hb-ot-hdmx-table.hh
src/hb-ot-hdmx-table.hh
+14
-10
未找到文件。
src/hb-ot-hdmx-table.hh
浏览文件 @
b710176c
...
...
@@ -44,7 +44,8 @@ struct DeviceRecord
static
unsigned
int
get_size
(
unsigned
count
)
{
return
hb_ceil_to_4
(
min_size
+
count
*
HBUINT8
::
static_size
);
}
template
<
typename
Iterator
>
template
<
typename
Iterator
,
hb_requires
(
hb_is_iterator
(
Iterator
))>
bool
serialize
(
hb_serialize_context_t
*
c
,
unsigned
pixelSize
,
Iterator
it
)
{
TRACE_SERIALIZE
(
this
);
...
...
@@ -94,7 +95,8 @@ struct hdmx
return
StructAtOffset
<
DeviceRecord
>
(
&
this
->
firstDeviceRecord
,
i
*
sizeDeviceRecord
);
}
template
<
typename
Iterator
>
template
<
typename
Iterator
,
hb_requires
(
hb_is_iterator
(
Iterator
))>
bool
serialize
(
hb_serialize_context_t
*
c
,
unsigned
version
,
Iterator
it
)
{
TRACE_SERIALIZE
(
this
);
...
...
@@ -103,14 +105,13 @@ struct hdmx
this
->
version
=
version
;
this
->
numRecords
=
it
.
len
();
this
->
sizeDeviceRecord
=
it
?
DeviceRecord
::
get_size
((
*
it
).
second
.
len
())
:
DeviceRecord
::
get_size
(
0
);
this
->
sizeDeviceRecord
=
DeviceRecord
::
get_size
(
it
?
(
*
it
).
second
.
len
()
:
0
);
using
pair_t
=
decltype
(
*
it
);
+
it
|
hb_apply
([
&
]
(
const
pair_t
&
_
)
{
|
hb_apply
([
&
]
(
const
hb_item_type
<
Iterator
>
&
_
)
{
c
->
start_embed
<
DeviceRecord
>
()
->
serialize
(
c
,
_
.
first
,
_
.
second
);
});
})
;
return_trace
(
c
->
successful
);
}
...
...
@@ -125,21 +126,24 @@ struct hdmx
auto
it
=
+
hb_iota
((
unsigned
)
numRecords
)
|
hb_map
([
&
]
(
unsigned
_
)
{
|
hb_map
([
&
]
(
unsigned
_
)
{
const
DeviceRecord
*
device_record
=
&
StructAtOffset
<
DeviceRecord
>
(
&
firstDeviceRecord
,
_
*
sizeDeviceRecord
);
auto
row
=
+
hb_iota
(
c
->
plan
->
num_output_glyphs
())
|
hb_map
(
c
->
plan
->
reverse_glyph_map
)
|
hb_map
([
=
]
(
hb_codepoint_t
_
)
{
|
hb_map
([
=
]
(
hb_codepoint_t
_
)
{
if
(
c
->
plan
->
is_empty_glyph
(
_
))
return
Null
(
HBUINT8
);
return
device_record
->
widthsZ
.
as_array
(
get_num_glyphs
())
[
_
];
})
;
return
hb_pair
((
unsigned
)
device_record
->
pixelSize
,
+
row
);
});
})
;
hdmx_prime
->
serialize
(
c
->
serializer
,
version
,
it
);
return_trace
(
true
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录