Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
7185b273
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看板
提交
7185b273
编写于
5月 31, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename in_error to !successful
Towards possibly using Null pool for some nil objects.
上级
353f4d2e
变更
20
展开全部
隐藏空白更改
内联
并排
Showing
20 changed file
with
696 addition
and
694 deletion
+696
-694
src/hb-buffer-deserialize-json.hh
src/hb-buffer-deserialize-json.hh
+379
-379
src/hb-buffer-deserialize-json.rl
src/hb-buffer-deserialize-json.rl
+1
-1
src/hb-buffer-deserialize-text.hh
src/hb-buffer-deserialize-text.hh
+255
-255
src/hb-buffer-deserialize-text.rl
src/hb-buffer-deserialize-text.rl
+1
-1
src/hb-buffer-private.hh
src/hb-buffer-private.hh
+1
-1
src/hb-buffer.cc
src/hb-buffer.cc
+12
-12
src/hb-map-private.hh
src/hb-map-private.hh
+5
-5
src/hb-map.cc
src/hb-map.cc
+2
-2
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+2
-2
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+1
-1
src/hb-ot-shape-complex-hangul.cc
src/hb-ot-shape-complex-hangul.cc
+4
-4
src/hb-ot-shape-complex-indic.cc
src/hb-ot-shape-complex-indic.cc
+2
-2
src/hb-ot-shape-complex-khmer.cc
src/hb-ot-shape-complex-khmer.cc
+2
-2
src/hb-ot-shape-complex-myanmar.cc
src/hb-ot-shape-complex-myanmar.cc
+1
-1
src/hb-ot-shape-complex-thai.cc
src/hb-ot-shape-complex-thai.cc
+2
-2
src/hb-ot-shape-complex-use.cc
src/hb-ot-shape-complex-use.cc
+2
-2
src/hb-ot-shape-normalize.cc
src/hb-ot-shape-normalize.cc
+6
-6
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+1
-1
src/hb-set-private.hh
src/hb-set-private.hh
+15
-13
src/hb-set.cc
src/hb-set.cc
+2
-2
未找到文件。
src/hb-buffer-deserialize-json.hh
浏览文件 @
7185b273
此差异已折叠。
点击以展开。
src/hb-buffer-deserialize-json.rl
浏览文件 @
7185b273
...
...
@@ -42,7 +42,7 @@ action clear_item {
action add_item {
buffer->add_info (info);
if (
buffer->in_error
)
if (
unlikely (!buffer->successful)
)
return false;
buffer->pos[buffer->len - 1] = pos;
*end_ptr = p;
...
...
src/hb-buffer-deserialize-text.hh
浏览文件 @
7185b273
...
...
@@ -34,274 +34,274 @@
#line 36 "hb-buffer-deserialize-text.hh"
static
const
unsigned
char
_deserialize_text_trans_keys
[]
=
{
0u
,
0u
,
9u
,
122u
,
45u
,
57u
,
48u
,
57u
,
45u
,
57u
,
48u
,
57u
,
48u
,
57u
,
45u
,
57u
,
48u
,
57u
,
44u
,
44u
,
45u
,
57u
,
48u
,
57u
,
44u
,
57u
,
9u
,
124u
,
9u
,
124u
,
0u
,
0u
,
9u
,
122u
,
9u
,
124u
,
9u
,
124u
,
9u
,
124u
,
9u
,
124u
,
9u
,
124u
,
9u
,
124u
,
9u
,
124u
,
0u
,
0u
,
9u
,
122u
,
45u
,
57u
,
48u
,
57u
,
45u
,
57u
,
48u
,
57u
,
48u
,
57u
,
45u
,
57u
,
48u
,
57u
,
44u
,
44u
,
45u
,
57u
,
48u
,
57u
,
44u
,
57u
,
9u
,
124u
,
9u
,
124u
,
0u
,
0u
,
9u
,
122u
,
9u
,
124u
,
9u
,
124u
,
9u
,
124u
,
9u
,
124u
,
9u
,
124u
,
9u
,
124u
,
9u
,
124u
,
9u
,
124u
,
9u
,
124u
,
9u
,
124u
,
0
};
static
const
char
_deserialize_text_key_spans
[]
=
{
0
,
114
,
13
,
10
,
13
,
10
,
10
,
13
,
10
,
1
,
13
,
10
,
14
,
116
,
116
,
0
,
114
,
116
,
116
,
116
,
116
,
116
,
116
,
116
,
0
,
114
,
13
,
10
,
13
,
10
,
10
,
13
,
10
,
1
,
13
,
10
,
14
,
116
,
116
,
0
,
114
,
116
,
116
,
116
,
116
,
116
,
116
,
116
,
116
,
116
,
116
};
static
const
short
_deserialize_text_index_offsets
[]
=
{
0
,
0
,
115
,
129
,
140
,
154
,
165
,
176
,
190
,
201
,
203
,
217
,
228
,
243
,
360
,
477
,
478
,
593
,
710
,
827
,
944
,
1061
,
1178
,
1295
,
0
,
0
,
115
,
129
,
140
,
154
,
165
,
176
,
190
,
201
,
203
,
217
,
228
,
243
,
360
,
477
,
478
,
593
,
710
,
827
,
944
,
1061
,
1178
,
1295
,
1412
,
1529
,
1646
};
static
const
char
_deserialize_text_indicies
[]
=
{
0
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
2
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
1
,
1
,
1
,
1
,
1
,
1
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
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,
1
,
1
,
1
,
28
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
29
,
1
,
55
,
55
,
1
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
1
,
1
,
1
,
30
,
1
,
1
,
31
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
1
,
1
,
32
,
1
,
55
,
1
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
55
,
1
,
33
,
1
,
0
};
static
const
char
_deserialize_text_trans_targs
[]
=
{
1
,
0
,
13
,
17
,
26
,
3
,
18
,
21
,
18
,
21
,
5
,
19
,
20
,
19
,
20
,
22
,
25
,
8
,
9
,
12
,
9
,
12
,
10
,
11
,
23
,
24
,
23
,
24
,
14
,
2
,
6
,
7
,
15
,
16
,
14
,
15
,
16
,
17
,
14
,
4
,
15
,
16
,
14
,
15
,
16
,
14
,
2
,
7
,
1
,
0
,
13
,
17
,
26
,
3
,
18
,
21
,
18
,
21
,
5
,
19
,
20
,
19
,
20
,
22
,
25
,
8
,
9
,
12
,
9
,
12
,
10
,
11
,
23
,
24
,
23
,
24
,
14
,
2
,
6
,
7
,
15
,
16
,
14
,
15
,
16
,
17
,
14
,
4
,
15
,
16
,
14
,
15
,
16
,
14
,
2
,
7
,
15
,
16
,
14
,
2
,
15
,
16
,
25
,
26
};
static
const
char
_deserialize_text_trans_actions
[]
=
{
0
,
0
,
1
,
1
,
1
,
2
,
2
,
2
,
0
,
0
,
2
,
2
,
2
,
0
,
0
,
2
,
2
,
2
,
2
,
2
,
0
,
0
,
3
,
2
,
2
,
2
,
0
,
0
,
4
,
5
,
5
,
5
,
4
,
4
,
0
,
0
,
0
,
0
,
6
,
7
,
6
,
6
,
8
,
8
,
8
,
9
,
10
,
10
,
0
,
0
,
1
,
1
,
1
,
2
,
2
,
2
,
0
,
0
,
2
,
2
,
2
,
0
,
0
,
2
,
2
,
2
,
2
,
2
,
0
,
0
,
3
,
2
,
2
,
2
,
0
,
0
,
4
,
5
,
5
,
5
,
4
,
4
,
0
,
0
,
0
,
0
,
6
,
7
,
6
,
6
,
8
,
8
,
8
,
9
,
10
,
10
,
9
,
9
,
11
,
12
,
11
,
11
,
0
,
0
};
static
const
char
_deserialize_text_eof_actions
[]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4
,
0
,
0
,
0
,
4
,
6
,
8
,
8
,
6
,
9
,
11
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4
,
0
,
0
,
0
,
4
,
6
,
8
,
8
,
6
,
9
,
11
,
11
,
9
,
4
};
...
...
@@ -338,7 +338,7 @@ _hb_buffer_deserialize_glyphs_text (hb_buffer_t *buffer,
int
cs
;
hb_glyph_info_t
info
=
{
0
};
hb_glyph_position_t
pos
=
{
0
};
#line 343 "hb-buffer-deserialize-text.hh"
{
cs
=
deserialize_text_start
;
...
...
@@ -422,7 +422,7 @@ _resume:
#line 43 "hb-buffer-deserialize-text.rl"
{
buffer
->
add_info
(
info
);
if
(
buffer
->
in_error
)
if
(
unlikely
(
!
buffer
->
successful
)
)
return
false
;
buffer
->
pos
[
buffer
->
len
-
1
]
=
pos
;
*
end_ptr
=
p
;
...
...
@@ -434,7 +434,7 @@ _resume:
#line 43 "hb-buffer-deserialize-text.rl"
{
buffer
->
add_info
(
info
);
if
(
buffer
->
in_error
)
if
(
unlikely
(
!
buffer
->
successful
)
)
return
false
;
buffer
->
pos
[
buffer
->
len
-
1
]
=
pos
;
*
end_ptr
=
p
;
...
...
@@ -446,7 +446,7 @@ _resume:
#line 43 "hb-buffer-deserialize-text.rl"
{
buffer
->
add_info
(
info
);
if
(
buffer
->
in_error
)
if
(
unlikely
(
!
buffer
->
successful
)
)
return
false
;
buffer
->
pos
[
buffer
->
len
-
1
]
=
pos
;
*
end_ptr
=
p
;
...
...
@@ -458,7 +458,7 @@ _resume:
#line 43 "hb-buffer-deserialize-text.rl"
{
buffer
->
add_info
(
info
);
if
(
buffer
->
in_error
)
if
(
unlikely
(
!
buffer
->
successful
)
)
return
false
;
buffer
->
pos
[
buffer
->
len
-
1
]
=
pos
;
*
end_ptr
=
p
;
...
...
@@ -470,7 +470,7 @@ _resume:
#line 43 "hb-buffer-deserialize-text.rl"
{
buffer
->
add_info
(
info
);
if
(
buffer
->
in_error
)
if
(
unlikely
(
!
buffer
->
successful
)
)
return
false
;
buffer
->
pos
[
buffer
->
len
-
1
]
=
pos
;
*
end_ptr
=
p
;
...
...
@@ -499,7 +499,7 @@ _again:
#line 43 "hb-buffer-deserialize-text.rl"
{
buffer
->
add_info
(
info
);
if
(
buffer
->
in_error
)
if
(
unlikely
(
!
buffer
->
successful
)
)
return
false
;
buffer
->
pos
[
buffer
->
len
-
1
]
=
pos
;
*
end_ptr
=
p
;
...
...
@@ -511,7 +511,7 @@ _again:
#line 43 "hb-buffer-deserialize-text.rl"
{
buffer
->
add_info
(
info
);
if
(
buffer
->
in_error
)
if
(
unlikely
(
!
buffer
->
successful
)
)
return
false
;
buffer
->
pos
[
buffer
->
len
-
1
]
=
pos
;
*
end_ptr
=
p
;
...
...
@@ -523,7 +523,7 @@ _again:
#line 43 "hb-buffer-deserialize-text.rl"
{
buffer
->
add_info
(
info
);
if
(
buffer
->
in_error
)
if
(
unlikely
(
!
buffer
->
successful
)
)
return
false
;
buffer
->
pos
[
buffer
->
len
-
1
]
=
pos
;
*
end_ptr
=
p
;
...
...
@@ -535,7 +535,7 @@ _again:
#line 43 "hb-buffer-deserialize-text.rl"
{
buffer
->
add_info
(
info
);
if
(
buffer
->
in_error
)
if
(
unlikely
(
!
buffer
->
successful
)
)
return
false
;
buffer
->
pos
[
buffer
->
len
-
1
]
=
pos
;
*
end_ptr
=
p
;
...
...
@@ -547,7 +547,7 @@ _again:
#line 43 "hb-buffer-deserialize-text.rl"
{
buffer
->
add_info
(
info
);
if
(
buffer
->
in_error
)
if
(
unlikely
(
!
buffer
->
successful
)
)
return
false
;
buffer
->
pos
[
buffer
->
len
-
1
]
=
pos
;
*
end_ptr
=
p
;
...
...
src/hb-buffer-deserialize-text.rl
浏览文件 @
7185b273
...
...
@@ -42,7 +42,7 @@ action clear_item {
action add_item {
buffer->add_info (info);
if (
buffer->in_error
)
if (
unlikely (!buffer->successful)
)
return false;
buffer->pos[buffer->len - 1] = pos;
*end_ptr = p;
...
...
src/hb-buffer-private.hh
浏览文件 @
7185b273
...
...
@@ -101,7 +101,7 @@ struct hb_buffer_t {
hb_buffer_content_type_t
content_type
;
hb_segment_properties_t
props
;
/* Script, language, direction */
bool
in_error
;
/* Allocation failed
*/
bool
successful
;
/* Allocations successful
*/
bool
have_output
;
/* Whether we have an output buffer going on */
bool
have_positions
;
/* Whether we have positions */
...
...
src/hb-buffer.cc
浏览文件 @
7185b273
...
...
@@ -111,11 +111,11 @@ hb_segment_properties_hash (const hb_segment_properties_t *p)
bool
hb_buffer_t
::
enlarge
(
unsigned
int
size
)
{
if
(
unlikely
(
in_error
))
if
(
unlikely
(
!
successful
))
return
false
;
if
(
unlikely
(
size
>
max_len
))
{
in_error
=
tru
e
;
successful
=
fals
e
;
return
false
;
}
...
...
@@ -139,7 +139,7 @@ hb_buffer_t::enlarge (unsigned int size)
done:
if
(
unlikely
(
!
new_pos
||
!
new_info
))
in_error
=
tru
e
;
successful
=
fals
e
;
if
(
likely
(
new_pos
))
pos
=
new_pos
;
...
...
@@ -148,10 +148,10 @@ done:
info
=
new_info
;
out_info
=
separate_out
?
(
hb_glyph_info_t
*
)
pos
:
info
;
if
(
likely
(
!
in_error
))
if
(
likely
(
successful
))
allocated
=
new_allocated
;
return
likely
(
!
in_error
);
return
likely
(
successful
);
}
bool
...
...
@@ -234,7 +234,7 @@ hb_buffer_t::clear (void)
scratch_flags
=
HB_BUFFER_SCRATCH_FLAG_DEFAULT
;
content_type
=
HB_BUFFER_CONTENT_TYPE_INVALID
;
in_error
=
fals
e
;
successful
=
tru
e
;
have_output
=
false
;
have_positions
=
false
;
...
...
@@ -324,7 +324,7 @@ hb_buffer_t::clear_positions (void)
void
hb_buffer_t
::
swap_buffers
(
void
)
{
if
(
unlikely
(
in_error
))
return
;
if
(
unlikely
(
!
successful
))
return
;
assert
(
have_output
);
have_output
=
false
;
...
...
@@ -409,7 +409,7 @@ hb_buffer_t::move_to (unsigned int i)
idx
=
i
;
return
true
;
}
if
(
unlikely
(
in_error
))
if
(
unlikely
(
!
successful
))
return
false
;
assert
(
i
<=
out_len
+
(
len
-
idx
));
...
...
@@ -756,7 +756,7 @@ hb_buffer_get_empty (void)
HB_BUFFER_CONTENT_TYPE_INVALID
,
HB_SEGMENT_PROPERTIES_DEFAULT
,
true
,
/* in_error
*/
false
,
/* successful
*/
true
,
/* have_output */
true
/* have_positions */
...
...
@@ -1271,7 +1271,7 @@ hb_buffer_pre_allocate (hb_buffer_t *buffer, unsigned int size)
hb_bool_t
hb_buffer_allocation_successful
(
hb_buffer_t
*
buffer
)
{
return
!
buffer
->
in_error
;
return
buffer
->
successful
;
}
/**
...
...
@@ -1754,13 +1754,13 @@ hb_buffer_append (hb_buffer_t *buffer,
if
(
buffer
->
len
+
(
end
-
start
)
<
buffer
->
len
)
/* Overflows. */
{
buffer
->
in_error
=
tru
e
;
buffer
->
successful
=
fals
e
;
return
;
}
unsigned
int
orig_len
=
buffer
->
len
;
hb_buffer_set_length
(
buffer
,
buffer
->
len
+
(
end
-
start
));
if
(
buffer
->
in_error
)
if
(
unlikely
(
!
buffer
->
successful
)
)
return
;
memcpy
(
buffer
->
info
+
orig_len
,
source
->
info
+
start
,
(
end
-
start
)
*
sizeof
(
buffer
->
info
[
0
]));
...
...
src/hb-map-private.hh
浏览文件 @
7185b273
...
...
@@ -99,7 +99,7 @@ struct hb_map_t
hb_object_header_t
header
;
ASSERT_POD
();
bool
in_error
;
bool
successful
;
/* Allocations successful */
unsigned
int
population
;
/* Not including tombstones. */
unsigned
int
occupancy
;
/* Including tombstones. */
unsigned
int
mask
;
...
...
@@ -108,7 +108,7 @@ struct hb_map_t
inline
void
init_shallow
(
void
)
{
in_error
=
fals
e
;
successful
=
tru
e
;
population
=
occupancy
=
0
;
mask
=
0
;
prime
=
0
;
...
...
@@ -131,14 +131,14 @@ struct hb_map_t
inline
bool
resize
(
void
)
{
if
(
unlikely
(
in_error
))
return
false
;
if
(
unlikely
(
!
successful
))
return
false
;
unsigned
int
power
=
_hb_bit_storage
(
population
*
2
+
8
);
unsigned
int
new_size
=
1u
<<
power
;
item_t
*
new_items
=
(
item_t
*
)
malloc
((
size_t
)
new_size
*
sizeof
(
item_t
));
if
(
unlikely
(
!
new_items
))
{
in_error
=
tru
e
;
successful
=
fals
e
;
return
false
;
}
memset
(
new_items
,
0xFF
,
(
size_t
)
new_size
*
sizeof
(
item_t
));
...
...
@@ -165,7 +165,7 @@ struct hb_map_t
inline
void
set
(
hb_codepoint_t
key
,
hb_codepoint_t
value
)
{
if
(
unlikely
(
in_error
))
return
;
if
(
unlikely
(
!
successful
))
return
;
if
(
unlikely
(
key
==
INVALID
))
return
;
if
((
occupancy
+
occupancy
/
2
)
>=
mask
&&
!
resize
())
return
;
unsigned
int
i
=
bucket_for
(
key
);
...
...
src/hb-map.cc
浏览文件 @
7185b273
...
...
@@ -52,7 +52,7 @@ hb_map_create (void)
static
const
hb_map_t
_hb_map_nil
=
{
HB_OBJECT_HEADER_STATIC
,
true
,
/* in_error
*/
false
,
/* successful
*/
0
,
/* population */
0
,
/* occupancy */
0
,
/* mask */
...
...
@@ -155,7 +155,7 @@ hb_map_get_user_data (hb_map_t *map,
hb_bool_t
hb_map_allocation_successful
(
const
hb_map_t
*
map
)
{
return
!
map
->
in_error
;
return
map
->
successful
;
}
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
7185b273
...
...
@@ -855,7 +855,7 @@ static inline bool ligate_input (hb_ot_apply_context_t *c,
for
(
unsigned
int
i
=
1
;
i
<
count
;
i
++
)
{
while
(
buffer
->
idx
<
match_positions
[
i
]
&&
!
buffer
->
in_error
)
while
(
buffer
->
idx
<
match_positions
[
i
]
&&
buffer
->
successful
)
{
if
(
!
is_mark_ligature
)
{
unsigned
int
this_comp
=
_hb_glyph_info_get_lig_comp
(
&
buffer
->
cur
());
...
...
@@ -990,7 +990,7 @@ static inline bool apply_lookup (hb_ot_apply_context_t *c,
match_positions
[
j
]
+=
delta
;
}
for
(
unsigned
int
i
=
0
;
i
<
lookupCount
&&
!
buffer
->
in_error
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
lookupCount
&&
buffer
->
successful
;
i
++
)
{
unsigned
int
idx
=
lookupRecord
[
i
].
sequenceIndex
;
if
(
idx
>=
count
)
...
...
src/hb-ot-layout.cc
浏览文件 @
7185b273
...
...
@@ -1121,7 +1121,7 @@ apply_forward (OT::hb_ot_apply_context_t *c,
{
bool
ret
=
false
;
hb_buffer_t
*
buffer
=
c
->
buffer
;
while
(
buffer
->
idx
<
buffer
->
len
&&
!
buffer
->
in_error
)
while
(
buffer
->
idx
<
buffer
->
len
&&
buffer
->
successful
)
{
bool
applied
=
false
;
if
(
accel
.
may_have
(
buffer
->
cur
().
codepoint
)
&&
...
...
src/hb-ot-shape-complex-hangul.cc
浏览文件 @
7185b273
...
...
@@ -188,7 +188,7 @@ preprocess_text_hangul (const hb_ot_shape_plan_t *plan,
*/
unsigned
int
count
=
buffer
->
len
;
for
(
buffer
->
idx
=
0
;
buffer
->
idx
<
count
&&
!
buffer
->
in_error
;)
for
(
buffer
->
idx
=
0
;
buffer
->
idx
<
count
&&
buffer
->
successful
;)
{
hb_codepoint_t
u
=
buffer
->
cur
().
codepoint
;
...
...
@@ -269,7 +269,7 @@ preprocess_text_hangul (const hb_ot_shape_plan_t *plan,
if
(
font
->
has_glyph
(
s
))
{
buffer
->
replace_glyphs
(
t
?
3
:
2
,
1
,
&
s
);
if
(
unlikely
(
buffer
->
in_error
))
if
(
unlikely
(
!
buffer
->
successful
))
return
;
end
=
start
+
1
;
continue
;
...
...
@@ -319,7 +319,7 @@ preprocess_text_hangul (const hb_ot_shape_plan_t *plan,
if
(
font
->
has_glyph
(
new_s
))
{
buffer
->
replace_glyphs
(
2
,
1
,
&
new_s
);
if
(
unlikely
(
buffer
->
in_error
))
if
(
unlikely
(
!
buffer
->
successful
))
return
;
end
=
start
+
1
;
continue
;
...
...
@@ -345,7 +345,7 @@ preprocess_text_hangul (const hb_ot_shape_plan_t *plan,
{
unsigned
int
s_len
=
tindex
?
3
:
2
;
buffer
->
replace_glyphs
(
1
,
s_len
,
decomposed
);
if
(
unlikely
(
buffer
->
in_error
))
if
(
unlikely
(
!
buffer
->
successful
))
return
;
/* We decomposed S: apply jamo features to the individual glyphs
...
...
src/hb-ot-shape-complex-indic.cc
浏览文件 @
7185b273
...
...
@@ -974,7 +974,7 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
buffer
->
idx
=
0
;
unsigned
int
last_syllable
=
0
;
while
(
buffer
->
idx
<
buffer
->
len
&&
!
buffer
->
in_error
)
while
(
buffer
->
idx
<
buffer
->
len
&&
buffer
->
successful
)
{
unsigned
int
syllable
=
buffer
->
cur
().
syllable
();
syllable_type_t
syllable_type
=
(
syllable_type_t
)
(
syllable
&
0x0F
);
...
...
@@ -989,7 +989,7 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
/* TODO Set glyph_props? */
/* Insert dottedcircle after possible Repha. */
while
(
buffer
->
idx
<
buffer
->
len
&&
!
buffer
->
in_error
&&
while
(
buffer
->
idx
<
buffer
->
len
&&
buffer
->
successful
&&
last_syllable
==
buffer
->
cur
().
syllable
()
&&
buffer
->
cur
().
indic_category
()
==
OT_Repha
)
buffer
->
next_glyph
();
...
...
src/hb-ot-shape-complex-khmer.cc
浏览文件 @
7185b273
...
...
@@ -485,7 +485,7 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
buffer
->
idx
=
0
;
unsigned
int
last_syllable
=
0
;
while
(
buffer
->
idx
<
buffer
->
len
&&
!
buffer
->
in_error
)
while
(
buffer
->
idx
<
buffer
->
len
&&
buffer
->
successful
)
{
unsigned
int
syllable
=
buffer
->
cur
().
syllable
();
syllable_type_t
syllable_type
=
(
syllable_type_t
)
(
syllable
&
0x0F
);
...
...
@@ -500,7 +500,7 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
/* TODO Set glyph_props? */
/* Insert dottedcircle after possible Repha. */
while
(
buffer
->
idx
<
buffer
->
len
&&
!
buffer
->
in_error
&&
while
(
buffer
->
idx
<
buffer
->
len
&&
buffer
->
successful
&&
last_syllable
==
buffer
->
cur
().
syllable
()
&&
buffer
->
cur
().
khmer_category
()
==
OT_Repha
)
buffer
->
next_glyph
();
...
...
src/hb-ot-shape-complex-myanmar.cc
浏览文件 @
7185b273
...
...
@@ -312,7 +312,7 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
buffer
->
idx
=
0
;
unsigned
int
last_syllable
=
0
;
while
(
buffer
->
idx
<
buffer
->
len
&&
!
buffer
->
in_error
)
while
(
buffer
->
idx
<
buffer
->
len
&&
buffer
->
successful
)
{
unsigned
int
syllable
=
buffer
->
cur
().
syllable
();
syllable_type_t
syllable_type
=
(
syllable_type_t
)
(
syllable
&
0x0F
);
...
...
src/hb-ot-shape-complex-thai.cc
浏览文件 @
7185b273
...
...
@@ -315,7 +315,7 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan,
buffer
->
clear_output
();
unsigned
int
count
=
buffer
->
len
;
for
(
buffer
->
idx
=
0
;
buffer
->
idx
<
count
&&
!
buffer
->
in_error
;)
for
(
buffer
->
idx
=
0
;
buffer
->
idx
<
count
&&
buffer
->
successful
;)
{
hb_codepoint_t
u
=
buffer
->
cur
().
codepoint
;
if
(
likely
(
!
IS_SARA_AM
(
u
)))
{
...
...
@@ -327,7 +327,7 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan,
hb_codepoint_t
decomposed
[
2
]
=
{
hb_codepoint_t
(
NIKHAHIT_FROM_SARA_AM
(
u
)),
hb_codepoint_t
(
SARA_AA_FROM_SARA_AM
(
u
))};
buffer
->
replace_glyphs
(
1
,
2
,
decomposed
);
if
(
unlikely
(
buffer
->
in_error
))
if
(
unlikely
(
!
buffer
->
successful
))
return
;
/* Make Nikhahit be recognized as a ccc=0 mark when zeroing widths. */
...
...
src/hb-ot-shape-complex-use.cc
浏览文件 @
7185b273
...
...
@@ -511,7 +511,7 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
buffer
->
idx
=
0
;
unsigned
int
last_syllable
=
0
;
while
(
buffer
->
idx
<
buffer
->
len
&&
!
buffer
->
in_error
)
while
(
buffer
->
idx
<
buffer
->
len
&&
buffer
->
successful
)
{
unsigned
int
syllable
=
buffer
->
cur
().
syllable
();
syllable_type_t
syllable_type
=
(
syllable_type_t
)
(
syllable
&
0x0F
);
...
...
@@ -526,7 +526,7 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
/* TODO Set glyph_props? */
/* Insert dottedcircle after possible Repha. */
while
(
buffer
->
idx
<
buffer
->
len
&&
!
buffer
->
in_error
&&
while
(
buffer
->
idx
<
buffer
->
len
&&
buffer
->
successful
&&
last_syllable
==
buffer
->
cur
().
syllable
()
&&
buffer
->
cur
().
use_category
()
==
USE_R
)
buffer
->
next_glyph
();
...
...
src/hb-ot-shape-normalize.cc
浏览文件 @
7185b273
...
...
@@ -218,7 +218,7 @@ handle_variation_selector_cluster (const hb_ot_shape_normalize_context_t *c, uns
/* TODO Currently if there's a variation-selector we give-up, it's just too hard. */
hb_buffer_t
*
const
buffer
=
c
->
buffer
;
hb_font_t
*
const
font
=
c
->
font
;
for
(;
buffer
->
idx
<
end
-
1
&&
!
buffer
->
in_error
;)
{
for
(;
buffer
->
idx
<
end
-
1
&&
buffer
->
successful
;)
{
if
(
unlikely
(
buffer
->
unicode
->
is_variation_selector
(
buffer
->
cur
(
+
1
).
codepoint
)))
{
/* The next two lines are some ugly lines... But work. */
if
(
font
->
get_variation_glyph
(
buffer
->
cur
().
codepoint
,
buffer
->
cur
(
+
1
).
codepoint
,
&
buffer
->
cur
().
glyph_index
()))
...
...
@@ -254,13 +254,13 @@ static inline void
decompose_multi_char_cluster
(
const
hb_ot_shape_normalize_context_t
*
c
,
unsigned
int
end
,
bool
short_circuit
)
{
hb_buffer_t
*
const
buffer
=
c
->
buffer
;
for
(
unsigned
int
i
=
buffer
->
idx
;
i
<
end
&&
!
buffer
->
in_error
;
i
++
)
for
(
unsigned
int
i
=
buffer
->
idx
;
i
<
end
&&
buffer
->
successful
;
i
++
)
if
(
unlikely
(
buffer
->
unicode
->
is_variation_selector
(
buffer
->
info
[
i
].
codepoint
)))
{
handle_variation_selector_cluster
(
c
,
end
,
short_circuit
);
return
;
}
while
(
buffer
->
idx
<
end
&&
!
buffer
->
in_error
)
while
(
buffer
->
idx
<
end
&&
buffer
->
successful
)
decompose_current_character
(
c
,
short_circuit
);
}
...
...
@@ -320,7 +320,7 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
buffer
->
clear_output
();
count
=
buffer
->
len
;
for
(
buffer
->
idx
=
0
;
buffer
->
idx
<
count
&&
!
buffer
->
in_error
;)
for
(
buffer
->
idx
=
0
;
buffer
->
idx
<
count
&&
buffer
->
successful
;)
{
unsigned
int
end
;
for
(
end
=
buffer
->
idx
+
1
;
end
<
count
;
end
++
)
...
...
@@ -373,7 +373,7 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
count
=
buffer
->
len
;
unsigned
int
starter
=
0
;
buffer
->
next_glyph
();
while
(
buffer
->
idx
<
count
&&
!
buffer
->
in_error
)
while
(
buffer
->
idx
<
count
&&
buffer
->
successful
)
{
hb_codepoint_t
composed
,
glyph
;
if
(
/* We don't try to compose a non-mark character with it's preceding starter.
...
...
@@ -396,7 +396,7 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
{
/* Composes. */
buffer
->
next_glyph
();
/* Copy to out-buffer. */
if
(
unlikely
(
buffer
->
in_error
))
if
(
unlikely
(
!
buffer
->
successful
))
return
;
buffer
->
merge_out_clusters
(
starter
,
buffer
->
out_len
);
buffer
->
out_len
--
;
/* Remove the second composable. */
...
...
src/hb-ot-shape.cc
浏览文件 @
7185b273
...
...
@@ -268,7 +268,7 @@ hb_insert_dotted_circle (hb_buffer_t *buffer, hb_font_t *font)
info
.
cluster
=
buffer
->
cur
().
cluster
;
info
.
mask
=
buffer
->
cur
().
mask
;
buffer
->
output_info
(
info
);
while
(
buffer
->
idx
<
buffer
->
len
&&
!
buffer
->
in_error
)
while
(
buffer
->
idx
<
buffer
->
len
&&
buffer
->
successful
)
buffer
->
next_glyph
();
buffer
->
swap_buffers
();
...
...
src/hb-set-private.hh
浏览文件 @
7185b273
...
...
@@ -181,14 +181,14 @@ struct hb_set_t
hb_object_header_t
header
;
ASSERT_POD
();
bool
in_error
;
bool
successful
;
/* Allocations successful */
mutable
unsigned
int
population
;
hb_vector_t
<
page_map_t
,
8
>
page_map
;
hb_vector_t
<
page_t
,
1
>
pages
;
inline
void
init_shallow
(
void
)
{
in_error
=
fals
e
;
successful
=
tru
e
;
population
=
0
;
page_map
.
init
();
pages
.
init
();
...
...
@@ -211,11 +211,11 @@ struct hb_set_t
inline
bool
resize
(
unsigned
int
count
)
{
if
(
unlikely
(
in_error
))
return
false
;
if
(
unlikely
(
!
successful
))
return
false
;
if
(
!
pages
.
resize
(
count
)
||
!
page_map
.
resize
(
count
))
{
pages
.
resize
(
page_map
.
len
);
in_error
=
tru
e
;
successful
=
fals
e
;
return
false
;
}
return
true
;
...
...
@@ -224,7 +224,7 @@ struct hb_set_t
inline
void
clear
(
void
)
{
if
(
unlikely
(
hb_object_is_inert
(
this
)))
return
;
in_error
=
fals
e
;
successful
=
tru
e
;
population
=
0
;
page_map
.
resize
(
0
);
pages
.
resize
(
0
);
...
...
@@ -241,7 +241,7 @@ struct hb_set_t
inline
void
add
(
hb_codepoint_t
g
)
{
if
(
unlikely
(
in_error
))
return
;
if
(
unlikely
(
!
successful
))
return
;
if
(
unlikely
(
g
==
INVALID
))
return
;
dirty
();
page_t
*
page
=
page_for_insert
(
g
);
if
(
unlikely
(
!
page
))
return
;
...
...
@@ -249,7 +249,7 @@ struct hb_set_t
}
inline
bool
add_range
(
hb_codepoint_t
a
,
hb_codepoint_t
b
)
{
if
(
unlikely
(
in_error
))
return
true
;
/* https://github.com/harfbuzz/harfbuzz/issues/657 */
if
(
unlikely
(
!
successful
))
return
true
;
/* https://github.com/harfbuzz/harfbuzz/issues/657 */
if
(
unlikely
(
a
>
b
||
a
==
INVALID
||
b
==
INVALID
))
return
false
;
dirty
();
unsigned
int
ma
=
get_major
(
a
);
...
...
@@ -279,7 +279,7 @@ struct hb_set_t
template
<
typename
T
>
inline
void
add_array
(
const
T
*
array
,
unsigned
int
count
,
unsigned
int
stride
=
sizeof
(
T
))
{
if
(
unlikely
(
in_error
))
return
;
if
(
unlikely
(
!
successful
))
return
;
if
(
!
count
)
return
;
dirty
();
hb_codepoint_t
g
=
*
array
;
...
...
@@ -305,7 +305,7 @@ struct hb_set_t
template
<
typename
T
>
inline
bool
add_sorted_array
(
const
T
*
array
,
unsigned
int
count
,
unsigned
int
stride
=
sizeof
(
T
))
{
if
(
unlikely
(
in_error
))
return
true
;
/* https://github.com/harfbuzz/harfbuzz/issues/657 */
if
(
unlikely
(
!
successful
))
return
true
;
/* https://github.com/harfbuzz/harfbuzz/issues/657 */
if
(
!
count
)
return
true
;
dirty
();
hb_codepoint_t
g
=
*
array
;
...
...
@@ -333,7 +333,8 @@ struct hb_set_t
inline
void
del
(
hb_codepoint_t
g
)
{
if
(
unlikely
(
in_error
))
return
;
/* TODO perform op even if !successful. */
if
(
unlikely
(
!
successful
))
return
;
page_t
*
p
=
page_for
(
g
);
if
(
!
p
)
return
;
...
...
@@ -342,8 +343,9 @@ struct hb_set_t
}
inline
void
del_range
(
hb_codepoint_t
a
,
hb_codepoint_t
b
)
{
/* TODO perform op even if !successful. */
/* TODO Optimize, like add_range(). */
if
(
unlikely
(
in_error
))
return
;
if
(
unlikely
(
!
successful
))
return
;
for
(
unsigned
int
i
=
a
;
i
<
b
+
1
;
i
++
)
del
(
i
);
}
...
...
@@ -362,7 +364,7 @@ struct hb_set_t
}
inline
void
set
(
const
hb_set_t
*
other
)
{
if
(
unlikely
(
in_error
))
return
;
if
(
unlikely
(
!
successful
))
return
;
unsigned
int
count
=
other
->
pages
.
len
;
if
(
!
resize
(
count
))
return
;
...
...
@@ -401,7 +403,7 @@ struct hb_set_t
template
<
class
Op
>
inline
void
process
(
const
hb_set_t
*
other
)
{
if
(
unlikely
(
in_error
))
return
;
if
(
unlikely
(
!
successful
))
return
;
dirty
();
...
...
src/hb-set.cc
浏览文件 @
7185b273
...
...
@@ -52,7 +52,7 @@ hb_set_create (void)
static
const
hb_set_t
_hb_set_nil
=
{
HB_OBJECT_HEADER_STATIC
,
true
,
/* in_error
*/
false
,
/* successful
*/
0
,
/* population */
{
0
}
/* elts */
...
...
@@ -153,7 +153,7 @@ hb_set_get_user_data (hb_set_t *set,
hb_bool_t
hb_set_allocation_successful
(
const
hb_set_t
*
set
)
{
return
!
set
->
in_error
;
return
set
->
successful
;
}
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录