Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
2091b509
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看板
提交
2091b509
编写于
10月 10, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[kerx] Hook up to shaper
上级
8d00c39b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
32 addition
and
9 deletion
+32
-9
src/hb-aat-layout.cc
src/hb-aat-layout.cc
+24
-7
src/hb-aat-layout.hh
src/hb-aat-layout.hh
+3
-0
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+4
-2
src/hb-ot-shape.hh
src/hb-ot-shape.hh
+1
-0
未找到文件。
src/hb-aat-layout.cc
浏览文件 @
2091b509
...
...
@@ -54,6 +54,21 @@ _get_morx (hb_face_t *face, hb_blob_t **blob = nullptr)
*
blob
=
hb_ot_face_data
(
face
)
->
morx
.
get_blob
();
return
morx
;
}
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
);
}
const
AAT
::
kerx
&
kerx
=
*
(
hb_ot_face_data
(
face
)
->
kerx
.
get
());
if
(
blob
)
*
blob
=
hb_ot_face_data
(
face
)
->
kerx
.
get_blob
();
return
kerx
;
}
hb_bool_t
hb_aat_layout_has_substitution
(
hb_face_t
*
face
)
...
...
@@ -73,19 +88,21 @@ hb_aat_layout_substitute (hb_ot_shape_plan_t *plan,
morx
.
apply
(
&
c
);
}
hb_bool_t
hb_aat_layout_has_positioning
(
hb_face_t
*
face
)
{
return
_get_kerx
(
face
).
has_data
();
}
void
hb_aat_layout_position
(
hb_ot_shape_plan_t
*
plan
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
{
#if 0
hb_blob_t
*
blob
;
const AAT::ankr& ankr = _get_ankr (font->face, &blob);
const
AAT
::
kerx
&
kerx
=
_get_kerx
(
font
->
face
,
&
blob
);
const AAT::trak& trak = _get_trak (font->face, &blob);
AAT::hb_aat_apply_context_t c (font, buffer, blob);
kerx.apply (&c, &ankr);
trak.apply (&c);
#endif
AAT
::
hb_aat_apply_context_t
c
(
plan
,
font
,
buffer
,
blob
);
kerx
.
apply
(
&
c
);
}
src/hb-aat-layout.hh
浏览文件 @
2091b509
...
...
@@ -39,6 +39,9 @@ hb_aat_layout_substitute (hb_ot_shape_plan_t *plan,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
HB_INTERNAL
hb_bool_t
hb_aat_layout_has_positioning
(
hb_face_t
*
face
);
HB_INTERNAL
void
hb_aat_layout_position
(
hb_ot_shape_plan_t
*
plan
,
hb_font_t
*
font
,
...
...
src/hb-ot-shape.cc
浏览文件 @
2091b509
...
...
@@ -69,14 +69,16 @@ hb_ot_shape_planner_t::compile (hb_ot_shape_plan_t &plan,
bool
disable_gpos
=
plan
.
shaper
->
gpos_tag
&&
plan
.
shaper
->
gpos_tag
!=
plan
.
map
.
chosen_script
[
1
];
plan
.
apply_gpos
=
!
disable_gpos
&&
hb_ot_layout_has_positioning
(
face
);
plan
.
apply_kerx
=
!
plan
.
apply_gpos
&&
hb_aat_layout_has_positioning
(
face
);
hb_tag_t
kern_tag
=
HB_DIRECTION_IS_HORIZONTAL
(
plan
.
props
.
direction
)
?
HB_TAG
(
'k'
,
'e'
,
'r'
,
'n'
)
:
HB_TAG
(
'v'
,
'k'
,
'r'
,
'n'
);
plan
.
kern_mask
=
plan
.
map
.
get_mask
(
kern_tag
);
plan
.
kerning_requested
=
!!
plan
.
kern_mask
;
bool
has_gpos_kern
=
plan
.
map
.
get_feature_index
(
0
,
kern_tag
)
!=
HB_OT_LAYOUT_NO_FEATURE_INDEX
;
plan
.
apply_kern
=
!
has_gpos_kern
&&
hb_ot_layout_has_kerning
(
face
);
plan
.
fallback_kerning
=
!
has_gpos_kern
&&
!
plan
.
apply_kern
;
plan
.
apply_kern
=
!
has_gpos_kern
&&
!
plan
.
apply_kerx
&&
hb_ot_layout_has_kerning
(
face
);
plan
.
fallback_kerning
=
!
has_gpos_kern
&&
!
plan
.
apply_ker
x
&&
!
plan
.
apply_ker
n
;
plan
.
has_gpos_mark
=
!!
plan
.
map
.
get_1_mask
(
HB_TAG
(
'm'
,
'a'
,
'r'
,
'k'
));
plan
.
fallback_mark_positioning
=
!
plan
.
apply_gpos
;
...
...
src/hb-ot-shape.hh
浏览文件 @
2091b509
...
...
@@ -51,6 +51,7 @@ struct hb_ot_shape_plan_t
bool
fallback_mark_positioning
:
1
;
bool
apply_morx
:
1
;
bool
apply_kerx
:
1
;
bool
apply_kern
:
1
;
bool
apply_gpos
:
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录