Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
8180c37d
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看板
提交
8180c37d
编写于
10月 27, 2018
作者:
E
Ebrahim Byagowi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[ot-color] Remove _png and _svg public APIs
上级
9aa6279a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
49 addition
and
37 deletion
+49
-37
docs/harfbuzz-sections.txt
docs/harfbuzz-sections.txt
+0
-4
src/dump-emoji.cc
src/dump-emoji.cc
+8
-3
src/hb-ot-color.cc
src/hb-ot-color.cc
+35
-4
src/hb-ot-color.h
src/hb-ot-color.h
+0
-24
test/api/test-ot-color.c
test/api/test-ot-color.c
+6
-2
未找到文件。
docs/harfbuzz-sections.txt
浏览文件 @
8180c37d
...
...
@@ -460,12 +460,8 @@ HB_OT_H_IN
<SECTION>
<FILE>hb-ot-color</FILE>
hb_ot_color_glyph_get_layers
hb_ot_color_glyph_reference_blob_png
hb_ot_color_glyph_reference_blob_svg
hb_ot_color_has_layers
hb_ot_color_has_palettes
hb_ot_color_has_png
hb_ot_color_has_svg
hb_ot_color_layer_t
hb_ot_color_palette_color_get_name_id
hb_ot_color_palette_flags_t
...
...
src/dump-emoji.cc
浏览文件 @
8180c37d
...
...
@@ -89,9 +89,12 @@ svg_dump (hb_face_t *face)
{
unsigned
glyph_count
=
hb_face_get_glyph_count
(
face
);
OT
::
SVG
::
accelerator_t
svg
;
svg
.
init
(
face
);
for
(
unsigned
int
glyph_id
=
0
;
glyph_id
<
glyph_count
;
glyph_id
++
)
{
hb_blob_t
*
blob
=
hb_ot_color_glyph_reference_blob_svg
(
face
,
glyph_id
);
hb_blob_t
*
blob
=
svg
.
reference_blob_for_glyph
(
glyph_id
);
if
(
hb_blob_get_length
(
blob
)
==
0
)
continue
;
...
...
@@ -110,6 +113,8 @@ svg_dump (hb_face_t *face)
hb_blob_destroy
(
blob
);
}
svg
.
fini
();
}
static
void
...
...
@@ -290,8 +295,8 @@ main (int argc, char **argv)
sbix_dump
(
face
);
if
(
hb_ot_color_has_svg
(
face
))
svg_dump
(
face
);
//
if (hb_ot_color_has_svg (face))
svg_dump
(
face
);
cairo_font_face_t
*
cairo_face
;
{
...
...
src/hb-ot-color.cc
浏览文件 @
8180c37d
...
...
@@ -47,12 +47,14 @@ _get_colr (hb_face_t *face)
return
*
(
hb_ot_face_data
(
face
)
->
COLR
.
get
());
}
#if 0
static inline const OT::CBDT_accelerator_t&
_get_cbdt (hb_face_t *face)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::CBDT_accelerator_t);
return *(hb_ot_face_data (face)->CBDT.get ());
}
#endif
static
inline
const
OT
::
CPAL
&
_get_cpal
(
hb_face_t
*
face
)
...
...
@@ -61,6 +63,7 @@ _get_cpal (hb_face_t *face)
return
*
(
hb_ot_face_data
(
face
)
->
CPAL
.
get
());
}
#if 0
static inline const OT::sbix_accelerator_t&
_get_sbix (hb_face_t *face)
{
...
...
@@ -74,6 +77,7 @@ _get_svg (hb_face_t *face)
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::SVG_accelerator_t);
return *(hb_ot_face_data (face)->SVG.get ());
}
#endif
/*
...
...
@@ -239,6 +243,7 @@ hb_ot_color_glyph_get_layers (hb_face_t *face,
}
#if 0
/*
* SVG
*/
...
...
@@ -249,7 +254,7 @@ hb_ot_color_glyph_get_layers (hb_face_t *face,
*
* Returns: whether SVG table is available.
*
* Since: REPLACEME
* Since:
DONT
REPLACEME
*/
hb_bool_t
hb_ot_color_has_svg (hb_face_t *face)
...
...
@@ -264,7 +269,7 @@ hb_ot_color_has_svg (hb_face_t *face)
*
* Returns: respective svg blob of the glyph, if available.
*
* Since: REPLACEME
* Since:
DONT
REPLACEME
*/
hb_blob_t *
hb_ot_color_glyph_reference_blob_svg (hb_face_t *face, hb_codepoint_t glyph)
...
...
@@ -283,7 +288,7 @@ hb_ot_color_glyph_reference_blob_svg (hb_face_t *face, hb_codepoint_t glyph)
*
* Returns: whether either of CBDT or sbix tables is available.
*
* Since: REPLACEME
* Since:
DONT
REPLACEME
*/
hb_bool_t
hb_ot_color_has_png (hb_face_t *face)
...
...
@@ -302,7 +307,7 @@ hb_ot_color_has_png (hb_face_t *face)
*
* Returns: respective png blob of the glyph, if available.
*
* Since: REPLACEME
* Since:
DONT
REPLACEME
*/
hb_blob_t *
hb_ot_color_glyph_reference_blob_png (hb_font_t *font,
...
...
@@ -328,3 +333,29 @@ hb_ot_color_glyph_reference_blob_png (hb_font_t *font,
return blob;
}
/* To be moved to public header */
/*
* SVG
*/
HB_EXTERN hb_bool_t
hb_ot_color_has_svg (hb_face_t *face);
HB_EXTERN hb_blob_t *
hb_ot_color_glyph_reference_blob_svg (hb_face_t *face, hb_codepoint_t glyph);
/*
* PNG: CBDT or sbix
*/
HB_EXTERN hb_bool_t
hb_ot_color_has_png (hb_face_t *face);
HB_EXTERN hb_blob_t *
hb_ot_color_glyph_reference_blob_png (hb_font_t *font,
hb_codepoint_t glyph,
unsigned int *strike_x_ppem,
unsigned int *strike_y_ppem);
#endif
src/hb-ot-color.h
浏览文件 @
8180c37d
...
...
@@ -111,30 +111,6 @@ hb_ot_color_glyph_get_layers (hb_face_t *face,
unsigned
int
*
count
,
/* IN/OUT. May be NULL. */
hb_ot_color_layer_t
*
layers
/* OUT. May be NULL. */
);
/*
* SVG
*/
HB_EXTERN
hb_bool_t
hb_ot_color_has_svg
(
hb_face_t
*
face
);
HB_EXTERN
hb_blob_t
*
hb_ot_color_glyph_reference_blob_svg
(
hb_face_t
*
face
,
hb_codepoint_t
glyph
);
/*
* PNG: CBDT or sbix
*/
HB_EXTERN
hb_bool_t
hb_ot_color_has_png
(
hb_face_t
*
face
);
HB_EXTERN
hb_blob_t
*
hb_ot_color_glyph_reference_blob_png
(
hb_font_t
*
font
,
hb_codepoint_t
glyph
,
unsigned
int
*
strike_x_ppem
,
unsigned
int
*
strike_y_ppem
);
HB_END_DECLS
#endif
/* HB_OT_COLOR_H */
test/api/test-ot-color.c
浏览文件 @
8180c37d
...
...
@@ -363,6 +363,7 @@ test_hb_ot_color_has_data (void)
g_assert
(
hb_ot_color_has_palettes
(
sbix
)
==
FALSE
);
g_assert
(
hb_ot_color_has_palettes
(
svg
)
==
FALSE
);
#if 0
g_assert (hb_ot_color_has_svg (empty) == FALSE);
g_assert (hb_ot_color_has_svg (cpal_v0) == FALSE);
g_assert (hb_ot_color_has_svg (cpal_v1) == FALSE);
...
...
@@ -378,8 +379,10 @@ test_hb_ot_color_has_data (void)
g_assert (hb_ot_color_has_png (cbdt) == TRUE);
g_assert (hb_ot_color_has_png (sbix) == TRUE);
g_assert (hb_ot_color_has_png (svg) == FALSE);
#endif
}
#if 0
static void
test_hb_ot_color_svg (void)
{
...
...
@@ -441,6 +444,7 @@ test_hb_ot_color_png (void)
hb_blob_destroy (blob);
hb_font_destroy (cbdt_font);
}
#endif
int
main
(
int
argc
,
char
**
argv
)
...
...
@@ -468,8 +472,8 @@ main (int argc, char **argv)
hb_test_add
(
test_hb_ot_color_palette_color_get_name_id
);
hb_test_add
(
test_hb_ot_color_glyph_get_layers
);
hb_test_add
(
test_hb_ot_color_has_data
);
hb_test_add
(
test_hb_ot_color_png
);
hb_test_add
(
test_hb_ot_color_svg
);
//
hb_test_add (test_hb_ot_color_png);
//
hb_test_add (test_hb_ot_color_svg);
status
=
hb_test_run
();
hb_face_destroy
(
cpal_v0
);
hb_face_destroy
(
cpal_v1
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录