Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
ed7b2e58
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
11 个月 前同步成功
通知
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,体验更适合开发者的 AI 搜索 >>
提交
ed7b2e58
编写于
8月 01, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove OT namespace from hb-machinery-private.hh
上级
cb1491f9
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
40 addition
and
44 deletion
+40
-44
src/dump-emoji.cc
src/dump-emoji.cc
+2
-2
src/hb-aat-layout.cc
src/hb-aat-layout.cc
+1
-1
src/hb-face.cc
src/hb-face.cc
+2
-2
src/hb-machinery-private.hh
src/hb-machinery-private.hh
+5
-9
src/hb-ot-font.cc
src/hb-ot-font.cc
+4
-4
src/hb-ot-layout-private.hh
src/hb-ot-layout-private.hh
+5
-5
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+4
-4
src/hb-ot-shape-complex-arabic-fallback.hh
src/hb-ot-shape-complex-arabic-fallback.hh
+9
-9
src/hb-static.cc
src/hb-static.cc
+2
-2
src/hb-subset-glyf.cc
src/hb-subset-glyf.cc
+1
-1
src/hb-subset.cc
src/hb-subset.cc
+4
-4
src/hb-uniscribe.cc
src/hb-uniscribe.cc
+1
-1
未找到文件。
src/dump-emoji.cc
浏览文件 @
ed7b2e58
...
...
@@ -233,10 +233,10 @@ int main (int argc, char **argv)
svg
.
dump
(
svg_callback
);
svg
.
fini
();
hb_blob_t
*
colr_blob
=
OT
::
hb_sanitize_context_t
().
reference_table
<
OT
::
COLR
>
(
face
);
hb_blob_t
*
colr_blob
=
hb_sanitize_context_t
().
reference_table
<
OT
::
COLR
>
(
face
);
const
OT
::
COLR
*
colr
=
colr_blob
->
as
<
OT
::
COLR
>
();
hb_blob_t
*
cpal_blob
=
OT
::
hb_sanitize_context_t
().
reference_table
<
OT
::
CPAL
>
(
face
);
hb_blob_t
*
cpal_blob
=
hb_sanitize_context_t
().
reference_table
<
OT
::
CPAL
>
(
face
);
const
OT
::
CPAL
*
cpal
=
cpal_blob
->
as
<
OT
::
CPAL
>
();
cairo_font_face_t
*
cairo_face
;
...
...
src/hb-aat-layout.cc
浏览文件 @
ed7b2e58
...
...
@@ -61,7 +61,7 @@ _get_morx (hb_face_t *face, hb_blob_t **blob = nullptr)
// static inline void
// _hb_aat_layout_create (hb_face_t *face)
// {
// hb_blob_t *morx_blob =
OT::hb_sanitize_context_t
().reference_table<AAT::morx> (face);
// hb_blob_t *morx_blob =
hb_sanitize_context_t
().reference_table<AAT::morx> (face);
// morx_blob->as<AAT::morx> ();
// if (0)
...
...
src/hb-face.cc
浏览文件 @
ed7b2e58
...
...
@@ -52,7 +52,7 @@ hb_face_count (hb_blob_t *blob)
/* TODO We shouldn't be sanitizing blob. Port to run sanitizer and return if not sane. */
/* Make API signature const after. */
hb_blob_t
*
sanitized
=
OT
::
hb_sanitize_context_t
().
sanitize_blob
<
OT
::
OpenTypeFontFile
>
(
hb_blob_reference
(
blob
));
hb_blob_t
*
sanitized
=
hb_sanitize_context_t
().
sanitize_blob
<
OT
::
OpenTypeFontFile
>
(
hb_blob_reference
(
blob
));
const
OT
::
OpenTypeFontFile
&
ot
=
*
sanitized
->
as
<
OT
::
OpenTypeFontFile
>
();
unsigned
int
ret
=
ot
.
get_face_count
();
hb_blob_destroy
(
sanitized
);
...
...
@@ -190,7 +190,7 @@ hb_face_create (hb_blob_t *blob,
if
(
unlikely
(
!
blob
))
blob
=
hb_blob_get_empty
();
hb_face_for_data_closure_t
*
closure
=
_hb_face_for_data_closure_create
(
OT
::
hb_sanitize_context_t
().
sanitize_blob
<
OT
::
OpenTypeFontFile
>
(
hb_blob_reference
(
blob
)),
index
);
hb_face_for_data_closure_t
*
closure
=
_hb_face_for_data_closure_create
(
hb_sanitize_context_t
().
sanitize_blob
<
OT
::
OpenTypeFontFile
>
(
hb_blob_reference
(
blob
)),
index
);
if
(
unlikely
(
!
closure
))
return
hb_face_get_empty
();
...
...
src/hb-machinery-private.hh
浏览文件 @
ed7b2e58
...
...
@@ -35,9 +35,6 @@
#include "hb-iter-private.hh"
namespace
OT
{
/*
* Casts
*/
...
...
@@ -593,7 +590,8 @@ struct BEInt<Type, 4>
* Lazy struct and blob loaders.
*/
/* Logic is shared between hb_lazy_loader_t and hb_table_lazy_loader_t */
/* Logic is shared between hb_lazy_loader_t and hb_table_lazy_loader_t.
* I mean, yeah, only every method is different. */
template
<
typename
T
>
struct
hb_lazy_loader_t
{
...
...
@@ -643,7 +641,8 @@ struct hb_lazy_loader_t
mutable
T
*
instance
;
};
/* Logic is shared between hb_lazy_loader_t and hb_table_lazy_loader_t */
/* Logic is shared between hb_lazy_loader_t and hb_table_lazy_loader_t.
* I mean, yeah, only every method is different. */
template
<
typename
T
>
struct
hb_table_lazy_loader_t
{
...
...
@@ -664,7 +663,7 @@ struct hb_table_lazy_loader_t
hb_blob_t
*
b
=
(
hb_blob_t
*
)
hb_atomic_ptr_get
(
&
blob
);
if
(
unlikely
(
!
b
))
{
b
=
OT
::
hb_sanitize_context_t
().
reference_table
<
T
>
(
face
);
b
=
hb_sanitize_context_t
().
reference_table
<
T
>
(
face
);
if
(
!
hb_atomic_ptr_cmpexch
(
&
blob
,
nullptr
,
b
))
{
hb_blob_destroy
(
b
);
...
...
@@ -692,7 +691,4 @@ struct hb_table_lazy_loader_t
};
}
/* namespace OT */
#endif
/* HB_MACHINERY_PRIVATE_HH */
src/hb-ot-font.cc
浏览文件 @
ed7b2e58
...
...
@@ -44,10 +44,10 @@ struct hb_ot_font_t
OT
::
cmap
::
accelerator_t
cmap
;
OT
::
hmtx
::
accelerator_t
h_metrics
;
OT
::
vmtx
::
accelerator_t
v_metrics
;
OT
::
hb_lazy_loader_t
<
OT
::
glyf
::
accelerator_t
>
glyf
;
OT
::
hb_lazy_loader_t
<
OT
::
CBDT
::
accelerator_t
>
cbdt
;
OT
::
hb_lazy_loader_t
<
OT
::
post
::
accelerator_t
>
post
;
OT
::
hb_lazy_loader_t
<
OT
::
kern
::
accelerator_t
>
kern
;
hb_lazy_loader_t
<
OT
::
glyf
::
accelerator_t
>
glyf
;
hb_lazy_loader_t
<
OT
::
CBDT
::
accelerator_t
>
cbdt
;
hb_lazy_loader_t
<
OT
::
post
::
accelerator_t
>
post
;
hb_lazy_loader_t
<
OT
::
kern
::
accelerator_t
>
kern
;
};
...
...
src/hb-ot-layout-private.hh
浏览文件 @
ed7b2e58
...
...
@@ -172,11 +172,11 @@ struct hb_ot_layout_t
const
struct
OT
::
GPOS
*
gpos
;
/* TODO Move the following out of this struct. */
OT
::
hb_table_lazy_loader_t
<
struct
OT
::
BASE
>
base
;
OT
::
hb_table_lazy_loader_t
<
struct
OT
::
MATH
>
math
;
OT
::
hb_table_lazy_loader_t
<
struct
OT
::
fvar
>
fvar
;
OT
::
hb_table_lazy_loader_t
<
struct
OT
::
avar
>
avar
;
OT
::
hb_table_lazy_loader_t
<
struct
AAT
::
morx
>
morx
;
hb_table_lazy_loader_t
<
struct
OT
::
BASE
>
base
;
hb_table_lazy_loader_t
<
struct
OT
::
MATH
>
math
;
hb_table_lazy_loader_t
<
struct
OT
::
fvar
>
fvar
;
hb_table_lazy_loader_t
<
struct
OT
::
avar
>
avar
;
hb_table_lazy_loader_t
<
struct
AAT
::
morx
>
morx
;
unsigned
int
gsub_lookup_count
;
unsigned
int
gpos_lookup_count
;
...
...
src/hb-ot-layout.cc
浏览文件 @
ed7b2e58
...
...
@@ -54,13 +54,13 @@ _hb_ot_layout_create (hb_face_t *face)
if
(
unlikely
(
!
layout
))
return
nullptr
;
layout
->
gdef_blob
=
OT
::
hb_sanitize_context_t
().
reference_table
<
OT
::
GDEF
>
(
face
);
layout
->
gdef_blob
=
hb_sanitize_context_t
().
reference_table
<
OT
::
GDEF
>
(
face
);
layout
->
gdef
=
layout
->
gdef_blob
->
as
<
OT
::
GDEF
>
();
layout
->
gsub_blob
=
OT
::
hb_sanitize_context_t
().
reference_table
<
OT
::
GSUB
>
(
face
);
layout
->
gsub_blob
=
hb_sanitize_context_t
().
reference_table
<
OT
::
GSUB
>
(
face
);
layout
->
gsub
=
layout
->
gsub_blob
->
as
<
OT
::
GSUB
>
();
layout
->
gpos_blob
=
OT
::
hb_sanitize_context_t
().
reference_table
<
OT
::
GPOS
>
(
face
);
layout
->
gpos_blob
=
hb_sanitize_context_t
().
reference_table
<
OT
::
GPOS
>
(
face
);
layout
->
gpos
=
layout
->
gpos_blob
->
as
<
OT
::
GPOS
>
();
layout
->
math
.
init
(
face
);
...
...
@@ -1116,7 +1116,7 @@ struct GPOSProxy
struct
hb_get_subtables_context_t
:
OT
::
hb_dispatch_context_t
<
hb_get_subtables_context_t
,
hb_void_t
,
HB_DEBUG_APPLY
>
hb_dispatch_context_t
<
hb_get_subtables_context_t
,
hb_void_t
,
HB_DEBUG_APPLY
>
{
template
<
typename
Type
>
static
inline
bool
apply_to
(
const
void
*
obj
,
OT
::
hb_ot_apply_context_t
*
c
)
...
...
src/hb-ot-shape-complex-arabic-fallback.hh
浏览文件 @
ed7b2e58
...
...
@@ -79,12 +79,12 @@ arabic_fallback_synthesize_lookup_single (const hb_ot_shape_plan_t *plan HB_UNUS
* May not be good-enough for presidential candidate interviews, but good-enough for us... */
hb_stable_sort
(
&
glyphs
[
0
],
num_glyphs
,
(
int
(
*
)(
const
OT
::
GlyphID
*
,
const
OT
::
GlyphID
*
))
OT
::
GlyphID
::
cmp
,
&
substitutes
[
0
]);
OT
::
Supplier
<
OT
::
GlyphID
>
glyphs_supplier
(
glyphs
,
num_glyphs
);
OT
::
Supplier
<
OT
::
GlyphID
>
substitutes_supplier
(
substitutes
,
num_glyphs
);
Supplier
<
OT
::
GlyphID
>
glyphs_supplier
(
glyphs
,
num_glyphs
);
Supplier
<
OT
::
GlyphID
>
substitutes_supplier
(
substitutes
,
num_glyphs
);
/* Each glyph takes four bytes max, and there's some overhead. */
char
buf
[(
SHAPING_TABLE_LAST
-
SHAPING_TABLE_FIRST
+
1
)
*
4
+
128
];
OT
::
hb_serialize_context_t
c
(
buf
,
sizeof
(
buf
));
hb_serialize_context_t
c
(
buf
,
sizeof
(
buf
));
OT
::
SubstLookup
*
lookup
=
c
.
start_serialize
<
OT
::
SubstLookup
>
();
bool
ret
=
lookup
->
serialize_single
(
&
c
,
OT
::
LookupFlag
::
IgnoreMarks
,
...
...
@@ -155,15 +155,15 @@ arabic_fallback_synthesize_lookup_ligature (const hb_ot_shape_plan_t *plan HB_UN
if
(
!
num_ligatures
)
return
nullptr
;
OT
::
Supplier
<
OT
::
GlyphID
>
first_glyphs_supplier
(
first_glyphs
,
num_first_glyphs
);
OT
::
Supplier
<
unsigned
int
>
ligature_per_first_glyph_count_supplier
(
ligature_per_first_glyph_count_list
,
num_first_glyphs
);
OT
::
Supplier
<
OT
::
GlyphID
>
ligatures_supplier
(
ligature_list
,
num_ligatures
);
OT
::
Supplier
<
unsigned
int
>
component_count_supplier
(
component_count_list
,
num_ligatures
);
OT
::
Supplier
<
OT
::
GlyphID
>
component_supplier
(
component_list
,
num_ligatures
);
Supplier
<
OT
::
GlyphID
>
first_glyphs_supplier
(
first_glyphs
,
num_first_glyphs
);
Supplier
<
unsigned
int
>
ligature_per_first_glyph_count_supplier
(
ligature_per_first_glyph_count_list
,
num_first_glyphs
);
Supplier
<
OT
::
GlyphID
>
ligatures_supplier
(
ligature_list
,
num_ligatures
);
Supplier
<
unsigned
int
>
component_count_supplier
(
component_count_list
,
num_ligatures
);
Supplier
<
OT
::
GlyphID
>
component_supplier
(
component_list
,
num_ligatures
);
/* 16 bytes per ligature ought to be enough... */
char
buf
[
ARRAY_LENGTH_CONST
(
ligature_list
)
*
16
+
128
];
OT
::
hb_serialize_context_t
c
(
buf
,
sizeof
(
buf
));
hb_serialize_context_t
c
(
buf
,
sizeof
(
buf
));
OT
::
SubstLookup
*
lookup
=
c
.
start_serialize
<
OT
::
SubstLookup
>
();
bool
ret
=
lookup
->
serialize_ligature
(
&
c
,
OT
::
LookupFlag
::
IgnoreMarks
,
...
...
src/hb-static.cc
浏览文件 @
ed7b2e58
...
...
@@ -38,7 +38,7 @@ hb_vector_size_impl_t const _hb_NullPool[(HB_NULL_POOL_SIZE + sizeof (hb_vector_
void
hb_face_t
::
load_num_glyphs
(
void
)
const
{
OT
::
hb_sanitize_context_t
c
=
OT
::
hb_sanitize_context_t
();
hb_sanitize_context_t
c
=
hb_sanitize_context_t
();
c
.
set_num_glyphs
(
0
);
/* So we don't recurse ad infinitum. */
hb_blob_t
*
maxp_blob
=
c
.
reference_table
<
OT
::
maxp
>
(
this
);
const
OT
::
maxp
*
maxp_table
=
maxp_blob
->
as
<
OT
::
maxp
>
();
...
...
@@ -49,7 +49,7 @@ hb_face_t::load_num_glyphs (void) const
void
hb_face_t
::
load_upem
(
void
)
const
{
hb_blob_t
*
head_blob
=
OT
::
hb_sanitize_context_t
().
reference_table
<
OT
::
head
>
(
this
);
hb_blob_t
*
head_blob
=
hb_sanitize_context_t
().
reference_table
<
OT
::
head
>
(
this
);
const
OT
::
head
*
head_table
=
head_blob
->
as
<
OT
::
head
>
();
upem
=
head_table
->
get_upem
();
hb_blob_destroy
(
head_blob
);
...
...
src/hb-subset-glyf.cc
浏览文件 @
ed7b2e58
...
...
@@ -292,7 +292,7 @@ hb_subset_glyf_and_loca (hb_subset_plan_t *plan,
hb_blob_t
**
glyf_prime
,
/* OUT */
hb_blob_t
**
loca_prime
/* OUT */
)
{
hb_blob_t
*
glyf_blob
=
OT
::
hb_sanitize_context_t
().
reference_table
<
OT
::
glyf
>
(
plan
->
source
);
hb_blob_t
*
glyf_blob
=
hb_sanitize_context_t
().
reference_table
<
OT
::
glyf
>
(
plan
->
source
);
const
char
*
glyf_data
=
hb_blob_get_data
(
glyf_blob
,
nullptr
);
OT
::
glyf
::
accelerator_t
glyf
;
...
...
src/hb-subset.cc
浏览文件 @
ed7b2e58
...
...
@@ -78,7 +78,7 @@ template<typename TableType>
static
bool
_subset
(
hb_subset_plan_t
*
plan
)
{
hb_blob_t
*
source_blob
=
OT
::
hb_sanitize_context_t
().
reference_table
<
TableType
>
(
plan
->
source
);
hb_blob_t
*
source_blob
=
hb_sanitize_context_t
().
reference_table
<
TableType
>
(
plan
->
source
);
const
TableType
*
table
=
source_blob
->
as
<
TableType
>
();
hb_tag_t
tag
=
TableType
::
tableTag
;
...
...
@@ -157,14 +157,14 @@ _hb_subset_face_data_reference_blob (hb_subset_face_data_t *data)
if
(
unlikely
(
!
buf
))
return
nullptr
;
OT
::
hb_serialize_context_t
c
(
buf
,
face_length
);
hb_serialize_context_t
c
(
buf
,
face_length
);
OT
::
OpenTypeFontFile
*
f
=
c
.
start_serialize
<
OT
::
OpenTypeFontFile
>
();
bool
is_cff
=
data
->
tables
.
lsearch
(
HB_TAG
(
'C'
,
'F'
,
'F'
,
' '
))
||
data
->
tables
.
lsearch
(
HB_TAG
(
'C'
,
'F'
,
'F'
,
'2'
));
hb_tag_t
sfnt_tag
=
is_cff
?
OT
::
OpenTypeFontFile
::
CFFTag
:
OT
::
OpenTypeFontFile
::
TrueTypeTag
;
OT
::
Supplier
<
hb_tag_t
>
tags_supplier
(
&
data
->
tables
[
0
].
tag
,
table_count
,
sizeof
(
data
->
tables
[
0
]));
OT
::
Supplier
<
hb_blob_t
*>
blobs_supplier
(
&
data
->
tables
[
0
].
blob
,
table_count
,
sizeof
(
data
->
tables
[
0
]));
Supplier
<
hb_tag_t
>
tags_supplier
(
&
data
->
tables
[
0
].
tag
,
table_count
,
sizeof
(
data
->
tables
[
0
]));
Supplier
<
hb_blob_t
*>
blobs_supplier
(
&
data
->
tables
[
0
].
blob
,
table_count
,
sizeof
(
data
->
tables
[
0
]));
bool
ret
=
f
->
serialize_single
(
&
c
,
sfnt_tag
,
tags_supplier
,
...
...
src/hb-uniscribe.cc
浏览文件 @
ed7b2e58
...
...
@@ -358,7 +358,7 @@ _hb_rename_font (hb_blob_t *blob, wchar_t *new_name)
* full, PS. All of them point to the same name data with our unique name.
*/
blob
=
OT
::
hb_sanitize_context_t
().
sanitize_blob
<
OT
::
OpenTypeFontFile
>
(
blob
);
blob
=
hb_sanitize_context_t
().
sanitize_blob
<
OT
::
OpenTypeFontFile
>
(
blob
);
unsigned
int
length
,
new_length
,
name_str_len
;
const
char
*
orig_sfnt_data
=
hb_blob_get_data
(
blob
,
&
length
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录