Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
ea278d38
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看板
提交
ea278d38
编写于
7月 27, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Partially switch ot shaper to shape_plan
上级
b6b7ba13
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
40 addition
and
19 deletion
+40
-19
src/hb-buffer-private.hh
src/hb-buffer-private.hh
+1
-0
src/hb-buffer.cc
src/hb-buffer.cc
+0
-1
src/hb-font-private.hh
src/hb-font-private.hh
+0
-2
src/hb-font.cc
src/hb-font.cc
+14
-8
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gpos-table.hh
+1
-1
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsub-table.hh
+2
-2
src/hb-ot-layout-private.hh
src/hb-ot-layout-private.hh
+1
-0
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+6
-3
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+2
-1
src/hb-shape-plan.cc
src/hb-shape-plan.cc
+11
-0
src/hb-shaper-private.hh
src/hb-shaper-private.hh
+2
-1
未找到文件。
src/hb-buffer-private.hh
浏览文件 @
ea278d38
...
...
@@ -46,6 +46,7 @@ typedef struct hb_segment_properties_t {
hb_language_t
language
;
ASSERT_POD
();
}
hb_segment_properties_t
;
#define _HB_BUFFER_PROPS_DEFAULT { HB_DIRECTION_INVALID, HB_SCRIPT_INVALID, HB_LANGUAGE_INVALID }
struct
hb_buffer_t
{
...
...
src/hb-buffer.cc
浏览文件 @
ea278d38
...
...
@@ -38,7 +38,6 @@
#endif
#define _HB_BUFFER_UNICODE_FUNCS_DEFAULT (const_cast<hb_unicode_funcs_t *> (&_hb_unicode_funcs_default))
#define _HB_BUFFER_PROPS_DEFAULT { HB_DIRECTION_INVALID, HB_SCRIPT_INVALID, HB_LANGUAGE_INVALID }
/* Here is how the buffer works internally:
*
...
...
src/hb-font-private.hh
浏览文件 @
ea278d38
...
...
@@ -97,8 +97,6 @@ struct hb_face_t {
void
*
user_data
;
hb_destroy_func_t
destroy
;
struct
hb_ot_layout_t
*
ot_layout
;
unsigned
int
index
;
unsigned
int
upem
;
...
...
src/hb-font.cc
浏览文件 @
ea278d38
...
...
@@ -589,10 +589,14 @@ static const hb_face_t _hb_face_nil = {
NULL
,
/* user_data */
NULL
,
/* destroy */
NULL
,
/* ot_layout */
0
,
/* index */
1000
/* upem */
1000
,
/* upem */
{
#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID,
#include "hb-shaper-list.hh"
#undef HB_SHAPER_IMPLEMENT
}
};
...
...
@@ -613,8 +617,6 @@ hb_face_create_for_tables (hb_reference_table_func_t reference_table,
face
->
user_data
=
user_data
;
face
->
destroy
=
destroy
;
face
->
ot_layout
=
_hb_ot_layout_create
(
face
);
face
->
upem
=
0
;
return
face
;
...
...
@@ -707,8 +709,6 @@ hb_face_destroy (hb_face_t *face)
{
if
(
!
hb_object_destroy
(
face
))
return
;
_hb_ot_layout_destroy
(
face
->
ot_layout
);
#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_DESTROY(shaper, face);
#include "hb-shaper-list.hh"
#undef HB_SHAPER_IMPLEMENT
...
...
@@ -877,7 +877,13 @@ hb_font_get_empty (void)
const_cast
<
hb_font_funcs_t
*>
(
&
_hb_font_funcs_nil
),
/* klass */
NULL
,
/* user_data */
NULL
/* destroy */
NULL
,
/* destroy */
{
#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID,
#include "hb-shaper-list.hh"
#undef HB_SHAPER_IMPLEMENT
}
};
return
const_cast
<
hb_font_t
*>
(
&
_hb_font_nil
);
...
...
src/hb-ot-layout-gpos-table.hh
浏览文件 @
ea278d38
...
...
@@ -1553,7 +1553,7 @@ inline bool ExtensionPos::sanitize (hb_sanitize_context_t *c)
static
inline
bool
position_lookup
(
hb_apply_context_t
*
c
,
unsigned
int
lookup_index
)
{
const
GPOS
&
gpos
=
*
(
c
->
face
->
ot_layout
->
gpos
);
const
GPOS
&
gpos
=
*
(
hb_ot_layout_from_face
(
c
->
face
)
->
gpos
);
const
PosLookup
&
l
=
gpos
.
get_lookup
(
lookup_index
);
if
(
unlikely
(
c
->
nesting_level_left
==
0
))
...
...
src/hb-ot-layout-gsub-table.hh
浏览文件 @
ea278d38
...
...
@@ -1241,7 +1241,7 @@ inline bool ExtensionSubst::is_reverse (void) const
static
inline
void
closure_lookup
(
hb_closure_context_t
*
c
,
unsigned
int
lookup_index
)
{
const
GSUB
&
gsub
=
*
(
c
->
face
->
ot_layout
->
gsub
);
const
GSUB
&
gsub
=
*
(
hb_ot_layout_from_face
(
c
->
face
)
->
gsub
);
const
SubstLookup
&
l
=
gsub
.
get_lookup
(
lookup_index
);
if
(
unlikely
(
c
->
nesting_level_left
==
0
))
...
...
@@ -1254,7 +1254,7 @@ static inline void closure_lookup (hb_closure_context_t *c, unsigned int lookup_
static
inline
bool
substitute_lookup
(
hb_apply_context_t
*
c
,
unsigned
int
lookup_index
)
{
const
GSUB
&
gsub
=
*
(
c
->
face
->
ot_layout
->
gsub
);
const
GSUB
&
gsub
=
*
(
hb_ot_layout_from_face
(
c
->
face
)
->
gsub
);
const
SubstLookup
&
l
=
gsub
.
get_lookup
(
lookup_index
);
if
(
unlikely
(
c
->
nesting_level_left
==
0
))
...
...
src/hb-ot-layout-private.hh
浏览文件 @
ea278d38
...
...
@@ -36,6 +36,7 @@
#include "hb-ot-shape-complex-private.hh"
#define hb_ot_layout_from_face(face) ((hb_ot_layout_t *) face->shaper_data.ot)
/*
* GDEF
...
...
src/hb-ot-layout.cc
浏览文件 @
ea278d38
...
...
@@ -70,17 +70,20 @@ _hb_ot_layout_destroy (hb_ot_layout_t *layout)
static
inline
const
GDEF
&
_get_gdef
(
hb_face_t
*
face
)
{
return
likely
(
face
->
ot_layout
&&
face
->
ot_layout
->
gdef
)
?
*
face
->
ot_layout
->
gdef
:
Null
(
GDEF
);
/* XXX ensure ot_layout, and speed up */
return
*
hb_ot_layout_from_face
(
face
)
->
gdef
;
}
static
inline
const
GSUB
&
_get_gsub
(
hb_face_t
*
face
)
{
return
likely
(
face
->
ot_layout
&&
face
->
ot_layout
->
gsub
)
?
*
face
->
ot_layout
->
gsub
:
Null
(
GSUB
);
/* XXX ensure ot_layout, and speed up */
return
*
hb_ot_layout_from_face
(
face
)
->
gsub
;
}
static
inline
const
GPOS
&
_get_gpos
(
hb_face_t
*
face
)
{
return
likely
(
face
->
ot_layout
&&
face
->
ot_layout
->
gpos
)
?
*
face
->
ot_layout
->
gpos
:
Null
(
GPOS
);
/* XXX ensure ot_layout, and speed up */
return
*
hb_ot_layout_from_face
(
face
)
->
gpos
;
}
...
...
src/hb-ot-shape.cc
浏览文件 @
ea278d38
...
...
@@ -44,12 +44,13 @@
hb_ot_shaper_face_data_t
*
_hb_ot_shaper_face_data_create
(
hb_face_t
*
face
)
{
return
(
hb_ot_shaper_face_data_t
*
)
HB_SHAPER_DATA_SUCCEEDED
;
return
_hb_ot_layout_create
(
face
)
;
}
void
_hb_ot_shaper_face_data_destroy
(
hb_ot_shaper_face_data_t
*
data
)
{
_hb_ot_layout_destroy
(
data
);
}
...
...
src/hb-shape-plan.cc
浏览文件 @
ea278d38
...
...
@@ -136,6 +136,17 @@ hb_shape_plan_get_empty (void)
{
static
const
hb_shape_plan_t
_hb_shape_plan_nil
=
{
HB_OBJECT_HEADER_STATIC
,
NULL
,
/* face */
_HB_BUFFER_PROPS_DEFAULT
,
/* props */
{
NULL
},
/* shapers */
{
#define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID,
#include "hb-shaper-list.hh"
#undef HB_SHAPER_IMPLEMENT
}
};
return
const_cast
<
hb_shape_plan_t
*>
(
&
_hb_shape_plan_nil
);
...
...
src/hb-shaper-private.hh
浏览文件 @
ea278d38
...
...
@@ -68,7 +68,8 @@ struct hb_shaper_data_t {
#define HB_SHAPER_DATA_IS_INVALID(data) ((void *) (data) == HB_SHAPER_DATA_INVALID)
#define HB_SHAPER_DATA_TYPE(shaper, object) struct hb_##shaper##_shaper_##object##_data_t
#define HB_SHAPER_DATA(shaper, object) (* (HB_SHAPER_DATA_TYPE(shaper, object) **) &(object)->shaper_data.shaper)
#define HB_SHAPER_DATA_INSTANCE(shaper, object, instance) (* (HB_SHAPER_DATA_TYPE(shaper, object) **) &(instance)->shaper_data.shaper)
#define HB_SHAPER_DATA(shaper, object) HB_SHAPER_DATA_INSTANCE (shaper, object, object)
#define HB_SHAPER_DATA_CREATE_FUNC(shaper, object) _hb_##shaper##_shaper_##object##_data_create
#define HB_SHAPER_DATA_DESTROY_FUNC(shaper, object) _hb_##shaper##_shaper_##object##_data_destroy
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录