Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
1ded6d8b
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
12 个月 前同步成功
通知
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1ded6d8b
编写于
5月 10, 2011
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make default font-funcs chain-up to the parent
上级
b9d975b9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
60 addition
and
25 deletion
+60
-25
src/hb-font.cc
src/hb-font.cc
+39
-5
src/hb-font.h
src/hb-font.h
+21
-20
未找到文件。
src/hb-font.cc
浏览文件 @
1ded6d8b
...
...
@@ -49,7 +49,16 @@ hb_font_get_contour_point_nil (hb_font_t *font HB_UNUSED,
hb_position_t
*
x
HB_UNUSED
,
hb_position_t
*
y
HB_UNUSED
,
const
void
*
user_data
HB_UNUSED
)
{
return
false
;
}
{
if
(
font
->
parent
)
return
hb_font_get_contour_point
(
font
->
parent
,
point_index
,
glyph
,
x
,
y
);
*
x
=
*
y
=
0
;
return
false
;
}
static
void
hb_font_get_glyph_advance_nil
(
hb_font_t
*
font
HB_UNUSED
,
...
...
@@ -58,7 +67,14 @@ hb_font_get_glyph_advance_nil (hb_font_t *font HB_UNUSED,
hb_position_t
*
x_advance
HB_UNUSED
,
hb_position_t
*
y_advance
HB_UNUSED
,
const
void
*
user_data
HB_UNUSED
)
{
}
{
if
(
font
->
parent
)
{
hb_font_get_glyph_advance
(
font
->
parent
,
glyph
,
x_advance
,
y_advance
);
return
;
}
*
x_advance
=
*
y_advance
=
0
;
}
static
void
hb_font_get_glyph_extents_nil
(
hb_font_t
*
font
HB_UNUSED
,
...
...
@@ -66,7 +82,15 @@ hb_font_get_glyph_extents_nil (hb_font_t *font HB_UNUSED,
hb_codepoint_t
glyph
HB_UNUSED
,
hb_glyph_extents_t
*
extents
HB_UNUSED
,
const
void
*
user_data
HB_UNUSED
)
{
}
{
if
(
font
->
parent
)
{
hb_font_get_glyph_extents
(
font
->
parent
,
glyph
,
extents
);
return
;
}
extents
->
x_bearing
=
extents
->
y_bearing
=
0
;
extents
->
width
=
extents
->
height
=
0
;
}
static
hb_codepoint_t
hb_font_get_glyph_nil
(
hb_font_t
*
font
HB_UNUSED
,
...
...
@@ -74,7 +98,12 @@ hb_font_get_glyph_nil (hb_font_t *font HB_UNUSED,
hb_codepoint_t
unicode
HB_UNUSED
,
hb_codepoint_t
variation_selector
HB_UNUSED
,
const
void
*
user_data
HB_UNUSED
)
{
return
0
;
}
{
if
(
font
->
parent
)
return
hb_font_get_glyph
(
font
->
parent
,
unicode
,
variation_selector
);
return
0
;
}
static
hb_position_t
hb_font_get_kerning_nil
(
hb_font_t
*
font
HB_UNUSED
,
...
...
@@ -82,7 +111,12 @@ hb_font_get_kerning_nil (hb_font_t *font HB_UNUSED,
hb_codepoint_t
first_glyph
HB_UNUSED
,
hb_codepoint_t
second_glyph
HB_UNUSED
,
const
void
*
user_data
HB_UNUSED
)
{
return
0
;
}
{
if
(
font
->
parent
)
return
hb_font_get_kerning
(
font
->
parent
,
first_glyph
,
second_glyph
);
return
0
;
}
static
hb_font_funcs_t
_hb_font_funcs_nil
=
{
...
...
src/hb-font.h
浏览文件 @
1ded6d8b
...
...
@@ -121,9 +121,11 @@ typedef struct _hb_glyph_extents_t
hb_position_t
height
;
}
hb_glyph_extents_t
;
typedef
hb_codepoint_t
(
*
hb_font_get_glyph_func_t
)
(
hb_font_t
*
font
,
const
void
*
font_data
,
hb_codepoint_t
unicode
,
hb_codepoint_t
variation_selector
,
const
void
*
user_data
);
typedef
hb_bool_t
(
*
hb_font_get_contour_point_func_t
)
(
hb_font_t
*
font
,
const
void
*
font_data
,
unsigned
int
point_index
,
hb_codepoint_t
glyph
,
hb_position_t
*
x
,
hb_position_t
*
y
,
const
void
*
user_data
);
typedef
void
(
*
hb_font_get_glyph_advance_func_t
)
(
hb_font_t
*
font
,
const
void
*
font_data
,
hb_codepoint_t
glyph
,
hb_position_t
*
x_advance
,
hb_position_t
*
y_advance
,
...
...
@@ -132,19 +134,18 @@ typedef void (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, const void *f
hb_codepoint_t
glyph
,
hb_glyph_extents_t
*
extents
,
const
void
*
user_data
);
typedef
hb_bool_t
(
*
hb_font_get_contour_point_func_t
)
(
hb_font_t
*
font
,
const
void
*
font_data
,
unsigned
int
point_index
,
hb_codepoint_t
glyph
,
hb_position_t
*
x
,
hb_position_t
*
y
,
const
void
*
user_data
);
typedef
hb_codepoint_t
(
*
hb_font_get_glyph_func_t
)
(
hb_font_t
*
font
,
const
void
*
font_data
,
hb_codepoint_t
unicode
,
hb_codepoint_t
variation_selector
,
const
void
*
user_data
);
typedef
hb_position_t
(
*
hb_font_get_kerning_func_t
)
(
hb_font_t
*
font
,
const
void
*
font_data
,
hb_codepoint_t
first_glyph
,
hb_codepoint_t
second_glyph
,
const
void
*
user_data
);
void
hb_font_funcs_set_
glyph
_func
(
hb_font_funcs_t
*
ffuncs
,
hb_font_get_glyph_func_t
glyph
_func
,
void
*
user_data
,
hb_destroy_func_t
destroy
);
hb_font_funcs_set_
contour_point
_func
(
hb_font_funcs_t
*
ffuncs
,
hb_font_get_contour_point_func_t
contour_point
_func
,
void
*
user_data
,
hb_destroy_func_t
destroy
);
void
hb_font_funcs_set_glyph_advance_func
(
hb_font_funcs_t
*
ffuncs
,
...
...
@@ -157,9 +158,9 @@ hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs,
void
*
user_data
,
hb_destroy_func_t
destroy
);
void
hb_font_funcs_set_
contour_point
_func
(
hb_font_funcs_t
*
ffuncs
,
hb_font_get_contour_point_func_t
contour_point
_func
,
void
*
user_data
,
hb_destroy_func_t
destroy
);
hb_font_funcs_set_
glyph
_func
(
hb_font_funcs_t
*
ffuncs
,
hb_font_get_glyph_func_t
glyph
_func
,
void
*
user_data
,
hb_destroy_func_t
destroy
);
void
hb_font_funcs_set_kerning_func
(
hb_font_funcs_t
*
ffuncs
,
...
...
@@ -167,9 +168,10 @@ hb_font_funcs_set_kerning_func (hb_font_funcs_t *ffuncs,
void
*
user_data
,
hb_destroy_func_t
destroy
);
hb_codepoint_t
hb_font_get_glyph
(
hb_font_t
*
font
,
hb_codepoint_t
unicode
,
hb_codepoint_t
variation_selector
);
hb_bool_t
hb_font_get_contour_point
(
hb_font_t
*
font
,
unsigned
int
point_index
,
hb_codepoint_t
glyph
,
hb_position_t
*
x
,
hb_position_t
*
y
);
void
hb_font_get_glyph_advance
(
hb_font_t
*
font
,
...
...
@@ -181,10 +183,9 @@ hb_font_get_glyph_extents (hb_font_t *font,
hb_codepoint_t
glyph
,
hb_glyph_extents_t
*
extents
);
hb_bool_t
hb_font_get_contour_point
(
hb_font_t
*
font
,
unsigned
int
point_index
,
hb_codepoint_t
glyph
,
hb_position_t
*
x
,
hb_position_t
*
y
);
hb_codepoint_t
hb_font_get_glyph
(
hb_font_t
*
font
,
hb_codepoint_t
unicode
,
hb_codepoint_t
variation_selector
);
hb_position_t
hb_font_get_kerning
(
hb_font_t
*
font
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录