Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
c221dc0b
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看板
提交
c221dc0b
编写于
11月 14, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[ot-shape] Move code around
上级
7867c2ba
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
43 addition
and
29 deletion
+43
-29
src/hb-aat-layout-common.hh
src/hb-aat-layout-common.hh
+2
-2
src/hb-aat-layout.cc
src/hb-aat-layout.cc
+4
-4
src/hb-aat-layout.hh
src/hb-aat-layout.hh
+3
-3
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+1
-1
src/hb-ot-layout.hh
src/hb-ot-layout.hh
+1
-1
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+29
-15
src/hb-ot-shape.hh
src/hb-ot-shape.hh
+3
-3
未找到文件。
src/hb-aat-layout-common.hh
浏览文件 @
c221dc0b
...
@@ -801,7 +801,7 @@ struct hb_aat_apply_context_t :
...
@@ -801,7 +801,7 @@ struct hb_aat_apply_context_t :
static
return_t
default_return_value
(
void
)
{
return
false
;
}
static
return_t
default_return_value
(
void
)
{
return
false
;
}
bool
stop_sublookup_iteration
(
return_t
r
)
const
{
return
r
;
}
bool
stop_sublookup_iteration
(
return_t
r
)
const
{
return
r
;
}
hb_ot_shape_plan_t
*
plan
;
const
hb_ot_shape_plan_t
*
plan
;
hb_font_t
*
font
;
hb_font_t
*
font
;
hb_face_t
*
face
;
hb_face_t
*
face
;
hb_buffer_t
*
buffer
;
hb_buffer_t
*
buffer
;
...
@@ -813,7 +813,7 @@ struct hb_aat_apply_context_t :
...
@@ -813,7 +813,7 @@ struct hb_aat_apply_context_t :
unsigned
int
lookup_index
;
unsigned
int
lookup_index
;
unsigned
int
debug_depth
;
unsigned
int
debug_depth
;
HB_INTERNAL
hb_aat_apply_context_t
(
hb_ot_shape_plan_t
*
plan_
,
HB_INTERNAL
hb_aat_apply_context_t
(
const
hb_ot_shape_plan_t
*
plan_
,
hb_font_t
*
font_
,
hb_font_t
*
font_
,
hb_buffer_t
*
buffer_
,
hb_buffer_t
*
buffer_
,
hb_blob_t
*
blob
=
const_cast
<
hb_blob_t
*>
(
&
Null
(
hb_blob_t
)));
hb_blob_t
*
blob
=
const_cast
<
hb_blob_t
*>
(
&
Null
(
hb_blob_t
)));
...
...
src/hb-aat-layout.cc
浏览文件 @
c221dc0b
...
@@ -135,7 +135,7 @@ hb_aat_layout_find_feature_mapping (hb_tag_t tag)
...
@@ -135,7 +135,7 @@ hb_aat_layout_find_feature_mapping (hb_tag_t tag)
* hb_aat_apply_context_t
* hb_aat_apply_context_t
*/
*/
AAT
::
hb_aat_apply_context_t
::
hb_aat_apply_context_t
(
hb_ot_shape_plan_t
*
plan_
,
AAT
::
hb_aat_apply_context_t
::
hb_aat_apply_context_t
(
const
hb_ot_shape_plan_t
*
plan_
,
hb_font_t
*
font_
,
hb_font_t
*
font_
,
hb_buffer_t
*
buffer_
,
hb_buffer_t
*
buffer_
,
hb_blob_t
*
blob
)
:
hb_blob_t
*
blob
)
:
...
@@ -202,7 +202,7 @@ hb_aat_layout_has_substitution (hb_face_t *face)
...
@@ -202,7 +202,7 @@ hb_aat_layout_has_substitution (hb_face_t *face)
}
}
void
void
hb_aat_layout_substitute
(
hb_ot_shape_plan_t
*
plan
,
hb_aat_layout_substitute
(
const
hb_ot_shape_plan_t
*
plan
,
hb_font_t
*
font
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
hb_buffer_t
*
buffer
)
{
{
...
@@ -257,7 +257,7 @@ hb_aat_layout_has_positioning (hb_face_t *face)
...
@@ -257,7 +257,7 @@ hb_aat_layout_has_positioning (hb_face_t *face)
}
}
void
void
hb_aat_layout_position
(
hb_ot_shape_plan_t
*
plan
,
hb_aat_layout_position
(
const
hb_ot_shape_plan_t
*
plan
,
hb_font_t
*
font
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
hb_buffer_t
*
buffer
)
{
{
...
@@ -280,7 +280,7 @@ hb_aat_layout_has_tracking (hb_face_t *face)
...
@@ -280,7 +280,7 @@ hb_aat_layout_has_tracking (hb_face_t *face)
}
}
void
void
hb_aat_layout_track
(
hb_ot_shape_plan_t
*
plan
,
hb_aat_layout_track
(
const
hb_ot_shape_plan_t
*
plan
,
hb_font_t
*
font
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
hb_buffer_t
*
buffer
)
{
{
...
...
src/hb-aat-layout.hh
浏览文件 @
c221dc0b
...
@@ -60,7 +60,7 @@ HB_INTERNAL bool
...
@@ -60,7 +60,7 @@ HB_INTERNAL bool
hb_aat_layout_has_substitution
(
hb_face_t
*
face
);
hb_aat_layout_has_substitution
(
hb_face_t
*
face
);
HB_INTERNAL
void
HB_INTERNAL
void
hb_aat_layout_substitute
(
hb_ot_shape_plan_t
*
plan
,
hb_aat_layout_substitute
(
const
hb_ot_shape_plan_t
*
plan
,
hb_font_t
*
font
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
hb_buffer_t
*
buffer
);
...
@@ -74,7 +74,7 @@ HB_INTERNAL bool
...
@@ -74,7 +74,7 @@ HB_INTERNAL bool
hb_aat_layout_has_positioning
(
hb_face_t
*
face
);
hb_aat_layout_has_positioning
(
hb_face_t
*
face
);
HB_INTERNAL
void
HB_INTERNAL
void
hb_aat_layout_position
(
hb_ot_shape_plan_t
*
plan
,
hb_aat_layout_position
(
const
hb_ot_shape_plan_t
*
plan
,
hb_font_t
*
font
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
hb_buffer_t
*
buffer
);
...
@@ -82,7 +82,7 @@ HB_INTERNAL bool
...
@@ -82,7 +82,7 @@ HB_INTERNAL bool
hb_aat_layout_has_tracking
(
hb_face_t
*
face
);
hb_aat_layout_has_tracking
(
hb_face_t
*
face
);
HB_INTERNAL
void
HB_INTERNAL
void
hb_aat_layout_track
(
hb_ot_shape_plan_t
*
plan
,
hb_aat_layout_track
(
const
hb_ot_shape_plan_t
*
plan
,
hb_font_t
*
font
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
hb_buffer_t
*
buffer
);
...
...
src/hb-ot-layout.cc
浏览文件 @
c221dc0b
...
@@ -72,7 +72,7 @@ hb_ot_layout_has_cross_kerning (hb_face_t *face)
...
@@ -72,7 +72,7 @@ hb_ot_layout_has_cross_kerning (hb_face_t *face)
}
}
void
void
hb_ot_layout_kern
(
hb_ot_shape_plan_t
*
plan
,
hb_ot_layout_kern
(
const
hb_ot_shape_plan_t
*
plan
,
hb_font_t
*
font
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
hb_buffer_t
*
buffer
)
{
{
...
...
src/hb-ot-layout.hh
浏览文件 @
c221dc0b
...
@@ -52,7 +52,7 @@ HB_INTERNAL bool
...
@@ -52,7 +52,7 @@ HB_INTERNAL bool
hb_ot_layout_has_cross_kerning
(
hb_face_t
*
face
);
hb_ot_layout_has_cross_kerning
(
hb_face_t
*
face
);
HB_INTERNAL
void
HB_INTERNAL
void
hb_ot_layout_kern
(
hb_ot_shape_plan_t
*
plan
,
hb_ot_layout_kern
(
const
hb_ot_shape_plan_t
*
plan
,
hb_font_t
*
font
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
hb_buffer_t
*
buffer
);
...
...
src/hb-ot-shape.cc
浏览文件 @
c221dc0b
...
@@ -181,6 +181,33 @@ hb_ot_shape_plan_t::fini (void)
...
@@ -181,6 +181,33 @@ hb_ot_shape_plan_t::fini (void)
aat_map
.
fini
();
aat_map
.
fini
();
}
}
void
hb_ot_shape_plan_t
::
substitute
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
const
{
if
(
unlikely
(
apply_morx
))
hb_aat_layout_substitute
(
this
,
font
,
buffer
);
else
map
.
substitute
(
this
,
font
,
buffer
);
}
void
hb_ot_shape_plan_t
::
position
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
const
{
if
(
this
->
apply_gpos
)
map
.
position
(
this
,
font
,
buffer
);
else
if
(
this
->
apply_kerx
)
hb_aat_layout_position
(
this
,
font
,
buffer
);
else
if
(
this
->
apply_kern
)
hb_ot_layout_kern
(
this
,
font
,
buffer
);
else
_hb_ot_shape_fallback_kern
(
this
,
font
,
buffer
);
if
(
this
->
apply_trak
)
hb_aat_layout_track
(
this
,
font
,
buffer
);
}
static
const
hb_ot_map_feature_t
static
const
hb_ot_map_feature_t
common_features
[]
=
common_features
[]
=
...
@@ -687,10 +714,7 @@ hb_ot_substitute_complex (const hb_ot_shape_context_t *c)
...
@@ -687,10 +714,7 @@ hb_ot_substitute_complex (const hb_ot_shape_context_t *c)
if
(
c
->
plan
->
fallback_glyph_classes
)
if
(
c
->
plan
->
fallback_glyph_classes
)
hb_synthesize_glyph_classes
(
c
->
buffer
);
hb_synthesize_glyph_classes
(
c
->
buffer
);
if
(
unlikely
(
c
->
plan
->
apply_morx
))
c
->
plan
->
substitute
(
c
->
font
,
buffer
);
hb_aat_layout_substitute
(
c
->
plan
,
c
->
font
,
c
->
buffer
);
else
c
->
plan
->
substitute
(
c
->
font
,
buffer
);
}
}
static
inline
void
static
inline
void
...
@@ -825,17 +849,7 @@ hb_ot_position_complex (const hb_ot_shape_context_t *c)
...
@@ -825,17 +849,7 @@ hb_ot_position_complex (const hb_ot_shape_context_t *c)
break
;
break
;
}
}
if
(
c
->
plan
->
apply_gpos
)
c
->
plan
->
position
(
c
->
font
,
c
->
buffer
);
c
->
plan
->
position
(
c
->
font
,
c
->
buffer
);
else
if
(
c
->
plan
->
apply_kerx
)
hb_aat_layout_position
(
c
->
plan
,
c
->
font
,
c
->
buffer
);
else
if
(
c
->
plan
->
apply_kern
)
hb_ot_layout_kern
(
c
->
plan
,
c
->
font
,
c
->
buffer
);
else
_hb_ot_shape_fallback_kern
(
c
->
plan
,
c
->
font
,
c
->
buffer
);
if
(
c
->
plan
->
apply_trak
)
hb_aat_layout_track
(
c
->
plan
,
c
->
font
,
c
->
buffer
);
if
(
c
->
plan
->
zero_marks
)
if
(
c
->
plan
->
zero_marks
)
switch
(
c
->
plan
->
shaper
->
zero_width_marks
)
switch
(
c
->
plan
->
shaper
->
zero_width_marks
)
...
...
src/hb-ot-shape.hh
浏览文件 @
c221dc0b
...
@@ -84,7 +84,6 @@ struct hb_ot_shape_plan_t
...
@@ -84,7 +84,6 @@ struct hb_ot_shape_plan_t
bool
apply_morx
:
1
;
bool
apply_morx
:
1
;
bool
apply_trak
:
1
;
bool
apply_trak
:
1
;
inline
void
collect_lookups
(
hb_tag_t
table_tag
,
hb_set_t
*
lookups
)
const
inline
void
collect_lookups
(
hb_tag_t
table_tag
,
hb_set_t
*
lookups
)
const
{
{
unsigned
int
table_index
;
unsigned
int
table_index
;
...
@@ -95,12 +94,13 @@ struct hb_ot_shape_plan_t
...
@@ -95,12 +94,13 @@ struct hb_ot_shape_plan_t
}
}
map
.
collect_lookups
(
table_index
,
lookups
);
map
.
collect_lookups
(
table_index
,
lookups
);
}
}
inline
void
substitute
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
const
{
map
.
substitute
(
this
,
font
,
buffer
);
}
inline
void
position
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
const
{
map
.
position
(
this
,
font
,
buffer
);
}
HB_INTERNAL
bool
init0
(
hb_face_t
*
face
,
HB_INTERNAL
bool
init0
(
hb_face_t
*
face
,
const
hb_shape_plan_key_t
*
key
);
const
hb_shape_plan_key_t
*
key
);
HB_INTERNAL
void
fini
(
void
);
HB_INTERNAL
void
fini
(
void
);
HB_INTERNAL
void
substitute
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
const
;
HB_INTERNAL
void
position
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
const
;
};
};
struct
hb_shape_plan_t
;
struct
hb_shape_plan_t
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录