Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
7d92bef9
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7d92bef9
编写于
7月 30, 2018
作者:
G
Garret Rieger
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[subset] collect features first, then use those to collect lookups.
上级
af876cce
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
78 addition
and
77 deletion
+78
-77
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+71
-77
src/hb-ot-layout.h
src/hb-ot-layout.h
+7
-0
未找到文件。
src/hb-ot-layout.cc
浏览文件 @
7d92bef9
...
...
@@ -658,13 +658,12 @@ _hb_ot_layout_collect_lookups_lookups (hb_face_t *face,
}
static
void
_hb_ot_layout_collect_lookups_features
(
hb_face_t
*
face
,
hb_tag_t
table_tag
,
unsigned
int
script_index
,
unsigned
int
language_index
,
const
hb_tag_t
*
features
,
hb_set_t
*
visited_features
,
hb_set_t
*
lookup_indexes
/* OUT */
)
_hb_ot_layout_collect_features_features
(
hb_face_t
*
face
,
hb_tag_t
table_tag
,
unsigned
int
script_index
,
unsigned
int
language_index
,
const
hb_tag_t
*
features
,
hb_set_t
*
feature_indexes
/* OUT */
)
{
if
(
!
features
)
{
...
...
@@ -674,15 +673,8 @@ _hb_ot_layout_collect_lookups_features (hb_face_t *face,
script_index
,
language_index
,
&
required_feature_index
,
nullptr
)
&&
!
visited_features
->
has
(
required_feature_index
))
{
_hb_ot_layout_collect_lookups_lookups
(
face
,
table_tag
,
required_feature_index
,
lookup_indexes
);
visited_features
->
add
(
required_feature_index
);
}
nullptr
))
feature_indexes
->
add
(
required_feature_index
);
/* All features */
unsigned
int
feature_indices
[
32
];
...
...
@@ -699,14 +691,7 @@ _hb_ot_layout_collect_lookups_features (hb_face_t *face,
feature_indices
);
for
(
unsigned
int
i
=
0
;
i
<
len
;
i
++
)
{
if
(
visited_features
->
has
(
feature_indices
[
i
]))
continue
;
_hb_ot_layout_collect_lookups_lookups
(
face
,
table_tag
,
feature_indices
[
i
],
lookup_indexes
);
visited_features
->
add
(
feature_indices
[
i
]);
}
feature_indexes
->
add
(
feature_indices
[
i
]);
offset
+=
len
;
}
while
(
len
==
ARRAY_LENGTH
(
feature_indices
));
...
...
@@ -722,30 +707,25 @@ _hb_ot_layout_collect_lookups_features (hb_face_t *face,
language_index
,
*
features
,
&
feature_index
))
_hb_ot_layout_collect_lookups_lookups
(
face
,
table_tag
,
feature_index
,
lookup_indexes
);
feature_indexes
->
add
(
feature_index
);
}
}
}
static
void
_hb_ot_layout_collect_lookups_languages
(
hb_face_t
*
face
,
hb_tag_t
table_tag
,
unsigned
int
script_index
,
const
hb_tag_t
*
languages
,
const
hb_tag_t
*
features
,
hb_set_t
*
visited_features
,
hb_set_t
*
lookup_indexes
/* OUT */
)
_hb_ot_layout_collect_features_languages
(
hb_face_t
*
face
,
hb_tag_t
table_tag
,
unsigned
int
script_index
,
const
hb_tag_t
*
languages
,
const
hb_tag_t
*
features
,
hb_set_t
*
feature_indexes
/* OUT */
)
{
_hb_ot_layout_collect_lookups_features
(
face
,
table_tag
,
script_index
,
HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX
,
features
,
visited_features
,
lookup_indexes
);
_hb_ot_layout_collect_features_features
(
face
,
table_tag
,
script_index
,
HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX
,
features
,
feature_indexes
);
if
(
!
languages
)
{
...
...
@@ -755,13 +735,12 @@ _hb_ot_layout_collect_lookups_languages (hb_face_t *face,
script_index
,
0
,
nullptr
,
nullptr
);
for
(
unsigned
int
language_index
=
0
;
language_index
<
count
;
language_index
++
)
_hb_ot_layout_collect_lookups_features
(
face
,
table_tag
,
script_index
,
language_index
,
features
,
visited_features
,
lookup_indexes
);
_hb_ot_layout_collect_features_features
(
face
,
table_tag
,
script_index
,
language_index
,
features
,
feature_indexes
);
}
else
{
...
...
@@ -773,13 +752,12 @@ _hb_ot_layout_collect_lookups_languages (hb_face_t *face,
script_index
,
*
languages
,
&
language_index
))
_hb_ot_layout_collect_lookups_features
(
face
,
table_tag
,
script_index
,
language_index
,
features
,
visited_features
,
lookup_indexes
);
_hb_ot_layout_collect_features_features
(
face
,
table_tag
,
script_index
,
language_index
,
features
,
feature_indexes
);
}
}
}
...
...
@@ -790,14 +768,13 @@ _hb_ot_layout_collect_lookups_languages (hb_face_t *face,
* Since: 0.9.8
**/
void
hb_ot_layout_collect_
lookup
s
(
hb_face_t
*
face
,
hb_tag_t
table_tag
,
const
hb_tag_t
*
scripts
,
const
hb_tag_t
*
languages
,
const
hb_tag_t
*
features
,
hb_set_t
*
lookup
_indexes
/* OUT */
)
hb_ot_layout_collect_
feature
s
(
hb_face_t
*
face
,
hb_tag_t
table_tag
,
const
hb_tag_t
*
scripts
,
const
hb_tag_t
*
languages
,
const
hb_tag_t
*
features
,
hb_set_t
*
feature
_indexes
/* OUT */
)
{
hb_auto_t
<
hb_set_t
>
visited_features
;
if
(
!
scripts
)
{
/* All scripts */
...
...
@@ -805,13 +782,12 @@ hb_ot_layout_collect_lookups (hb_face_t *face,
table_tag
,
0
,
nullptr
,
nullptr
);
for
(
unsigned
int
script_index
=
0
;
script_index
<
count
;
script_index
++
)
_hb_ot_layout_collect_lookups_languages
(
face
,
table_tag
,
script_index
,
languages
,
features
,
&
visited_features
,
lookup_indexes
);
_hb_ot_layout_collect_features_languages
(
face
,
table_tag
,
script_index
,
languages
,
features
,
feature_indexes
);
}
else
{
...
...
@@ -822,17 +798,35 @@ hb_ot_layout_collect_lookups (hb_face_t *face,
table_tag
,
*
scripts
,
&
script_index
))
_hb_ot_layout_collect_lookups_languages
(
face
,
table_tag
,
script_index
,
languages
,
features
,
&
visited_features
,
lookup_indexes
);
_hb_ot_layout_collect_features_languages
(
face
,
table_tag
,
script_index
,
languages
,
features
,
feature_indexes
);
}
}
}
/**
* hb_ot_layout_collect_lookups:
*
* Since: 0.9.8
**/
void
hb_ot_layout_collect_lookups
(
hb_face_t
*
face
,
hb_tag_t
table_tag
,
const
hb_tag_t
*
scripts
,
const
hb_tag_t
*
languages
,
const
hb_tag_t
*
features
,
hb_set_t
*
lookup_indexes
/* OUT */
)
{
hb_auto_t
<
hb_set_t
>
feature_indexes
;
hb_ot_layout_collect_features
(
face
,
table_tag
,
scripts
,
languages
,
features
,
&
feature_indexes
);
for
(
hb_codepoint_t
feature_index
=
HB_SET_VALUE_INVALID
;
hb_set_next
(
&
feature_indexes
,
&
feature_index
);)
_hb_ot_layout_collect_lookups_lookups
(
face
,
table_tag
,
feature_index
,
lookup_indexes
);
}
/**
* hb_ot_layout_lookup_collect_glyphs:
*
...
...
src/hb-ot-layout.h
浏览文件 @
7d92bef9
...
...
@@ -194,6 +194,13 @@ HB_EXTERN unsigned int
hb_ot_layout_table_get_lookup_count
(
hb_face_t
*
face
,
hb_tag_t
table_tag
);
HB_EXTERN
void
hb_ot_layout_collect_features
(
hb_face_t
*
face
,
hb_tag_t
table_tag
,
const
hb_tag_t
*
scripts
,
const
hb_tag_t
*
languages
,
const
hb_tag_t
*
features
,
hb_set_t
*
feature_indexes
/* OUT */
);
HB_EXTERN
void
hb_ot_layout_collect_lookups
(
hb_face_t
*
face
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录