Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
db5d430e
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看板
提交
db5d430e
编写于
7月 17, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[aat] Update for blob changes
Also, uncomment code again, just "if (0)" it out, so it doesn't get stale again.
上级
68310a65
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
25 addition
and
69 deletion
+25
-69
src/hb-aat-layout.cc
src/hb-aat-layout.cc
+2
-56
src/hb-open-type-private.hh
src/hb-open-type-private.hh
+17
-10
src/hb-ot-layout-private.hh
src/hb-ot-layout-private.hh
+1
-0
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+2
-0
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+3
-3
未找到文件。
src/hb-aat-layout.cc
浏览文件 @
db5d430e
...
@@ -41,43 +41,9 @@
...
@@ -41,43 +41,9 @@
#include "hb-aat-ltag-table.hh" // Just so we compile it; unused otherwise.
#include "hb-aat-ltag-table.hh" // Just so we compile it; unused otherwise.
/*
/*
* morx/kerx/trak
* morx/kerx/trak
/ankr
*/
*/
#if 0
static inline const AAT::ankr&
_get_ankr (hb_face_t *face, hb_blob_t **blob = nullptr)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face)))
{
if (blob)
*blob = hb_blob_get_empty ();
return Null(AAT::ankr);
}
hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
const AAT::ankr& ankr = *(layout->ankr.get ());
if (blob)
*blob = layout->ankr.blob;
return ankr;
}
static inline const AAT::kerx&
_get_kerx (hb_face_t *face, hb_blob_t **blob = nullptr)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face)))
{
if (blob)
*blob = hb_blob_get_empty ();
return Null(AAT::kerx);
}
hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
/* XXX this doesn't call set_num_glyphs on sanitizer. */
const AAT::kerx& kerx = *(layout->kerx.get ());
if (blob)
*blob = layout->kerx.blob;
return kerx;
}
static
inline
const
AAT
::
morx
&
static
inline
const
AAT
::
morx
&
_get_morx
(
hb_face_t
*
face
,
hb_blob_t
**
blob
=
nullptr
)
_get_morx
(
hb_face_t
*
face
,
hb_blob_t
**
blob
=
nullptr
)
{
{
...
@@ -88,30 +54,12 @@ _get_morx (hb_face_t *face, hb_blob_t **blob = nullptr)
...
@@ -88,30 +54,12 @@ _get_morx (hb_face_t *face, hb_blob_t **blob = nullptr)
return
Null
(
AAT
::
morx
);
return
Null
(
AAT
::
morx
);
}
}
hb_ot_layout_t
*
layout
=
hb_ot_layout_from_face
(
face
);
hb_ot_layout_t
*
layout
=
hb_ot_layout_from_face
(
face
);
/* XXX this doesn't call set_num_glyphs on sanitizer. */
const
AAT
::
morx
&
morx
=
*
(
layout
->
morx
.
get
());
const
AAT
::
morx
&
morx
=
*
(
layout
->
morx
.
get
());
if
(
blob
)
if
(
blob
)
*blob = layout->morx.
blob
;
*
blob
=
layout
->
morx
.
get_blob
()
;
return
morx
;
return
morx
;
}
}
static inline const AAT::trak&
_get_trak (hb_face_t *face, hb_blob_t **blob = nullptr)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face)))
{
if (blob)
*blob = hb_blob_get_empty ();
return Null(AAT::trak);
}
hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
const AAT::trak& trak = *(layout->trak.get ());
if (blob)
*blob = layout->trak.blob;
return trak;
}
#endif
// static inline void
// static inline void
// _hb_aat_layout_create (hb_face_t *face)
// _hb_aat_layout_create (hb_face_t *face)
// {
// {
...
@@ -129,13 +77,11 @@ _get_trak (hb_face_t *face, hb_blob_t **blob = nullptr)
...
@@ -129,13 +77,11 @@ _get_trak (hb_face_t *face, hb_blob_t **blob = nullptr)
void
void
hb_aat_layout_substitute
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
hb_aat_layout_substitute
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
{
{
#if 0
hb_blob_t
*
blob
;
hb_blob_t
*
blob
;
const
AAT
::
morx
&
morx
=
_get_morx
(
font
->
face
,
&
blob
);
const
AAT
::
morx
&
morx
=
_get_morx
(
font
->
face
,
&
blob
);
AAT
::
hb_aat_apply_context_t
c
(
font
,
buffer
,
blob
);
AAT
::
hb_aat_apply_context_t
c
(
font
,
buffer
,
blob
);
morx
.
apply
(
&
c
);
morx
.
apply
(
&
c
);
#endif
}
}
void
void
...
...
src/hb-open-type-private.hh
浏览文件 @
db5d430e
...
@@ -290,9 +290,10 @@ struct hb_sanitize_context_t :
...
@@ -290,9 +290,10 @@ struct hb_sanitize_context_t :
template
<
typename
Type
>
template
<
typename
Type
>
struct
Sanitizer
struct
Sanitizer
{
{
inline
Sanitizer
(
void
)
{
}
inline
Sanitizer
(
unsigned
int
num_glyphs
=
0
)
{
c
->
num_glyphs
=
num_glyphs
;
}
inline
hb_blob_t
*
sanitize
(
hb_blob_t
*
blob
)
{
inline
hb_blob_t
*
sanitize
(
hb_blob_t
*
blob
)
{
bool
sane
;
bool
sane
;
/* TODO is_sane() stuff */
/* TODO is_sane() stuff */
...
@@ -1265,21 +1266,27 @@ struct hb_table_lazy_loader_t
...
@@ -1265,21 +1266,27 @@ struct hb_table_lazy_loader_t
hb_blob_destroy
(
blob
);
hb_blob_destroy
(
blob
);
}
}
inline
const
T
*
get
(
void
)
const
inline
hb_blob_t
*
get_blob
(
void
)
const
{
{
retry:
retry:
hb_blob_t
*
b
lob_
=
(
hb_blob_t
*
)
hb_atomic_ptr_get
(
&
blob
);
hb_blob_t
*
b
=
(
hb_blob_t
*
)
hb_atomic_ptr_get
(
&
blob
);
if
(
unlikely
(
!
b
lob_
))
if
(
unlikely
(
!
b
))
{
{
b
lob_
=
OT
::
Sanitizer
<
T
>
(
).
sanitize
(
face
->
reference_table
(
T
::
tableTag
));
b
=
OT
::
Sanitizer
<
T
>
(
face
->
get_num_glyphs
()
).
sanitize
(
face
->
reference_table
(
T
::
tableTag
));
if
(
!
hb_atomic_ptr_cmpexch
(
&
blob
,
nullptr
,
b
lob_
))
if
(
!
hb_atomic_ptr_cmpexch
(
&
blob
,
nullptr
,
b
))
{
{
hb_blob_destroy
(
b
lob_
);
hb_blob_destroy
(
b
);
goto
retry
;
goto
retry
;
}
}
blob
=
b
lob_
;
blob
=
b
;
}
}
return
blob_
->
as
<
T
>
();
return
b
;
}
inline
const
T
*
get
(
void
)
const
{
hb_blob_t
*
b
=
get_blob
();
return
b
->
as
<
T
>
();
}
}
inline
const
T
*
operator
->
(
void
)
const
inline
const
T
*
operator
->
(
void
)
const
...
...
src/hb-ot-layout-private.hh
浏览文件 @
db5d430e
...
@@ -176,6 +176,7 @@ struct hb_ot_layout_t
...
@@ -176,6 +176,7 @@ struct hb_ot_layout_t
OT
::
hb_table_lazy_loader_t
<
struct
OT
::
MATH
>
math
;
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
::
fvar
>
fvar
;
OT
::
hb_table_lazy_loader_t
<
struct
OT
::
avar
>
avar
;
OT
::
hb_table_lazy_loader_t
<
struct
OT
::
avar
>
avar
;
OT
::
hb_table_lazy_loader_t
<
struct
AAT
::
morx
>
morx
;
unsigned
int
gsub_lookup_count
;
unsigned
int
gsub_lookup_count
;
unsigned
int
gpos_lookup_count
;
unsigned
int
gpos_lookup_count
;
...
...
src/hb-ot-layout.cc
浏览文件 @
db5d430e
...
@@ -66,6 +66,7 @@ _hb_ot_layout_create (hb_face_t *face)
...
@@ -66,6 +66,7 @@ _hb_ot_layout_create (hb_face_t *face)
layout
->
math
.
init
(
face
);
layout
->
math
.
init
(
face
);
layout
->
fvar
.
init
(
face
);
layout
->
fvar
.
init
(
face
);
layout
->
avar
.
init
(
face
);
layout
->
avar
.
init
(
face
);
layout
->
morx
.
init
(
face
);
{
{
/*
/*
...
@@ -215,6 +216,7 @@ _hb_ot_layout_destroy (hb_ot_layout_t *layout)
...
@@ -215,6 +216,7 @@ _hb_ot_layout_destroy (hb_ot_layout_t *layout)
layout
->
math
.
fini
();
layout
->
math
.
fini
();
layout
->
fvar
.
fini
();
layout
->
fvar
.
fini
();
layout
->
avar
.
fini
();
layout
->
avar
.
fini
();
layout
->
morx
.
fini
();
free
(
layout
);
free
(
layout
);
}
}
...
...
src/hb-ot-shape.cc
浏览文件 @
db5d430e
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
#include "hb-set-private.hh"
#include "hb-set-private.hh"
#include "hb-ot-layout-gsubgpos-private.hh"
#include "hb-ot-layout-gsubgpos-private.hh"
//
#include "hb-aat-layout-private.hh"
#include "hb-aat-layout-private.hh"
static
hb_tag_t
common_features
[]
=
{
static
hb_tag_t
common_features
[]
=
{
HB_TAG
(
'c'
,
'c'
,
'm'
,
'p'
),
HB_TAG
(
'c'
,
'c'
,
'm'
,
'p'
),
...
@@ -623,8 +623,8 @@ hb_ot_substitute_complex (hb_ot_shape_context_t *c)
...
@@ -623,8 +623,8 @@ hb_ot_substitute_complex (hb_ot_shape_context_t *c)
c
->
plan
->
substitute
(
c
->
font
,
buffer
);
c
->
plan
->
substitute
(
c
->
font
,
buffer
);
/* XXX Call morx instead. */
if
(
0
)
/* XXX Call morx instead. */
//
hb_aat_layout_substitute (c->font, c->buffer);
hb_aat_layout_substitute
(
c
->
font
,
c
->
buffer
);
}
}
static
inline
void
static
inline
void
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录