Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
3e38c0f2
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看板
提交
3e38c0f2
编写于
8月 02, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More massaging
上级
16c6a27b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
27 addition
and
36 deletion
+27
-36
src/hb-ot-map-private.hh
src/hb-ot-map-private.hh
+8
-12
src/hb-ot-map.cc
src/hb-ot-map.cc
+8
-9
src/hb-ot-shape-complex-arabic.cc
src/hb-ot-shape-complex-arabic.cc
+4
-4
src/hb-ot-shape-complex-indic.cc
src/hb-ot-shape-complex-indic.cc
+7
-11
未找到文件。
src/hb-ot-map-private.hh
浏览文件 @
3e38c0f2
...
...
@@ -62,15 +62,11 @@ struct hb_ot_map_t
{
return
a
->
index
<
b
->
index
?
-
1
:
a
->
index
>
b
->
index
?
1
:
0
;
}
};
typedef
void
(
*
pause_func_t
)
(
const
hb_ot_map_t
*
map
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
,
void
*
user_data
);
typedef
struct
{
pause_func_t
func
;
void
*
user_data
;
}
pause_callback_t
;
typedef
void
(
*
pause_func_t
)
(
const
hb_ot_map_t
*
map
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
);
struct
pause_map_t
{
unsigned
int
num_lookups
;
/* Cumulative */
pause_
callback
_t
callback
;
pause_
func
_t
callback
;
};
...
...
@@ -156,10 +152,10 @@ struct hb_ot_map_builder_t
inline
void
add_bool_feature
(
hb_tag_t
tag
,
bool
global
=
true
)
{
add_feature
(
tag
,
1
,
global
);
}
inline
void
add_gsub_pause
(
hb_ot_map_t
::
pause_func_t
pause_func
,
void
*
user_data
)
{
add_pause
(
0
,
pause_func
,
user_data
);
}
inline
void
add_gpos_pause
(
hb_ot_map_t
::
pause_func_t
pause_func
,
void
*
user_data
)
{
add_pause
(
1
,
pause_func
,
user_data
);
}
inline
void
add_gsub_pause
(
hb_ot_map_t
::
pause_func_t
pause_func
)
{
add_pause
(
0
,
pause_func
);
}
inline
void
add_gpos_pause
(
hb_ot_map_t
::
pause_func_t
pause_func
)
{
add_pause
(
1
,
pause_func
);
}
HB_INTERNAL
void
compile
(
hb_face_t
*
face
,
const
hb_segment_properties_t
*
props
,
...
...
@@ -187,10 +183,10 @@ struct hb_ot_map_builder_t
struct
pause_info_t
{
unsigned
int
stage
;
hb_ot_map_t
::
pause_
callback
_t
callback
;
hb_ot_map_t
::
pause_
func
_t
callback
;
};
HB_INTERNAL
void
add_pause
(
unsigned
int
table_index
,
hb_ot_map_t
::
pause_func_t
pause_func
,
void
*
user_data
);
HB_INTERNAL
void
add_pause
(
unsigned
int
table_index
,
hb_ot_map_t
::
pause_func_t
pause_func
);
unsigned
int
current_stage
[
2
];
/* GSUB/GPOS */
hb_prealloced_array_t
<
feature_info_t
,
16
>
feature_infos
;
...
...
src/hb-ot-map.cc
浏览文件 @
3e38c0f2
...
...
@@ -87,8 +87,8 @@ void hb_ot_map_t::substitute (hb_font_t *font, hb_buffer_t *buffer) const
buffer
->
clear_output
();
if
(
pause
->
callback
.
func
)
pause
->
callback
.
func
(
this
,
font
,
buffer
,
pause
->
callback
.
user_data
);
if
(
pause
->
callback
)
pause
->
callback
(
this
,
font
,
buffer
);
}
for
(;
i
<
lookups
[
table_index
].
len
;
i
++
)
...
...
@@ -105,8 +105,8 @@ void hb_ot_map_t::position (hb_font_t *font, hb_buffer_t *buffer) const
for
(;
i
<
pause
->
num_lookups
;
i
++
)
hb_ot_layout_position_lookup
(
font
,
buffer
,
lookups
[
table_index
][
i
].
index
,
lookups
[
table_index
][
i
].
mask
);
if
(
pause
->
callback
.
func
)
pause
->
callback
.
func
(
this
,
font
,
buffer
,
pause
->
callback
.
user_data
);
if
(
pause
->
callback
)
pause
->
callback
(
this
,
font
,
buffer
);
}
for
(;
i
<
lookups
[
table_index
].
len
;
i
++
)
...
...
@@ -129,13 +129,12 @@ void hb_ot_map_t::substitute_closure (hb_face_t *face,
hb_ot_layout_substitute_closure_lookup
(
face
,
glyphs
,
lookups
[
table_index
][
i
].
index
);
}
void
hb_ot_map_builder_t
::
add_pause
(
unsigned
int
table_index
,
hb_ot_map_t
::
pause_func_t
pause_func
,
void
*
user_data
)
void
hb_ot_map_builder_t
::
add_pause
(
unsigned
int
table_index
,
hb_ot_map_t
::
pause_func_t
pause_func
)
{
pause_info_t
*
p
=
pauses
[
table_index
].
push
();
if
(
likely
(
p
))
{
p
->
stage
=
current_stage
[
table_index
];
p
->
callback
.
func
=
pause_func
;
p
->
callback
.
user_data
=
user_data
;
p
->
callback
=
pause_func
;
}
current_stage
[
table_index
]
++
;
...
...
@@ -249,8 +248,8 @@ hb_ot_map_builder_t::compile (hb_face_t *face,
feature_infos
.
shrink
(
0
);
/* Done with these */
add_gsub_pause
(
NULL
,
NULL
);
add_gpos_pause
(
NULL
,
NULL
);
add_gsub_pause
(
NULL
);
add_gpos_pause
(
NULL
);
for
(
unsigned
int
table_index
=
0
;
table_index
<
2
;
table_index
++
)
{
hb_tag_t
table_tag
=
table_tags
[
table_index
];
...
...
src/hb-ot-shape-complex-arabic.cc
浏览文件 @
3e38c0f2
...
...
@@ -182,19 +182,19 @@ collect_features_arabic (hb_ot_shape_planner_t *plan)
map
->
add_bool_feature
(
HB_TAG
(
'c'
,
'c'
,
'm'
,
'p'
));
map
->
add_bool_feature
(
HB_TAG
(
'l'
,
'o'
,
'c'
,
'l'
));
map
->
add_gsub_pause
(
NULL
,
NULL
);
map
->
add_gsub_pause
(
NULL
);
unsigned
int
num_features
=
plan
->
props
.
script
==
HB_SCRIPT_SYRIAC
?
SYRIAC_NUM_FEATURES
:
COMMON_NUM_FEATURES
;
for
(
unsigned
int
i
=
0
;
i
<
num_features
;
i
++
)
map
->
add_bool_feature
(
arabic_syriac_features
[
i
],
false
);
map
->
add_gsub_pause
(
NULL
,
NULL
);
map
->
add_gsub_pause
(
NULL
);
map
->
add_bool_feature
(
HB_TAG
(
'r'
,
'l'
,
'i'
,
'g'
));
map
->
add_gsub_pause
(
NULL
,
NULL
);
map
->
add_gsub_pause
(
NULL
);
map
->
add_bool_feature
(
HB_TAG
(
'c'
,
'a'
,
'l'
,
't'
));
map
->
add_gsub_pause
(
NULL
,
NULL
);
map
->
add_gsub_pause
(
NULL
);
/* ArabicOT spec enables 'cswh' for Arabic where as for basic shaper it's disabled by default. */
map
->
add_bool_feature
(
HB_TAG
(
'c'
,
's'
,
'w'
,
'h'
));
...
...
src/hb-ot-shape-complex-indic.cc
浏览文件 @
3e38c0f2
...
...
@@ -194,13 +194,11 @@ indic_other_features[] =
static
void
initial_reordering
(
const
hb_ot_map_t
*
map
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
,
void
*
user_data
HB_UNUSED
);
hb_buffer_t
*
buffer
);
static
void
final_reordering
(
const
hb_ot_map_t
*
map
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
,
void
*
user_data
HB_UNUSED
);
hb_buffer_t
*
buffer
);
static
void
collect_features_indic
(
hb_ot_shape_planner_t
*
plan
)
...
...
@@ -212,14 +210,14 @@ collect_features_indic (hb_ot_shape_planner_t *plan)
* there is a use of it, it's typically at the beginning. */
map
->
add_bool_feature
(
HB_TAG
(
'c'
,
'c'
,
'm'
,
'p'
));
map
->
add_gsub_pause
(
initial_reordering
,
NULL
);
map
->
add_gsub_pause
(
initial_reordering
);
for
(
unsigned
int
i
=
0
;
i
<
ARRAY_LENGTH
(
indic_basic_features
);
i
++
)
{
map
->
add_bool_feature
(
indic_basic_features
[
i
].
tag
,
indic_basic_features
[
i
].
is_global
);
map
->
add_gsub_pause
(
NULL
,
NULL
);
map
->
add_gsub_pause
(
NULL
);
}
map
->
add_gsub_pause
(
final_reordering
,
NULL
);
map
->
add_gsub_pause
(
final_reordering
);
for
(
unsigned
int
i
=
0
;
i
<
ARRAY_LENGTH
(
indic_other_features
);
i
++
)
map
->
add_bool_feature
(
indic_other_features
[
i
].
tag
,
indic_other_features
[
i
].
is_global
);
...
...
@@ -697,8 +695,7 @@ initial_reordering_non_indic (const hb_ot_map_t *map HB_UNUSED,
static
void
initial_reordering
(
const
hb_ot_map_t
*
map
,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
,
void
*
user_data
HB_UNUSED
)
hb_buffer_t
*
buffer
)
{
update_consonant_positions
(
map
,
buffer
,
font
);
...
...
@@ -1062,8 +1059,7 @@ final_reordering_syllable (hb_buffer_t *buffer,
static
void
final_reordering
(
const
hb_ot_map_t
*
map
,
hb_font_t
*
font
HB_UNUSED
,
hb_buffer_t
*
buffer
,
void
*
user_data
HB_UNUSED
)
hb_buffer_t
*
buffer
)
{
unsigned
int
count
=
buffer
->
len
;
if
(
!
count
)
return
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录