Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
9af983af
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看板
提交
9af983af
编写于
11月 07, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[kern] Switch to dispatch
上级
bc06e280
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
19 deletion
+22
-19
src/hb-aat-layout-kerx-table.hh
src/hb-aat-layout-kerx-table.hh
+5
-2
src/hb-ot-kern-table.hh
src/hb-ot-kern-table.hh
+15
-13
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+2
-4
未找到文件。
src/hb-aat-layout-kerx-table.hh
浏览文件 @
9af983af
...
...
@@ -881,10 +881,11 @@ struct KerxTable
return
v
;
}
inline
void
apply
(
AAT
::
hb_aat_apply_context_t
*
c
)
const
inline
bool
apply
(
AAT
::
hb_aat_apply_context_t
*
c
)
const
{
typedef
typename
T
::
SubTable
SubTable
;
bool
ret
=
false
;
bool
seenCrossStream
=
false
;
c
->
set_lookup_index
(
0
);
const
SubTable
*
st
=
&
thiz
()
->
firstSubTable
;
...
...
@@ -927,7 +928,7 @@ struct KerxTable
c
->
sanitizer
.
set_object
(
*
st
);
st
->
dispatch
(
c
);
ret
|=
st
->
dispatch
(
c
);
if
(
reverse
)
c
->
buffer
->
reverse
();
...
...
@@ -938,6 +939,8 @@ struct KerxTable
st
=
&
StructAfter
<
SubTable
>
(
*
st
);
c
->
set_lookup_index
(
c
->
lookup_index
+
1
);
}
return
ret
;
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
...
...
src/hb-ot-kern-table.hh
浏览文件 @
9af983af
...
...
@@ -272,10 +272,11 @@ struct kern
static
const
hb_tag_t
tableTag
=
HB_OT_TAG_kern
;
inline
bool
has_data
(
void
)
const
{
return
u
.
version32
;
}
inline
unsigned
int
get_type
(
void
)
const
{
return
u
.
major
;
}
inline
bool
has_cross_stream
(
void
)
const
{
switch
(
u
.
major
)
{
switch
(
get_type
()
)
{
case
0
:
return
u
.
ot
.
has_cross_stream
();
case
1
:
return
u
.
aat
.
has_cross_stream
();
default:
return
false
;
...
...
@@ -284,20 +285,25 @@ struct kern
inline
int
get_h_kerning
(
hb_codepoint_t
left
,
hb_codepoint_t
right
)
const
{
switch
(
u
.
major
)
{
switch
(
get_type
()
)
{
case
0
:
return
u
.
ot
.
get_h_kerning
(
left
,
right
);
case
1
:
return
u
.
aat
.
get_h_kerning
(
left
,
right
);
default:
return
0
;
}
}
inline
void
apply
(
AAT
::
hb_aat_apply_context_t
*
c
)
const
inline
bool
apply
(
AAT
::
hb_aat_apply_context_t
*
c
)
const
{
return
dispatch
(
c
);
}
template
<
typename
context_t
>
inline
typename
context_t
::
return_t
dispatch
(
context_t
*
c
)
const
{
/* TODO Switch to dispatch(). */
switch
(
u
.
major
)
{
case
0
:
u
.
ot
.
apply
(
c
);
return
;
case
1
:
u
.
aat
.
apply
(
c
);
return
;
default:
return
;
unsigned
int
subtable_type
=
get_type
();
TRACE_DISPATCH
(
this
,
subtable_type
);
switch
(
subtable_type
)
{
case
0
:
return_trace
(
c
->
dispatch
(
u
.
ot
));
case
1
:
return_trace
(
c
->
dispatch
(
u
.
aat
));
default:
return_trace
(
c
->
default_return_value
());
}
}
...
...
@@ -305,11 +311,7 @@ struct kern
{
TRACE_SANITIZE
(
this
);
if
(
!
u
.
version32
.
sanitize
(
c
))
return_trace
(
false
);
switch
(
u
.
major
)
{
case
0
:
return_trace
(
u
.
ot
.
sanitize
(
c
));
case
1
:
return_trace
(
u
.
aat
.
sanitize
(
c
));
default:
return_trace
(
true
);
}
return_trace
(
dispatch
(
c
));
}
protected:
...
...
src/hb-ot-layout.cc
浏览文件 @
9af983af
...
...
@@ -1275,10 +1275,8 @@ apply_backward (OT::hb_ot_apply_context_t *c,
if
(
accel
.
may_have
(
buffer
->
cur
().
codepoint
)
&&
(
buffer
->
cur
().
mask
&
c
->
lookup_mask
)
&&
c
->
check_glyph_property
(
&
buffer
->
cur
(),
c
->
lookup_props
))
{
if
(
accel
.
apply
(
c
))
ret
=
true
;
}
ret
|=
accel
.
apply
(
c
);
/* The reverse lookup doesn't "advance" cursor (for good reason). */
buffer
->
idx
--
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录