Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
5ba45040
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
5ba45040
编写于
11月 02, 2015
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make max context-length and max nesting level configurable
...at compile time.
上级
67f8821f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
20 addition
and
14 deletion
+20
-14
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-common-private.hh
+8
-2
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsub-table.hh
+2
-2
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+10
-10
未找到文件。
src/hb-ot-layout-common-private.hh
浏览文件 @
5ba45040
...
...
@@ -34,6 +34,14 @@
#include "hb-set-private.hh"
#ifndef HB_MAX_NESTING_LEVEL
#define HB_MAX_NESTING_LEVEL 6
#endif
#ifndef HB_MAX_CONTEXT_LENGTH
#define HB_MAX_CONTEXT_LENGTH 64
#endif
namespace
OT
{
...
...
@@ -44,8 +52,6 @@ namespace OT {
#define NOT_COVERED ((unsigned int) -1)
#define MAX_NESTING_LEVEL 6
#define MAX_CONTEXT_LENGTH 64
...
...
src/hb-ot-layout-gsub-table.hh
浏览文件 @
5ba45040
...
...
@@ -630,7 +630,7 @@ struct Ligature
unsigned
int
total_component_count
=
0
;
unsigned
int
match_length
=
0
;
unsigned
int
match_positions
[
MAX_CONTEXT_LENGTH
];
unsigned
int
match_positions
[
HB_
MAX_CONTEXT_LENGTH
];
if
(
likely
(
!
match_input
(
c
,
count
,
&
component
[
1
],
...
...
@@ -970,7 +970,7 @@ struct ReverseChainSingleSubstFormat1
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
if
(
unlikely
(
c
->
nesting_level_left
!=
MAX_NESTING_LEVEL
))
if
(
unlikely
(
c
->
nesting_level_left
!=
HB_
MAX_NESTING_LEVEL
))
return_trace
(
false
);
/* No chaining to this type */
unsigned
int
index
=
(
this
+
coverage
).
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
5ba45040
...
...
@@ -74,7 +74,7 @@ struct hb_closure_context_t :
hb_closure_context_t
(
hb_face_t
*
face_
,
hb_set_t
*
glyphs_
,
unsigned
int
nesting_level_left_
=
MAX_NESTING_LEVEL
)
:
unsigned
int
nesting_level_left_
=
HB_
MAX_NESTING_LEVEL
)
:
face
(
face_
),
glyphs
(
glyphs_
),
recurse_func
(
NULL
),
...
...
@@ -196,7 +196,7 @@ struct hb_collect_glyphs_context_t :
hb_set_t
*
glyphs_input
,
/* OUT. May be NULL */
hb_set_t
*
glyphs_after
,
/* OUT. May be NULL */
hb_set_t
*
glyphs_output
,
/* OUT. May be NULL */
unsigned
int
nesting_level_left_
=
MAX_NESTING_LEVEL
)
:
unsigned
int
nesting_level_left_
=
HB_
MAX_NESTING_LEVEL
)
:
face
(
face_
),
before
(
glyphs_before
?
glyphs_before
:
hb_set_get_empty
()),
input
(
glyphs_input
?
glyphs_input
:
hb_set_get_empty
()),
...
...
@@ -483,7 +483,7 @@ struct hb_apply_context_t :
lookup_mask
(
1
),
auto_zwj
(
true
),
recurse_func
(
NULL
),
nesting_level_left
(
MAX_NESTING_LEVEL
),
nesting_level_left
(
HB_
MAX_NESTING_LEVEL
),
lookup_props
(
0
),
gdef
(
*
hb_ot_layout_from_face
(
face
)
->
gdef
),
has_glyph_classes
(
gdef
.
has_glyph_classes
()),
...
...
@@ -704,13 +704,13 @@ static inline bool match_input (hb_apply_context_t *c,
match_func_t
match_func
,
const
void
*
match_data
,
unsigned
int
*
end_offset
,
unsigned
int
match_positions
[
MAX_CONTEXT_LENGTH
],
unsigned
int
match_positions
[
HB_
MAX_CONTEXT_LENGTH
],
bool
*
p_is_mark_ligature
=
NULL
,
unsigned
int
*
p_total_component_count
=
NULL
)
{
TRACE_APPLY
(
NULL
);
if
(
unlikely
(
count
>
MAX_CONTEXT_LENGTH
))
return_trace
(
false
);
if
(
unlikely
(
count
>
HB_
MAX_CONTEXT_LENGTH
))
return_trace
(
false
);
hb_buffer_t
*
buffer
=
c
->
buffer
;
...
...
@@ -784,7 +784,7 @@ static inline bool match_input (hb_apply_context_t *c,
}
static
inline
bool
ligate_input
(
hb_apply_context_t
*
c
,
unsigned
int
count
,
/* Including the first glyph */
unsigned
int
match_positions
[
MAX_CONTEXT_LENGTH
],
/* Including the first glyph */
unsigned
int
match_positions
[
HB_
MAX_CONTEXT_LENGTH
],
/* Including the first glyph */
unsigned
int
match_length
,
hb_codepoint_t
lig_glyph
,
bool
is_mark_ligature
,
...
...
@@ -944,7 +944,7 @@ static inline void recurse_lookups (context_t *c,
static
inline
bool
apply_lookup
(
hb_apply_context_t
*
c
,
unsigned
int
count
,
/* Including the first glyph */
unsigned
int
match_positions
[
MAX_CONTEXT_LENGTH
],
/* Including the first glyph */
unsigned
int
match_positions
[
HB_
MAX_CONTEXT_LENGTH
],
/* Including the first glyph */
unsigned
int
lookupCount
,
const
LookupRecord
lookupRecord
[],
/* Array of LookupRecords--in design order */
unsigned
int
match_length
)
...
...
@@ -995,7 +995,7 @@ static inline bool apply_lookup (hb_apply_context_t *c,
if
(
delta
>
0
)
{
if
(
unlikely
(
delta
+
count
>
MAX_CONTEXT_LENGTH
))
if
(
unlikely
(
delta
+
count
>
HB_
MAX_CONTEXT_LENGTH
))
break
;
}
else
...
...
@@ -1094,7 +1094,7 @@ static inline bool context_apply_lookup (hb_apply_context_t *c,
ContextApplyLookupContext
&
lookup_context
)
{
unsigned
int
match_length
=
0
;
unsigned
int
match_positions
[
MAX_CONTEXT_LENGTH
];
unsigned
int
match_positions
[
HB_
MAX_CONTEXT_LENGTH
];
return
match_input
(
c
,
inputCount
,
input
,
lookup_context
.
funcs
.
match
,
lookup_context
.
match_data
,
...
...
@@ -1621,7 +1621,7 @@ static inline bool chain_context_apply_lookup (hb_apply_context_t *c,
ChainContextApplyLookupContext
&
lookup_context
)
{
unsigned
int
match_length
=
0
;
unsigned
int
match_positions
[
MAX_CONTEXT_LENGTH
];
unsigned
int
match_positions
[
HB_
MAX_CONTEXT_LENGTH
];
return
match_input
(
c
,
inputCount
,
input
,
lookup_context
.
funcs
.
match
,
lookup_context
.
match_data
[
1
],
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录