Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
4c8ac4f4
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看板
提交
4c8ac4f4
编写于
8月 08, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Misc minor fixes
上级
560d68af
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
72 addition
and
226 deletion
+72
-226
src/check-internal-symbols.sh
src/check-internal-symbols.sh
+2
-8
src/hb-font-private.hh
src/hb-font-private.hh
+27
-2
src/hb-font.cc
src/hb-font.cc
+28
-35
src/hb-font.h
src/hb-font.h
+1
-1
src/hb-graphite2.cc
src/hb-graphite2.cc
+2
-2
src/hb-old.cc
src/hb-old.cc
+1
-1
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+3
-3
src/hb-ot-shape-fallback.cc
src/hb-ot-shape-fallback.cc
+4
-6
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+1
-1
src/hb-shape-plan.cc
src/hb-shape-plan.cc
+1
-1
src/hb-shape-plan.h
src/hb-shape-plan.h
+1
-1
src/hb-tt-font.cc
src/hb-tt-font.cc
+1
-165
未找到文件。
src/check-internal-symbols.sh
浏览文件 @
4c8ac4f4
...
...
@@ -14,18 +14,12 @@ else
exit
77
fi
if
which c++filt 2>/dev/null
>
/dev/null
;
then
cplusplusfilt
=
c++filt
else
cplusplusfilt
=
cat
fi
tested
=
false
for
suffix
in
.so
-
*
.dll
;
do
for
suffix
in
.so
;
do
so
=
`
echo
.libs/libharfbuzz
$suffix
`
if
test
-f
"
$so
"
;
then
echo
"Checking that we are not exposing internal symbols"
if
nm
$so
|
grep
' [TW] '
|
$cplusplusfilt
|
grep
-v
' T _fini\>\| T _init\>\| T hb_'
;
then
if
nm
$so
|
grep
' [TW] '
|
grep
-v
' T _fini\>\| T _init\>\| T hb_'
;
then
echo
"Ouch, internal symbols exposed"
stat
=
1
fi
...
...
src/hb-font-private.hh
浏览文件 @
4c8ac4f4
...
...
@@ -94,12 +94,12 @@ struct hb_face_t {
hb_bool_t
immutable
;
hb_reference_table_func_t
reference_table
;
hb_reference_table_func_t
reference_table
_func
;
void
*
user_data
;
hb_destroy_func_t
destroy
;
unsigned
int
index
;
unsigned
int
upem
;
mutable
unsigned
int
upem
;
struct
hb_shaper_data_t
shaper_data
;
...
...
@@ -107,6 +107,31 @@ struct hb_face_t {
hb_shape_plan_t
*
shape_plan
;
plan_node_t
*
next
;
}
*
shape_plans
;
inline
hb_blob_t
*
reference_table
(
hb_tag_t
tag
)
const
{
hb_blob_t
*
blob
;
if
(
unlikely
(
!
this
||
!
reference_table_func
))
return
hb_blob_get_empty
();
blob
=
reference_table_func
(
/*XXX*/
const_cast
<
hb_face_t
*>
(
this
),
tag
,
user_data
);
if
(
unlikely
(
!
blob
))
return
hb_blob_get_empty
();
return
blob
;
}
inline
unsigned
int
get_upem
(
void
)
const
{
if
(
unlikely
(
!
upem
))
load_upem
();
return
upem
;
}
private:
HB_INTERNAL
void
load_upem
(
void
)
const
;
};
#define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS
...
...
src/hb-font.cc
浏览文件 @
4c8ac4f4
...
...
@@ -54,7 +54,7 @@ hb_font_get_glyph_nil (hb_font_t *font,
void
*
user_data
HB_UNUSED
)
{
if
(
font
->
parent
)
return
hb_font_get_glyph
(
font
->
parent
,
unicode
,
variation_selector
,
glyph
);
return
font
->
parent
->
get_glyph
(
unicode
,
variation_selector
,
glyph
);
*
glyph
=
0
;
return
false
;
...
...
@@ -67,7 +67,7 @@ hb_font_get_glyph_h_advance_nil (hb_font_t *font,
void
*
user_data
HB_UNUSED
)
{
if
(
font
->
parent
)
return
font
->
parent_scale_x_distance
(
hb_font_get_glyph_h_advance
(
font
->
parent
,
glyph
));
return
font
->
parent_scale_x_distance
(
font
->
parent
->
get_glyph_h_advance
(
glyph
));
return
font
->
x_scale
;
}
...
...
@@ -79,7 +79,7 @@ hb_font_get_glyph_v_advance_nil (hb_font_t *font,
void
*
user_data
HB_UNUSED
)
{
if
(
font
->
parent
)
return
font
->
parent_scale_y_distance
(
hb_font_get_glyph_v_advance
(
font
->
parent
,
glyph
));
return
font
->
parent_scale_y_distance
(
font
->
parent
->
get_glyph_v_advance
(
glyph
));
return
font
->
y_scale
;
}
...
...
@@ -93,7 +93,7 @@ hb_font_get_glyph_h_origin_nil (hb_font_t *font,
void
*
user_data
HB_UNUSED
)
{
if
(
font
->
parent
)
{
hb_bool_t
ret
=
hb_font_get_glyph_h_origin
(
font
->
parent
,
glyph
,
x
,
y
);
hb_bool_t
ret
=
font
->
parent
->
get_glyph_h_origin
(
glyph
,
x
,
y
);
if
(
ret
)
font
->
parent_scale_position
(
x
,
y
);
return
ret
;
...
...
@@ -112,7 +112,7 @@ hb_font_get_glyph_v_origin_nil (hb_font_t *font,
void
*
user_data
HB_UNUSED
)
{
if
(
font
->
parent
)
{
hb_bool_t
ret
=
hb_font_get_glyph_v_origin
(
font
->
parent
,
glyph
,
x
,
y
);
hb_bool_t
ret
=
font
->
parent
->
get_glyph_v_origin
(
glyph
,
x
,
y
);
if
(
ret
)
font
->
parent_scale_position
(
x
,
y
);
return
ret
;
...
...
@@ -130,7 +130,7 @@ hb_font_get_glyph_h_kerning_nil (hb_font_t *font,
void
*
user_data
HB_UNUSED
)
{
if
(
font
->
parent
)
return
font
->
parent_scale_x_distance
(
hb_font_get_glyph_h_kerning
(
font
->
parent
,
left_glyph
,
right_glyph
));
return
font
->
parent_scale_x_distance
(
font
->
parent
->
get_glyph_h_kerning
(
left_glyph
,
right_glyph
));
return
0
;
}
...
...
@@ -143,7 +143,7 @@ hb_font_get_glyph_v_kerning_nil (hb_font_t *font,
void
*
user_data
HB_UNUSED
)
{
if
(
font
->
parent
)
return
font
->
parent_scale_y_distance
(
hb_font_get_glyph_v_kerning
(
font
->
parent
,
top_glyph
,
bottom_glyph
));
return
font
->
parent_scale_y_distance
(
font
->
parent
->
get_glyph_v_kerning
(
top_glyph
,
bottom_glyph
));
return
0
;
}
...
...
@@ -156,9 +156,7 @@ hb_font_get_glyph_extents_nil (hb_font_t *font,
void
*
user_data
HB_UNUSED
)
{
if
(
font
->
parent
)
{
hb_bool_t
ret
=
hb_font_get_glyph_extents
(
font
->
parent
,
glyph
,
extents
);
hb_bool_t
ret
=
font
->
parent
->
get_glyph_extents
(
glyph
,
extents
);
if
(
ret
)
{
font
->
parent_scale_position
(
&
extents
->
x_bearing
,
&
extents
->
y_bearing
);
font
->
parent_scale_distance
(
&
extents
->
width
,
&
extents
->
height
);
...
...
@@ -180,7 +178,7 @@ hb_font_get_glyph_contour_point_nil (hb_font_t *font,
void
*
user_data
HB_UNUSED
)
{
if
(
font
->
parent
)
{
hb_bool_t
ret
=
hb_font_get_glyph_contour_point
(
font
->
parent
,
glyph
,
point_index
,
x
,
y
);
hb_bool_t
ret
=
font
->
parent
->
get_glyph_contour_point
(
glyph
,
point_index
,
x
,
y
);
if
(
ret
)
font
->
parent_scale_position
(
x
,
y
);
return
ret
;
...
...
@@ -198,7 +196,7 @@ hb_font_get_glyph_name_nil (hb_font_t *font,
void
*
user_data
HB_UNUSED
)
{
if
(
font
->
parent
)
return
hb_font_get_glyph_name
(
font
->
parent
,
glyph
,
name
,
size
);
return
font
->
parent
->
get_glyph_name
(
glyph
,
name
,
size
);
if
(
size
)
*
name
=
'\0'
;
return
false
;
...
...
@@ -212,7 +210,7 @@ hb_font_get_glyph_from_name_nil (hb_font_t *font,
void
*
user_data
HB_UNUSED
)
{
if
(
font
->
parent
)
return
hb_font_get_glyph_from_name
(
font
->
parent
,
name
,
len
,
glyph
);
return
font
->
parent
->
get_glyph_from_name
(
name
,
len
,
glyph
);
*
glyph
=
0
;
return
false
;
...
...
@@ -516,7 +514,7 @@ static const hb_face_t _hb_face_nil = {
true
,
/* immutable */
NULL
,
/* reference_table */
NULL
,
/* reference_table
_func
*/
NULL
,
/* user_data */
NULL
,
/* destroy */
...
...
@@ -534,19 +532,19 @@ static const hb_face_t _hb_face_nil = {
hb_face_t
*
hb_face_create_for_tables
(
hb_reference_table_func_t
reference_table
,
hb_face_create_for_tables
(
hb_reference_table_func_t
reference_table
_func
,
void
*
user_data
,
hb_destroy_func_t
destroy
)
{
hb_face_t
*
face
;
if
(
!
reference_table
||
!
(
face
=
hb_object_create
<
hb_face_t
>
()))
{
if
(
!
reference_table
_func
||
!
(
face
=
hb_object_create
<
hb_face_t
>
()))
{
if
(
destroy
)
destroy
(
user_data
);
return
hb_face_get_empty
();
}
face
->
reference_table
=
reference_table
;
face
->
reference_table
_func
=
reference_table_func
;
face
->
user_data
=
user_data
;
face
->
destroy
=
destroy
;
...
...
@@ -697,22 +695,13 @@ hb_blob_t *
hb_face_reference_table
(
hb_face_t
*
face
,
hb_tag_t
tag
)
{
hb_blob_t
*
blob
;
if
(
unlikely
(
!
face
||
!
face
->
reference_table
))
return
hb_blob_get_empty
();
blob
=
face
->
reference_table
(
face
,
tag
,
face
->
user_data
);
if
(
unlikely
(
!
blob
))
return
hb_blob_get_empty
();
return
blob
;
return
face
->
reference_table
(
tag
);
}
hb_blob_t
*
hb_face_reference_blob
(
hb_face_t
*
face
)
{
return
hb_face_reference_table
(
face
,
HB_TAG_NONE
);
return
face
->
reference_table
(
HB_TAG_NONE
);
}
void
...
...
@@ -744,13 +733,17 @@ hb_face_set_upem (hb_face_t *face,
unsigned
int
hb_face_get_upem
(
hb_face_t
*
face
)
{
if
(
unlikely
(
!
face
->
upem
))
{
hb_blob_t
*
head_blob
=
Sanitizer
<
head
>::
sanitize
(
hb_face_reference_table
(
face
,
HB_OT_TAG_head
));
const
head
*
head_table
=
Sanitizer
<
head
>::
lock_instance
(
head_blob
);
face
->
upem
=
head_table
->
get_upem
();
hb_blob_destroy
(
head_blob
);
}
return
face
->
upem
;
return
face
->
get_upem
();
}
void
hb_face_t
::
load_upem
(
void
)
const
{
hb_blob_t
*
head_blob
=
Sanitizer
<
head
>::
sanitize
(
reference_table
(
HB_OT_TAG_head
));
const
head
*
head_table
=
Sanitizer
<
head
>::
lock_instance
(
head_blob
);
upem
=
head_table
->
get_upem
();
hb_blob_destroy
(
head_blob
);
}
...
...
src/hb-font.h
浏览文件 @
4c8ac4f4
...
...
@@ -52,7 +52,7 @@ typedef hb_blob_t * (*hb_reference_table_func_t) (hb_face_t *face, hb_tag_t tag
/* calls destroy() when not needing user_data anymore */
hb_face_t
*
hb_face_create_for_tables
(
hb_reference_table_func_t
reference_table
,
hb_face_create_for_tables
(
hb_reference_table_func_t
reference_table
_func
,
void
*
user_data
,
hb_destroy_func_t
destroy
);
...
...
src/hb-graphite2.cc
浏览文件 @
4c8ac4f4
...
...
@@ -73,7 +73,7 @@ static const void *hb_graphite2_get_table (const void *data, unsigned int tag, s
if
(
unlikely
(
!
blob
))
{
blob
=
hb_face_reference_table
(
face_data
->
face
,
tag
);
blob
=
face_data
->
face
->
reference_table
(
tag
);
hb_graphite2_tablelist_t
*
p
=
(
hb_graphite2_tablelist_t
*
)
calloc
(
1
,
sizeof
(
hb_graphite2_tablelist_t
));
if
(
unlikely
(
!
p
))
{
...
...
@@ -98,7 +98,7 @@ static const void *hb_graphite2_get_table (const void *data, unsigned int tag, s
hb_graphite2_shaper_face_data_t
*
_hb_graphite2_shaper_face_data_create
(
hb_face_t
*
face
)
{
hb_blob_t
*
silf_blob
=
hb_face_reference_table
(
face
,
HB_GRAPHITE2_TAG_SILF
);
hb_blob_t
*
silf_blob
=
face
->
reference_table
(
HB_GRAPHITE2_TAG_SILF
);
/* Umm, we just reference the table to check whether it exists.
* Maybe add better API for this? */
if
(
!
hb_blob_get_length
(
silf_blob
))
...
...
src/hb-old.cc
浏览文件 @
4c8ac4f4
...
...
@@ -188,7 +188,7 @@ static HB_Error
table_func
(
void
*
font
,
HB_Tag
tag
,
HB_Byte
*
buffer
,
HB_UInt
*
length
)
{
hb_face_t
*
face
=
(
hb_face_t
*
)
font
;
hb_blob_t
*
blob
=
hb_face_reference_table
(
face
,
(
hb_tag_t
)
tag
);
hb_blob_t
*
blob
=
face
->
reference_table
(
(
hb_tag_t
)
tag
);
unsigned
int
capacity
=
*
length
;
*
length
=
hb_blob_get_length
(
blob
);
memcpy
(
buffer
,
hb_blob_get_data
(
blob
,
NULL
),
MIN
(
capacity
,
*
length
));
...
...
src/hb-ot-layout.cc
浏览文件 @
4c8ac4f4
...
...
@@ -49,13 +49,13 @@ _hb_ot_layout_create (hb_face_t *face)
if
(
unlikely
(
!
layout
))
return
NULL
;
layout
->
gdef_blob
=
Sanitizer
<
GDEF
>::
sanitize
(
hb_face_reference_table
(
face
,
HB_OT_TAG_GDEF
));
layout
->
gdef_blob
=
Sanitizer
<
GDEF
>::
sanitize
(
face
->
reference_table
(
HB_OT_TAG_GDEF
));
layout
->
gdef
=
Sanitizer
<
GDEF
>::
lock_instance
(
layout
->
gdef_blob
);
layout
->
gsub_blob
=
Sanitizer
<
GSUB
>::
sanitize
(
hb_face_reference_table
(
face
,
HB_OT_TAG_GSUB
));
layout
->
gsub_blob
=
Sanitizer
<
GSUB
>::
sanitize
(
face
->
reference_table
(
HB_OT_TAG_GSUB
));
layout
->
gsub
=
Sanitizer
<
GSUB
>::
lock_instance
(
layout
->
gsub_blob
);
layout
->
gpos_blob
=
Sanitizer
<
GPOS
>::
sanitize
(
hb_face_reference_table
(
face
,
HB_OT_TAG_GPOS
));
layout
->
gpos_blob
=
Sanitizer
<
GPOS
>::
sanitize
(
face
->
reference_table
(
HB_OT_TAG_GPOS
));
layout
->
gpos
=
Sanitizer
<
GPOS
>::
lock_instance
(
layout
->
gpos_blob
);
layout
->
gsub_lookup_count
=
layout
->
gsub
->
get_lookup_count
();
...
...
src/hb-ot-shape-fallback.cc
浏览文件 @
4c8ac4f4
...
...
@@ -109,9 +109,8 @@ position_mark (const hb_ot_shape_plan_t *plan,
unsigned
int
combining_class
)
{
hb_glyph_extents_t
mark_extents
;
if
(
!
hb_font_get_glyph_extents
(
font
,
buffer
->
info
[
i
].
codepoint
,
&
mark_extents
))
if
(
!
font
->
get_glyph_extents
(
buffer
->
info
[
i
].
codepoint
,
&
mark_extents
))
return
;
hb_position_t
y_gap
=
font
->
y_scale
/
16
;
...
...
@@ -193,9 +192,8 @@ position_around_base (const hb_ot_shape_plan_t *plan,
unsigned
int
end
)
{
hb_glyph_extents_t
base_extents
;
if
(
!
hb_font_get_glyph_extents
(
font
,
buffer
->
info
[
base
].
codepoint
,
&
base_extents
))
if
(
!
font
->
get_glyph_extents
(
buffer
->
info
[
base
].
codepoint
,
&
base_extents
))
{
/* If extents don't work, zero marks and go home. */
zero_mark_advances
(
buffer
,
base
+
1
,
end
);
...
...
src/hb-ot-shape.cc
浏览文件 @
4c8ac4f4
...
...
@@ -578,7 +578,7 @@ hb_ot_shape_glyphs_closure (hb_font_t *font,
* if that's what they desire. */
unsigned
int
count
=
buffer
->
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
hb_set_add
(
glyphs
,
buffer
->
info
[
i
].
codepoint
);
glyphs
->
add
(
buffer
->
info
[
i
].
codepoint
);
/* And find transitive closure. */
hb_set_t
copy
;
...
...
src/hb-shape-plan.cc
浏览文件 @
4c8ac4f4
...
...
@@ -37,7 +37,7 @@
#undef HB_SHAPER_IMPLEMENT
void
static
void
hb_shape_plan_plan
(
hb_shape_plan_t
*
shape_plan
,
const
hb_feature_t
*
user_features
,
unsigned
int
num_user_features
,
...
...
src/hb-shape-plan.h
浏览文件 @
4c8ac4f4
...
...
@@ -47,7 +47,7 @@ hb_shape_plan_create (hb_face_t *face,
unsigned
int
num_user_features
,
const
char
*
const
*
shaper_list
);
hb_shape_plan_t
*
HB_INTERNAL
hb_shape_plan_t
*
hb_shape_plan_create_cached
(
hb_face_t
*
face
,
const
hb_segment_properties_t
*
props
,
const
hb_feature_t
*
user_features
,
...
...
src/hb-tt-font.cc
浏览文件 @
4c8ac4f4
...
...
@@ -51,7 +51,7 @@ _hb_tt_font_create (hb_font_t *font)
/* TODO Remove this object altogether */
hb_tt_font_t *tt = (hb_tt_font_t *) calloc (1, sizeof (hb_tt_font_t));
tt->hhea_blob = Sanitizer<hhea>::sanitize (
hb_face_reference_table (font->face,
HB_OT_TAG_hhea));
tt->hhea_blob = Sanitizer<hhea>::sanitize (
font->face->reference_table (
HB_OT_TAG_hhea));
tt->hhea = Sanitizer<hhea>::lock_instance (tt->hhea_blob);
return tt;
...
...
@@ -76,168 +76,4 @@ _get_hhea (hb_face_t *face)
* hb_tt_font_funcs_t
*/
static hb_bool_t
hb_font_get_glyph_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t unicode,
hb_codepoint_t variation_selector,
hb_codepoint_t *glyph,
void *user_data HB_UNUSED)
{
if (font->parent)
return hb_font_get_glyph (font->parent, unicode, variation_selector, glyph);
*glyph = 0;
return false;
}
static hb_position_t
hb_font_get_glyph_h_advance_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t glyph,
void *user_data HB_UNUSED)
{
if (font->parent)
return font->parent_scale_x_distance (hb_font_get_glyph_h_advance (font->parent, glyph));
return font->x_scale;
}
static hb_position_t
hb_font_get_glyph_v_advance_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t glyph,
void *user_data HB_UNUSED)
{
if (font->parent)
return font->parent_scale_y_distance (hb_font_get_glyph_v_advance (font->parent, glyph));
return font->y_scale;
}
static hb_bool_t
hb_font_get_glyph_h_origin_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t glyph,
hb_position_t *x,
hb_position_t *y,
void *user_data HB_UNUSED)
{
if (font->parent) {
hb_bool_t ret = hb_font_get_glyph_h_origin (font->parent,
glyph,
x, y);
if (ret)
font->parent_scale_position (x, y);
return ret;
}
*x = *y = 0;
return false;
}
static hb_bool_t
hb_font_get_glyph_v_origin_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t glyph,
hb_position_t *x,
hb_position_t *y,
void *user_data HB_UNUSED)
{
if (font->parent) {
hb_bool_t ret = hb_font_get_glyph_v_origin (font->parent,
glyph,
x, y);
if (ret)
font->parent_scale_position (x, y);
return ret;
}
*x = *y = 0;
return false;
}
static hb_position_t
hb_font_get_glyph_h_kerning_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t left_glyph,
hb_codepoint_t right_glyph,
void *user_data HB_UNUSED)
{
if (font->parent)
return font->parent_scale_x_distance (hb_font_get_glyph_h_kerning (font->parent, left_glyph, right_glyph));
return 0;
}
static hb_position_t
hb_font_get_glyph_v_kerning_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t top_glyph,
hb_codepoint_t bottom_glyph,
void *user_data HB_UNUSED)
{
if (font->parent)
return font->parent_scale_y_distance (hb_font_get_glyph_v_kerning (font->parent, top_glyph, bottom_glyph));
return 0;
}
static hb_bool_t
hb_font_get_glyph_extents_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t glyph,
hb_glyph_extents_t *extents,
void *user_data HB_UNUSED)
{
if (font->parent) {
hb_bool_t ret = hb_font_get_glyph_extents (font->parent,
glyph,
extents);
if (ret) {
font->parent_scale_position (&extents->x_bearing, &extents->y_bearing);
font->parent_scale_distance (&extents->width, &extents->height);
}
return ret;
}
memset (extents, 0, sizeof (*extents));
return false;
}
static hb_bool_t
hb_font_get_glyph_contour_point_nil (hb_font_t *font HB_UNUSED,
void *font_data HB_UNUSED,
hb_codepoint_t glyph,
unsigned int point_index,
hb_position_t *x,
hb_position_t *y,
void *user_data HB_UNUSED)
{
if (font->parent) {
hb_bool_t ret = hb_font_get_glyph_contour_point (font->parent,
glyph, point_index,
x, y);
if (ret)
font->parent_scale_position (x, y);
return ret;
}
*x = *y = 0;
return false;
}
static hb_font_funcs_t _hb_font_funcs_nil = {
HB_OBJECT_HEADER_STATIC,
true, /* immutable */
{
#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_nil,
HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
#undef HB_FONT_FUNC_IMPLEMENT
}
};
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录