Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
9682ef13
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看板
提交
9682ef13
编写于
2月 08, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor fixups
上级
35eeb893
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
12 addition
and
15 deletion
+12
-15
CMakeLists.txt
CMakeLists.txt
+1
-1
src/hb-ot-cmap-table.hh
src/hb-ot-cmap-table.hh
+3
-3
src/hb-subset.cc
src/hb-subset.cc
+3
-3
test/api/hb-test.h
test/api/hb-test.h
+5
-0
test/api/test-subset-glyf.c
test/api/test-subset-glyf.c
+0
-4
test/api/test-subset.c
test/api/test-subset.c
+0
-4
未找到文件。
CMakeLists.txt
浏览文件 @
9682ef13
...
...
@@ -253,7 +253,7 @@ set (project_sources
${
HB_FALLBACK_sources
}
${
HB_OT_sources
}
${
HB_OT_RAGEL_GENERATED_sources
}
${
HB_OT_RAGEL_GENERATED_sources
}
)
set
(
subset_project_sources
...
...
src/hb-ot-cmap-table.hh
浏览文件 @
9682ef13
...
...
@@ -27,7 +27,7 @@
#ifndef HB_OT_CMAP_TABLE_HH
#define HB_OT_CMAP_TABLE_HH
#include "hb-open-type-private.hh"
#include "hb-open-type-private.hh"
#include "hb-subset-plan.hh"
namespace
OT
{
...
...
@@ -504,7 +504,7 @@ struct cmap
encodingRecord
.
sanitize
(
c
,
this
));
}
inline
bool
subset
(
hb_subset_plan_t
*
plan
,
hb_face_t
*
source
,
hb_face_t
*
dest
)
const
inline
bool
subset
(
hb_subset_plan_t
*
plan
,
hb_face_t
*
source
,
hb_face_t
*
dest
)
const
{
// TODO something useful re: memory, write to dest
size_t
dest_sz
=
64536
;
// as much as anyone would ever need
...
...
@@ -514,7 +514,7 @@ struct cmap
// Same version
OT
::
cmap
new_cmap
;
new_cmap
.
version
=
version
;
new_cmap
.
encodingRecord
.
len
.
set
(
1
);
// one format 12 subtable
new_cmap
.
encodingRecord
.
len
.
set
(
1
);
// one format 12 subtable
// TODO we need to actually build the format 12 subtable
...
...
src/hb-subset.cc
浏览文件 @
9682ef13
...
...
@@ -26,7 +26,7 @@
*/
#include "hb-object-private.hh"
#include "hb-open-type-private.hh"
#include "hb-open-type-private.hh"
#include "hb-private.hh"
...
...
@@ -109,7 +109,7 @@ hb_subset_input_destroy(hb_subset_input_t *subset_input)
template
<
typename
TableType
>
hb_bool_t
subset
(
hb_subset_plan_t
*
plan
,
hb_face_t
*
source
,
hb_face_t
*
dest
)
subset
(
hb_subset_plan_t
*
plan
,
hb_face_t
*
source
,
hb_face_t
*
dest
)
{
OT
::
Sanitizer
<
TableType
>
sanitizer
;
hb_blob_t
*
table_blob
=
sanitizer
.
sanitize
(
source
->
reference_table
(
TableType
::
tableTag
));
...
...
@@ -119,7 +119,7 @@ subset(hb_subset_plan_t *plan, hb_face_t *source, hb_face_t *dest)
}
const
TableType
*
table
=
OT
::
Sanitizer
<
TableType
>::
lock_instance
(
table_blob
);
hb_bool_t
result
=
table
->
subset
(
plan
,
source
,
dest
);
hb_blob_destroy
(
table_blob
);
// TODO string not numeric tag
...
...
test/api/hb-test.h
浏览文件 @
9682ef13
...
...
@@ -161,6 +161,11 @@ typedef void (*hb_test_fixture_func_t) (void);
#define g_test_fail() g_error("Test failed")
#endif
#ifndef g_assert_cmpmem
#define g_assert_cmpmem(m1, l1, m2, l2) g_assert_true (l1 == l2 && memcmp (m1, m2, l1) == 0)
#endif
static
inline
void
hb_test_add_func
(
const
char
*
test_path
,
hb_test_func_t
test_func
)
...
...
test/api/test-subset-glyf.c
浏览文件 @
9682ef13
...
...
@@ -28,10 +28,6 @@
#include "hb-test.h"
#ifndef g_assert_cmpmem
#define g_assert_cmpmem(m1, l1, m2, l2) g_assert_true (l1 == l2 && memcmp (m1, m2, l1) == 0)
#endif
static
char
*
read_file
(
const
char
*
path
,
size_t
*
length
)
...
...
test/api/test-subset.c
浏览文件 @
9682ef13
...
...
@@ -26,10 +26,6 @@
#include "hb-test.h"
#ifndef g_assert_cmpmem
#define g_assert_cmpmem(m1, l1, m2, l2) g_assert_true (l1 == l2 && memcmp (m1, m2, l1) == 0)
#endif
/* Unit tests for hb-subset.h */
static
const
char
test_data
[]
=
{
0
,
1
,
0
,
0
,
/* sfntVersion */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录