Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
e7ffcfaf
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,发现更多精彩内容 >>
提交
e7ffcfaf
编写于
2月 14, 2013
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clean-up add_bool_feature
上级
e7562f53
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
28 addition
and
28 deletion
+28
-28
src/hb-ot-map-private.hh
src/hb-ot-map-private.hh
+2
-2
src/hb-ot-shape-complex-arabic.cc
src/hb-ot-shape-complex-arabic.cc
+8
-8
src/hb-ot-shape-complex-default.cc
src/hb-ot-shape-complex-default.cc
+1
-1
src/hb-ot-shape-complex-indic.cc
src/hb-ot-shape-complex-indic.cc
+4
-4
src/hb-ot-shape-complex-myanmar.cc
src/hb-ot-shape-complex-myanmar.cc
+4
-4
src/hb-ot-shape-complex-sea.cc
src/hb-ot-shape-complex-sea.cc
+4
-4
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+5
-5
未找到文件。
src/hb-ot-map-private.hh
浏览文件 @
e7ffcfaf
...
...
@@ -155,8 +155,8 @@ struct hb_ot_map_builder_t
HB_INTERNAL
void
add_feature
(
hb_tag_t
tag
,
unsigned
int
value
,
bool
global
,
bool
has_fallback
=
false
);
inline
void
add_
bool_feature
(
hb_tag_t
tag
,
bool
global
=
true
,
bool
has_fallback
=
false
)
{
add_feature
(
tag
,
1
,
global
,
has_fallback
);
}
inline
void
add_
global_bool_feature
(
hb_tag_t
tag
)
{
add_feature
(
tag
,
1
,
true
,
false
);
}
inline
void
add_gsub_pause
(
hb_ot_map_t
::
pause_func_t
pause_func
)
{
add_pause
(
0
,
pause_func
);
}
...
...
src/hb-ot-shape-complex-arabic.cc
浏览文件 @
e7ffcfaf
...
...
@@ -178,25 +178,25 @@ collect_features_arabic (hb_ot_shape_planner_t *plan)
* TODO: Add test cases for these two.
*/
map
->
add_bool_feature
(
HB_TAG
(
'c'
,
'c'
,
'm'
,
'p'
));
map
->
add_bool_feature
(
HB_TAG
(
'l'
,
'o'
,
'c'
,
'l'
));
map
->
add_
global_
bool_feature
(
HB_TAG
(
'c'
,
'c'
,
'm'
,
'p'
));
map
->
add_
global_
bool_feature
(
HB_TAG
(
'l'
,
'o'
,
'c'
,
'l'
));
map
->
add_gsub_pause
(
NULL
);
for
(
unsigned
int
i
=
0
;
i
<
ARABIC_NUM_FEATURES
;
i
++
)
map
->
add_
bool_feature
(
arabic_features
[
i
]
,
false
,
i
<
4
);
/* The first four features have fallback. */
map
->
add_
feature
(
arabic_features
[
i
],
1
,
false
,
i
<
4
);
/* The first four features have fallback. */
map
->
add_gsub_pause
(
NULL
);
map
->
add_
bool_feature
(
HB_TAG
(
'r'
,
'l'
,
'i'
,
'g'
)
,
true
,
true
);
map
->
add_
feature
(
HB_TAG
(
'r'
,
'l'
,
'i'
,
'g'
),
1
,
true
,
true
);
map
->
add_gsub_pause
(
arabic_fallback_shape
);
map
->
add_bool_feature
(
HB_TAG
(
'c'
,
'a'
,
'l'
,
't'
));
map
->
add_
global_
bool_feature
(
HB_TAG
(
'c'
,
'a'
,
'l'
,
't'
));
map
->
add_gsub_pause
(
NULL
);
map
->
add_bool_feature
(
HB_TAG
(
'c'
,
's'
,
'w'
,
'h'
));
map
->
add_bool_feature
(
HB_TAG
(
'd'
,
'l'
,
'i'
,
'g'
));
map
->
add_bool_feature
(
HB_TAG
(
'm'
,
's'
,
'e'
,
't'
));
map
->
add_
global_
bool_feature
(
HB_TAG
(
'c'
,
's'
,
'w'
,
'h'
));
map
->
add_
global_
bool_feature
(
HB_TAG
(
'd'
,
'l'
,
'i'
,
'g'
));
map
->
add_
global_
bool_feature
(
HB_TAG
(
'm'
,
's'
,
'e'
,
't'
));
}
#include "hb-ot-shape-complex-arabic-fallback.hh"
...
...
src/hb-ot-shape-complex-default.cc
浏览文件 @
e7ffcfaf
...
...
@@ -68,7 +68,7 @@ collect_features_default (hb_ot_shape_planner_t *plan)
}
for
(;
script_features
&&
*
script_features
;
script_features
++
)
plan
->
map
.
add_bool_feature
(
*
script_features
);
plan
->
map
.
add_
global_
bool_feature
(
*
script_features
);
}
static
hb_ot_shape_normalization_mode_t
...
...
src/hb-ot-shape-complex-indic.cc
浏览文件 @
e7ffcfaf
...
...
@@ -419,21 +419,21 @@ collect_features_indic (hb_ot_shape_planner_t *plan)
/* Do this before any lookups have been applied. */
map
->
add_gsub_pause
(
setup_syllables
);
map
->
add_bool_feature
(
HB_TAG
(
'l'
,
'o'
,
'c'
,
'l'
));
map
->
add_
global_
bool_feature
(
HB_TAG
(
'l'
,
'o'
,
'c'
,
'l'
));
/* The Indic specs do not require ccmp, but we apply it here since if
* there is a use of it, it's typically at the beginning. */
map
->
add_bool_feature
(
HB_TAG
(
'c'
,
'c'
,
'm'
,
'p'
));
map
->
add_
global_
bool_feature
(
HB_TAG
(
'c'
,
'c'
,
'm'
,
'p'
));
unsigned
int
i
=
0
;
map
->
add_gsub_pause
(
initial_reordering
);
for
(;
i
<
INDIC_BASIC_FEATURES
;
i
++
)
{
map
->
add_
bool_feature
(
indic_features
[
i
].
tag
,
indic_features
[
i
].
is_global
);
map
->
add_
feature
(
indic_features
[
i
].
tag
,
1
,
indic_features
[
i
].
is_global
);
map
->
add_gsub_pause
(
NULL
);
}
map
->
add_gsub_pause
(
final_reordering
);
for
(;
i
<
INDIC_NUM_FEATURES
;
i
++
)
{
map
->
add_
bool_feature
(
indic_features
[
i
].
tag
,
indic_features
[
i
].
is_global
);
map
->
add_
feature
(
indic_features
[
i
].
tag
,
1
,
indic_features
[
i
].
is_global
);
}
}
...
...
src/hb-ot-shape-complex-myanmar.cc
浏览文件 @
e7ffcfaf
...
...
@@ -98,21 +98,21 @@ collect_features_myanmar (hb_ot_shape_planner_t *plan)
/* Do this before any lookups have been applied. */
map
->
add_gsub_pause
(
setup_syllables
);
map
->
add_bool_feature
(
HB_TAG
(
'l'
,
'o'
,
'c'
,
'l'
));
map
->
add_
global_
bool_feature
(
HB_TAG
(
'l'
,
'o'
,
'c'
,
'l'
));
/* The Indic specs do not require ccmp, but we apply it here since if
* there is a use of it, it's typically at the beginning. */
map
->
add_bool_feature
(
HB_TAG
(
'c'
,
'c'
,
'm'
,
'p'
));
map
->
add_
global_
bool_feature
(
HB_TAG
(
'c'
,
'c'
,
'm'
,
'p'
));
unsigned
int
i
=
0
;
map
->
add_gsub_pause
(
initial_reordering
);
for
(;
i
<
MYANMAR_BASIC_FEATURES
;
i
++
)
{
map
->
add_bool_feature
(
myanmar_features
[
i
]);
map
->
add_
global_
bool_feature
(
myanmar_features
[
i
]);
map
->
add_gsub_pause
(
NULL
);
}
map
->
add_gsub_pause
(
final_reordering
);
for
(;
i
<
MYANMAR_NUM_FEATURES
;
i
++
)
{
map
->
add_bool_feature
(
myanmar_features
[
i
]);
map
->
add_
global_
bool_feature
(
myanmar_features
[
i
]);
}
}
...
...
src/hb-ot-shape-complex-sea.cc
浏览文件 @
e7ffcfaf
...
...
@@ -100,21 +100,21 @@ collect_features_sea (hb_ot_shape_planner_t *plan)
/* Do this before any lookups have been applied. */
map
->
add_gsub_pause
(
setup_syllables
);
map
->
add_bool_feature
(
HB_TAG
(
'l'
,
'o'
,
'c'
,
'l'
));
map
->
add_
global_
bool_feature
(
HB_TAG
(
'l'
,
'o'
,
'c'
,
'l'
));
/* The Indic specs do not require ccmp, but we apply it here since if
* there is a use of it, it's typically at the beginning. */
map
->
add_bool_feature
(
HB_TAG
(
'c'
,
'c'
,
'm'
,
'p'
));
map
->
add_
global_
bool_feature
(
HB_TAG
(
'c'
,
'c'
,
'm'
,
'p'
));
unsigned
int
i
=
0
;
map
->
add_gsub_pause
(
initial_reordering
);
for
(;
i
<
SEA_BASIC_FEATURES
;
i
++
)
{
map
->
add_bool_feature
(
sea_features
[
i
]);
map
->
add_
global_
bool_feature
(
sea_features
[
i
]);
map
->
add_gsub_pause
(
NULL
);
}
map
->
add_gsub_pause
(
final_reordering
);
for
(;
i
<
SEA_NUM_FEATURES
;
i
++
)
{
map
->
add_bool_feature
(
sea_features
[
i
]);
map
->
add_
global_
bool_feature
(
sea_features
[
i
]);
}
}
...
...
src/hb-ot-shape.cc
浏览文件 @
e7ffcfaf
...
...
@@ -83,12 +83,12 @@ hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner,
switch
(
props
->
direction
)
{
case
HB_DIRECTION_LTR
:
map
->
add_bool_feature
(
HB_TAG
(
'l'
,
't'
,
'r'
,
'a'
));
map
->
add_bool_feature
(
HB_TAG
(
'l'
,
't'
,
'r'
,
'm'
));
map
->
add_
global_
bool_feature
(
HB_TAG
(
'l'
,
't'
,
'r'
,
'a'
));
map
->
add_
global_
bool_feature
(
HB_TAG
(
'l'
,
't'
,
'r'
,
'm'
));
break
;
case
HB_DIRECTION_RTL
:
map
->
add_bool_feature
(
HB_TAG
(
'r'
,
't'
,
'l'
,
'a'
));
map
->
add_
bool_feature
(
HB_TAG
(
'r'
,
't'
,
'l'
,
'm'
)
,
false
);
map
->
add_
global_
bool_feature
(
HB_TAG
(
'r'
,
't'
,
'l'
,
'a'
));
map
->
add_
feature
(
HB_TAG
(
'r'
,
't'
,
'l'
,
'm'
),
1
,
false
);
break
;
case
HB_DIRECTION_TTB
:
case
HB_DIRECTION_BTT
:
...
...
@@ -100,7 +100,7 @@ hb_ot_shape_collect_features (hb_ot_shape_planner_t *planner,
#define ADD_FEATURES(array) \
HB_STMT_START { \
for (unsigned int i = 0; i < ARRAY_LENGTH (array); i++) \
map->add_bool_feature (array[i]); \
map->add_
global_
bool_feature (array[i]); \
} HB_STMT_END
if
(
planner
->
shaper
->
collect_features
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录