Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
831ba743
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看板
提交
831ba743
编写于
11月 20, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix Codacy "issues"
上级
c49e43c1
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
12 deletion
+13
-12
src/test-name-table.cc
src/test-name-table.cc
+1
-1
src/test-ot-color.cc
src/test-ot-color.cc
+7
-7
test/api/test-buffer.c
test/api/test-buffer.c
+3
-2
test/api/test-object.c
test/api/test-object.c
+1
-1
test/api/test-ot-name.c
test/api/test-ot-name.c
+1
-1
未找到文件。
src/test-name-table.cc
浏览文件 @
831ba743
...
...
@@ -48,7 +48,7 @@ main (int argc, char **argv)
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
printf
(
"%
d
%s "
,
printf
(
"%
u
%s "
,
entries
[
i
].
name_id
,
hb_language_to_string
(
entries
[
i
].
language
));
...
...
src/test-ot-color.cc
浏览文件 @
831ba743
...
...
@@ -54,7 +54,7 @@ svg_dump (hb_face_t *face, unsigned int face_index)
const
char
*
data
=
hb_blob_get_data
(
blob
,
&
length
);
char
output_path
[
255
];
sprintf
(
output_path
,
"out/svg-%
d-%d
.svg%s"
,
sprintf
(
output_path
,
"out/svg-%
u-%u
.svg%s"
,
glyph_id
,
face_index
,
// append "z" if the content is gzipped, https://stackoverflow.com/a/6059405
...
...
@@ -108,7 +108,7 @@ png_dump (hb_face_t *face, unsigned int face_index)
const
char
*
data
=
hb_blob_get_data
(
blob
,
&
length
);
char
output_path
[
255
];
sprintf
(
output_path
,
"out/png-%
d-%d-%d
.png"
,
glyph_id
,
strike
,
face_index
);
sprintf
(
output_path
,
"out/png-%
u-%u-%u
.png"
,
glyph_id
,
strike
,
face_index
);
FILE
*
f
=
fopen
(
output_path
,
"wb"
);
fwrite
(
data
,
1
,
length
,
f
);
...
...
@@ -167,9 +167,8 @@ layered_glyph_dump (hb_face_t *face, cairo_font_face_t *cairo_face, unsigned int
// Render
unsigned
int
palette_count
=
hb_ot_color_palette_get_count
(
face
);
for
(
unsigned
int
palette
=
0
;
palette
<
palette_count
;
palette
++
)
{
char
output_path
[
255
];
for
(
unsigned
int
palette
=
0
;
palette
<
palette_count
;
palette
++
)
{
unsigned
int
num_colors
=
hb_ot_color_palette_get_colors
(
face
,
palette
,
0
,
NULL
,
NULL
);
if
(
!
num_colors
)
continue
;
...
...
@@ -178,7 +177,8 @@ layered_glyph_dump (hb_face_t *face, cairo_font_face_t *cairo_face, unsigned int
hb_ot_color_palette_get_colors
(
face
,
palette
,
0
,
&
num_colors
,
colors
);
if
(
num_colors
)
{
sprintf
(
output_path
,
"out/colr-%d-%d-%d.svg"
,
gid
,
palette
,
face_index
);
char
output_path
[
255
];
sprintf
(
output_path
,
"out/colr-%u-%u-%u.svg"
,
gid
,
palette
,
face_index
);
cairo_surface_t
*
surface
=
cairo_svg_surface_create
(
output_path
,
extents
.
width
,
extents
.
height
);
cairo_t
*
cr
=
cairo_create
(
surface
);
...
...
@@ -245,7 +245,7 @@ dump_glyphs (cairo_font_face_t *cairo_face, unsigned int upem,
// Render
{
char
output_path
[
255
];
sprintf
(
output_path
,
"out/%
d-%d
.svg"
,
face_index
,
i
);
sprintf
(
output_path
,
"out/%
u-%u
.svg"
,
face_index
,
i
);
cairo_surface_t
*
surface
=
cairo_svg_surface_create
(
output_path
,
extents
.
width
,
extents
.
height
);
cairo_t
*
cr
=
cairo_create
(
surface
);
cairo_set_font_face
(
cr
,
cairo_face
);
...
...
test/api/test-buffer.c
浏览文件 @
831ba743
...
...
@@ -379,14 +379,15 @@ static void
test_buffer_utf8_conversion
(
void
)
{
hb_buffer_t
*
b
;
hb_glyph_info_t
*
glyphs
;
unsigned
int
bytes
,
chars
,
i
,
j
,
len
;
unsigned
int
chars
,
i
,
j
,
len
;
b
=
hb_buffer_create
();
hb_buffer_set_replacement_codepoint
(
b
,
(
hb_codepoint_t
)
-
1
);
for
(
i
=
0
;
i
<
G_N_ELEMENTS
(
utf8_conversion_tests
);
i
++
)
{
unsigned
int
bytes
;
hb_glyph_info_t
*
glyphs
;
const
utf8_conversion_test_t
*
test
=
&
utf8_conversion_tests
[
i
];
char
*
escaped
;
...
...
test/api/test-object.c
浏览文件 @
831ba743
...
...
@@ -235,7 +235,7 @@ test_object (void)
{
unsigned
int
j
;
data_t
data
[
2
]
=
{{
MAGIC0
,
FALSE
},
{
MAGIC1
,
FALSE
}};
data_t
data
[
1000
]
=
{{
MAGIC0
,
FALSE
},
{
MAGIC1
,
FALSE
}};
deadlock_test_t
deadlock_test
;
g_test_message
(
"Testing object %s"
,
o
->
name
);
...
...
test/api/test-ot-name.c
浏览文件 @
831ba743
...
...
@@ -81,7 +81,7 @@ test_ot_name (void)
hb_ot_name_id_t
name_id
=
entries
[
3
].
name_id
;
g_assert_cmpuint
(
3
,
==
,
name_id
);
hb_language_t
lang
=
entries
[
3
].
language
;
g_assert_cmpstr
(
"en"
,
==
,
hb_language_to_string
(
lang
)
);
g_assert_cmpstr
(
hb_language_to_string
(
lang
),
==
,
"en"
);
char
text
[
10
];
unsigned
int
text_size
=
10
;
g_assert_cmpuint
(
27
,
==
,
hb_ot_name_get_utf8
(
face
,
name_id
,
lang
,
&
text_size
,
text
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录