Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
e05a9994
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
接近 2 年 前同步成功
通知
1
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看板
提交
e05a9994
编写于
11月 15, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add hb_face_[sg]et_glyph_count()
上级
aec89de5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
44 addition
and
1 deletion
+44
-1
src/hb-font-private.hh
src/hb-font-private.hh
+9
-0
src/hb-font.cc
src/hb-font.cc
+28
-1
src/hb-font.h
src/hb-font.h
+7
-0
未找到文件。
src/hb-font-private.hh
浏览文件 @
e05a9994
...
...
@@ -100,6 +100,7 @@ struct hb_face_t {
unsigned
int
index
;
mutable
unsigned
int
upem
;
mutable
unsigned
int
num_glyphs
;
struct
hb_shaper_data_t
shaper_data
;
...
...
@@ -130,8 +131,16 @@ struct hb_face_t {
return
upem
;
}
inline
unsigned
int
get_num_glyphs
(
void
)
const
{
if
(
unlikely
(
num_glyphs
==
(
unsigned
int
)
-
1
))
load_num_glyphs
();
return
num_glyphs
;
}
private:
HB_INTERNAL
void
load_upem
(
void
)
const
;
HB_INTERNAL
void
load_num_glyphs
(
void
)
const
;
};
#define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS
...
...
src/hb-font.cc
浏览文件 @
e05a9994
...
...
@@ -34,6 +34,7 @@
#include "hb-blob.h"
#include "hb-open-file-private.hh"
#include "hb-ot-head-table.hh"
#include "hb-ot-maxp-table.hh"
#include "hb-cache-private.hh"
...
...
@@ -520,6 +521,7 @@ static const hb_face_t _hb_face_nil = {
0
,
/* index */
1000
,
/* upem */
0
,
/* num_glyphs */
{
#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID,
...
...
@@ -549,6 +551,7 @@ hb_face_create_for_tables (hb_reference_table_func_t reference_table_func,
face
->
destroy
=
destroy
;
face
->
upem
=
0
;
face
->
num_glyphs
=
(
unsigned
int
)
-
1
;
return
face
;
}
...
...
@@ -736,7 +739,6 @@ hb_face_get_upem (hb_face_t *face)
return
face
->
get_upem
();
}
void
hb_face_t
::
load_upem
(
void
)
const
{
...
...
@@ -746,6 +748,31 @@ hb_face_t::load_upem (void) const
hb_blob_destroy
(
head_blob
);
}
void
hb_face_set_glyph_count
(
hb_face_t
*
face
,
unsigned
int
glyph_count
)
{
if
(
hb_object_is_inert
(
face
))
return
;
face
->
num_glyphs
=
glyph_count
;
}
unsigned
int
hb_face_get_glyph_count
(
hb_face_t
*
face
)
{
return
face
->
get_num_glyphs
();
}
void
hb_face_t
::
load_num_glyphs
(
void
)
const
{
hb_blob_t
*
maxp_blob
=
OT
::
Sanitizer
<
OT
::
maxp
>::
sanitize
(
reference_table
(
HB_OT_TAG_maxp
));
const
OT
::
maxp
*
maxp_table
=
OT
::
Sanitizer
<
OT
::
maxp
>::
lock_instance
(
maxp_blob
);
num_glyphs
=
maxp_table
->
get_num_glyphs
();
hb_blob_destroy
(
maxp_blob
);
}
/*
* hb_font_t
...
...
src/hb-font.h
浏览文件 @
e05a9994
...
...
@@ -105,6 +105,13 @@ hb_face_set_upem (hb_face_t *face,
unsigned
int
hb_face_get_upem
(
hb_face_t
*
face
);
void
hb_face_set_glyph_count
(
hb_face_t
*
face
,
unsigned
int
glyph_count
);
unsigned
int
hb_face_get_glyph_count
(
hb_face_t
*
face
);
/*
* hb_font_funcs_t
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录