Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
7481f0ce
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看板
提交
7481f0ce
编写于
2月 05, 2018
作者:
G
Garret Rieger
提交者:
Behdad Esfahbod
2月 07, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add codepoints to subset input.
上级
1cfe650f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
19 addition
and
11 deletion
+19
-11
src/hb-subset.cc
src/hb-subset.cc
+16
-8
src/hb-subset.h
src/hb-subset.h
+1
-1
test/api/test-subset.c
test/api/test-subset.c
+1
-1
util/hb-subset.cc
util/hb-subset.cc
+1
-1
未找到文件。
src/hb-subset.cc
浏览文件 @
7481f0ce
...
...
@@ -38,6 +38,8 @@ struct hb_subset_profile_t {
struct
hb_subset_input_t
{
hb_object_header_t
header
;
ASSERT_POD
();
hb_set_t
*
codepoints
;
};
struct
hb_subset_face_t
{
...
...
@@ -82,9 +84,14 @@ hb_subset_profile_destroy (hb_subset_profile_t *profile)
* Since: 1.7.5
**/
hb_subset_input_t
*
hb_subset_input_create
(
)
hb_subset_input_create
(
hb_set_t
*
codepoints
)
{
return
hb_object_create
<
hb_subset_input_t
>
();
if
(
unlikely
(
!
codepoints
))
codepoints
=
hb_set_get_empty
();
hb_subset_input_t
*
input
=
hb_object_create
<
hb_subset_input_t
>
();
input
->
codepoints
=
hb_set_reference
(
codepoints
);
return
input
;
}
/**
...
...
@@ -97,6 +104,7 @@ hb_subset_input_destroy(hb_subset_input_t *subset_input)
{
if
(
!
hb_object_destroy
(
subset_input
))
return
;
hb_set_destroy
(
subset_input
->
codepoints
);
free
(
subset_input
);
}
...
...
@@ -108,7 +116,7 @@ hb_subset_input_destroy(hb_subset_input_t *subset_input)
* Since: 1.7.5
**/
hb_subset_face_t
*
hb_subset_face_create
(
hb_face_t
*
face
)
hb_subset_face_create
(
hb_face_t
*
face
)
{
if
(
unlikely
(
!
face
))
face
=
hb_face_get_empty
();
...
...
@@ -125,7 +133,7 @@ hb_subset_face_create(hb_face_t *face)
* Since: 1.7.5
**/
void
hb_subset_face_destroy
(
hb_subset_face_t
*
subset_face
)
hb_subset_face_destroy
(
hb_subset_face_t
*
subset_face
)
{
if
(
!
hb_object_destroy
(
subset_face
))
return
;
...
...
@@ -143,10 +151,10 @@ hb_subset_face_destroy(hb_subset_face_t *subset_face)
* Subsets a font according to provided profile and input.
**/
hb_bool_t
hb_subset
(
hb_subset_profile_t
*
profile
,
hb_subset_input_t
*
input
,
hb_subset_face_t
*
face
,
hb_blob_t
**
result
/* OUT */
)
hb_subset
(
hb_subset_profile_t
*
profile
,
hb_subset_input_t
*
input
,
hb_subset_face_t
*
face
,
hb_blob_t
**
result
/* OUT */
)
{
if
(
!
profile
||
!
input
||
!
face
)
return
false
;
...
...
src/hb-subset.h
浏览文件 @
7481f0ce
...
...
@@ -53,7 +53,7 @@ hb_subset_profile_destroy (hb_subset_profile_t *profile);
typedef
struct
hb_subset_input_t
hb_subset_input_t
;
HB_EXTERN
hb_subset_input_t
*
hb_subset_input_create
();
hb_subset_input_create
(
hb_set_t
*
codepoints
);
HB_EXTERN
void
hb_subset_input_destroy
(
hb_subset_input_t
*
subset_input
);
...
...
test/api/test-subset.c
浏览文件 @
7481f0ce
...
...
@@ -42,7 +42,7 @@ test_subset (void)
hb_face_t
*
face
=
hb_face_create
(
font_blob
,
0
);
hb_subset_profile_t
*
profile
=
hb_subset_profile_create
();
hb_subset_input_t
*
input
=
hb_subset_input_create
(
);
hb_subset_input_t
*
input
=
hb_subset_input_create
(
hb_set_get_empty
()
);
hb_subset_face_t
*
subset_face
=
hb_subset_face_create
(
face
);
hb_blob_t
*
output
;
...
...
util/hb-subset.cc
浏览文件 @
7481f0ce
...
...
@@ -80,7 +80,7 @@ struct subset_consumer_t
{
// TODO(Q1) check for errors from creates and such
hb_subset_profile_t
*
subset_profile
=
hb_subset_profile_create
();
hb_subset_input_t
*
subset_input
=
hb_subset_input_create
(
);
hb_subset_input_t
*
subset_input
=
hb_subset_input_create
(
hb_set_get_empty
()
);
hb_face_t
*
face
=
hb_font_get_face
(
font
);
hb_subset_face_t
*
subset_face
=
hb_subset_face_create
(
face
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录