Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
b693fd0d
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看板
提交
b693fd0d
编写于
11月 07, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[morx] Simplify
上级
ce3451dc
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
16 deletion
+11
-16
src/hb-aat-layout-morx-table.hh
src/hb-aat-layout-morx-table.hh
+11
-16
未找到文件。
src/hb-aat-layout-morx-table.hh
浏览文件 @
b693fd0d
...
@@ -384,12 +384,10 @@ struct LigatureEntry<true>
...
@@ -384,12 +384,10 @@ struct LigatureEntry<true>
DEFINE_SIZE_STATIC
(
2
);
DEFINE_SIZE_STATIC
(
2
);
};
};
template
<
typename
Flags
>
static
inline
bool
performAction
(
const
Entry
<
EntryData
>
*
entry
)
static
inline
bool
performAction
(
Flags
flags
)
{
return
entry
->
flags
&
PerformAction
;
}
{
return
flags
&
PerformAction
;
}
template
<
typename
Entry
,
typename
Flags
>
static
inline
unsigned
int
ligActionIndex
(
const
Entry
<
EntryData
>
*
entry
)
static
inline
unsigned
int
ligActionIndex
(
Entry
&
entry
,
Flags
flags
)
{
return
entry
->
data
.
ligActionIndex
;
}
{
return
entry
->
data
.
ligActionIndex
;
}
};
};
template
<
>
template
<
>
...
@@ -408,13 +406,11 @@ struct LigatureEntry<false>
...
@@ -408,13 +406,11 @@ struct LigatureEntry<false>
typedef
void
EntryData
;
typedef
void
EntryData
;
template
<
typename
Flags
>
static
inline
bool
performAction
(
const
Entry
<
EntryData
>
*
entry
)
static
inline
bool
performAction
(
Flags
flags
)
{
return
entry
->
flags
&
Offset
;
}
{
return
flags
&
Offset
;
}
template
<
typename
Entry
,
typename
Flags
>
static
inline
unsigned
int
ligActionIndex
(
const
Entry
<
EntryData
>
*
entry
)
static
inline
unsigned
int
ligActionIndex
(
Entry
&
entry
,
Flags
flags
)
{
return
entry
->
flags
&
0x3FFF
;
}
{
return
flags
&
0x3FFF
;
}
};
};
...
@@ -458,16 +454,15 @@ struct LigatureSubtable
...
@@ -458,16 +454,15 @@ struct LigatureSubtable
inline
bool
is_actionable
(
StateTableDriver
<
Types
,
EntryData
>
*
driver
HB_UNUSED
,
inline
bool
is_actionable
(
StateTableDriver
<
Types
,
EntryData
>
*
driver
HB_UNUSED
,
const
Entry
<
EntryData
>
*
entry
)
const
Entry
<
EntryData
>
*
entry
)
{
{
return
LigatureEntryT
::
performAction
(
entry
->
flags
);
return
LigatureEntryT
::
performAction
(
entry
);
}
}
inline
bool
transition
(
StateTableDriver
<
Types
,
EntryData
>
*
driver
,
inline
bool
transition
(
StateTableDriver
<
Types
,
EntryData
>
*
driver
,
const
Entry
<
EntryData
>
*
entry
)
const
Entry
<
EntryData
>
*
entry
)
{
{
hb_buffer_t
*
buffer
=
driver
->
buffer
;
hb_buffer_t
*
buffer
=
driver
->
buffer
;
unsigned
int
flags
=
entry
->
flags
;
DEBUG_MSG
(
APPLY
,
nullptr
,
"Ligature transition at %d"
,
buffer
->
idx
);
DEBUG_MSG
(
APPLY
,
nullptr
,
"Ligature transition at %d"
,
buffer
->
idx
);
if
(
flags
&
LigatureEntryT
::
SetComponent
)
if
(
entry
->
flags
&
LigatureEntryT
::
SetComponent
)
{
{
if
(
unlikely
(
match_length
>=
ARRAY_LENGTH
(
match_positions
)))
if
(
unlikely
(
match_length
>=
ARRAY_LENGTH
(
match_positions
)))
return
false
;
return
false
;
...
@@ -480,11 +475,11 @@ struct LigatureSubtable
...
@@ -480,11 +475,11 @@ struct LigatureSubtable
DEBUG_MSG
(
APPLY
,
nullptr
,
"Set component at %d"
,
buffer
->
out_len
);
DEBUG_MSG
(
APPLY
,
nullptr
,
"Set component at %d"
,
buffer
->
out_len
);
}
}
if
(
LigatureEntryT
::
performAction
(
flags
))
if
(
LigatureEntryT
::
performAction
(
entry
))
{
{
DEBUG_MSG
(
APPLY
,
nullptr
,
"Perform action with %d"
,
match_length
);
DEBUG_MSG
(
APPLY
,
nullptr
,
"Perform action with %d"
,
match_length
);
unsigned
int
end
=
buffer
->
out_len
;
unsigned
int
end
=
buffer
->
out_len
;
unsigned
int
action_idx
=
LigatureEntryT
::
ligActionIndex
(
entry
,
flags
);
unsigned
int
action_idx
=
LigatureEntryT
::
ligActionIndex
(
entry
);
unsigned
int
action
;
unsigned
int
action
;
unsigned
int
ligature_idx
=
0
;
unsigned
int
ligature_idx
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录