Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
173fde70
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看板
提交
173fde70
编写于
4月 29, 2010
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Further simplify tracing
上级
bc200457
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
26 addition
and
33 deletion
+26
-33
src/hb-open-type-private.hh
src/hb-open-type-private.hh
+15
-16
src/hb-ot-layout-gpos-private.hh
src/hb-ot-layout-gpos-private.hh
+5
-4
src/hb-ot-layout-gsub-private.hh
src/hb-ot-layout-gsub-private.hh
+6
-5
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+0
-8
未找到文件。
src/hb-open-type-private.hh
浏览文件 @
173fde70
...
...
@@ -137,9 +137,7 @@ ASSERT_STATIC (sizeof (Type) + 1 <= sizeof (_Null##Type))
#define SANITIZE_ARG \
context, \
(HB_DEBUG_SANITIZE ? sanitize_depth + 1 : 0)
#define SANITIZE_ARG_INIT \
&context, \
1
typedef
struct
_hb_sanitize_context_t
hb_sanitize_context_t
;
struct
_hb_sanitize_context_t
...
...
@@ -266,7 +264,8 @@ template <typename Type>
struct
Sanitizer
{
static
hb_blob_t
*
sanitize
(
hb_blob_t
*
blob
)
{
hb_sanitize_context_t
context
;
hb_sanitize_context_t
context
[
1
];
unsigned
int
sanitize_depth
=
0
;
bool
sane
;
/* TODO is_sane() stuff */
...
...
@@ -276,33 +275,33 @@ struct Sanitizer
fprintf
(
stderr
,
"Sanitizer %p start %s
\n
"
,
blob
,
__PRETTY_FUNCTION__
);
#endif
_hb_sanitize_init
(
&
context
,
blob
);
_hb_sanitize_init
(
context
,
blob
);
/* Note: We drop const here */
Type
*
t
=
CastP
<
Type
>
((
void
*
)
context
.
start
);
Type
*
t
=
CastP
<
Type
>
((
void
*
)
context
->
start
);
sane
=
t
->
sanitize
(
SANITIZE_ARG
_INIT
);
sane
=
t
->
sanitize
(
SANITIZE_ARG
);
if
(
sane
)
{
if
(
context
.
edit_count
)
{
if
(
context
->
edit_count
)
{
#if HB_DEBUG_SANITIZE
fprintf
(
stderr
,
"Sanitizer %p passed first round with %d edits; doing a second round %s
\n
"
,
blob
,
context
.
edit_count
,
__PRETTY_FUNCTION__
);
blob
,
context
->
edit_count
,
__PRETTY_FUNCTION__
);
#endif
/* sanitize again to ensure no toe-stepping */
context
.
edit_count
=
0
;
sane
=
t
->
sanitize
(
SANITIZE_ARG
_INIT
);
if
(
context
.
edit_count
)
{
context
->
edit_count
=
0
;
sane
=
t
->
sanitize
(
SANITIZE_ARG
);
if
(
context
->
edit_count
)
{
#if HB_DEBUG_SANITIZE
fprintf
(
stderr
,
"Sanitizer %p requested %d edits in second round; FAILLING %s
\n
"
,
blob
,
context
.
edit_count
,
__PRETTY_FUNCTION__
);
blob
,
context
->
edit_count
,
__PRETTY_FUNCTION__
);
#endif
sane
=
false
;
}
}
_hb_sanitize_fini
(
&
context
,
blob
);
_hb_sanitize_fini
(
context
,
blob
);
}
else
{
unsigned
int
edit_count
=
context
.
edit_count
;
_hb_sanitize_fini
(
&
context
,
blob
);
unsigned
int
edit_count
=
context
->
edit_count
;
_hb_sanitize_fini
(
context
,
blob
);
if
(
edit_count
&&
!
hb_blob_is_writable
(
blob
)
&&
hb_blob_try_writable
(
blob
))
{
/* ok, we made it writable by relocating. try again */
#if HB_DEBUG_SANITIZE
...
...
src/hb-ot-layout-gpos-private.hh
浏览文件 @
173fde70
...
...
@@ -1450,7 +1450,8 @@ struct PosLookup : Lookup
inline
bool
apply_once
(
hb_ot_layout_context_t
*
context
,
hb_buffer_t
*
buffer
,
unsigned
int
context_length
,
unsigned
int
nesting_level_left
)
const
unsigned
int
nesting_level_left
,
unsigned
int
apply_depth
)
const
{
unsigned
int
lookup_type
=
get_type
();
unsigned
int
lookup_flag
=
get_flag
();
...
...
@@ -1460,7 +1461,7 @@ struct PosLookup : Lookup
return
false
;
for
(
unsigned
int
i
=
0
;
i
<
get_subtable_count
();
i
++
)
if
(
get_subtable
(
i
).
apply
(
APPLY_ARG
_INIT
,
lookup_type
))
if
(
get_subtable
(
i
).
apply
(
APPLY_ARG
,
lookup_type
))
return
true
;
return
false
;
...
...
@@ -1483,7 +1484,7 @@ struct PosLookup : Lookup
bool
done
;
if
(
~
IN_MASK
(
buffer
->
in_pos
)
&
mask
)
{
done
=
apply_once
(
context
,
buffer
,
NO_CONTEXT
,
MAX_NESTING_LEVEL
);
done
=
apply_once
(
context
,
buffer
,
NO_CONTEXT
,
MAX_NESTING_LEVEL
,
0
);
ret
|=
done
;
}
else
...
...
@@ -1568,7 +1569,7 @@ static inline bool position_lookup (APPLY_ARG_DEF, unsigned int lookup_index)
if
(
HB_UNLIKELY
(
context_length
<
1
))
return
false
;
return
l
.
apply_once
(
context
,
buffer
,
context_length
,
nesting_level_left
);
return
l
.
apply_once
(
context
,
buffer
,
context_length
,
nesting_level_left
,
apply_depth
);
}
...
...
src/hb-ot-layout-gsub-private.hh
浏览文件 @
173fde70
...
...
@@ -760,7 +760,8 @@ struct SubstLookup : Lookup
inline
bool
apply_once
(
hb_ot_layout_context_t
*
context
,
hb_buffer_t
*
buffer
,
unsigned
int
context_length
,
unsigned
int
nesting_level_left
)
const
unsigned
int
nesting_level_left
,
unsigned
int
apply_depth
)
const
{
unsigned
int
lookup_type
=
get_type
();
unsigned
int
lookup_flag
=
get_flag
();
...
...
@@ -785,7 +786,7 @@ struct SubstLookup : Lookup
unsigned
int
count
=
get_subtable_count
();
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
if
(
get_subtable
(
i
).
apply
(
APPLY_ARG
_INIT
,
lookup_type
))
if
(
get_subtable
(
i
).
apply
(
APPLY_ARG
,
lookup_type
))
return
true
;
return
false
;
...
...
@@ -808,7 +809,7 @@ struct SubstLookup : Lookup
while
(
buffer
->
in_pos
<
buffer
->
in_length
)
{
if
((
~
IN_MASK
(
buffer
->
in_pos
)
&
mask
)
&&
apply_once
(
context
,
buffer
,
NO_CONTEXT
,
MAX_NESTING_LEVEL
))
apply_once
(
context
,
buffer
,
NO_CONTEXT
,
MAX_NESTING_LEVEL
,
0
))
ret
=
true
;
else
_hb_buffer_next_glyph
(
buffer
);
...
...
@@ -824,7 +825,7 @@ struct SubstLookup : Lookup
do
{
if
((
~
IN_MASK
(
buffer
->
in_pos
)
&
mask
)
&&
apply_once
(
context
,
buffer
,
NO_CONTEXT
,
MAX_NESTING_LEVEL
))
apply_once
(
context
,
buffer
,
NO_CONTEXT
,
MAX_NESTING_LEVEL
,
0
))
ret
=
true
;
else
buffer
->
in_pos
--
;
...
...
@@ -912,7 +913,7 @@ static inline bool substitute_lookup (APPLY_ARG_DEF, unsigned int lookup_index)
if
(
HB_UNLIKELY
(
context_length
<
1
))
return
false
;
return
l
.
apply_once
(
context
,
buffer
,
context_length
,
nesting_level_left
);
return
l
.
apply_once
(
context
,
buffer
,
context_length
,
nesting_level_left
,
apply_depth
);
}
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
173fde70
...
...
@@ -58,14 +58,6 @@
lookup_flag, \
property, \
(HB_DEBUG_APPLY ? apply_depth + 1 : 0)
#define APPLY_ARG_INIT \
context, \
buffer, \
context_length, \
nesting_level_left, \
lookup_flag, \
property, \
1
typedef
bool
(
*
match_func_t
)
(
hb_codepoint_t
glyph_id
,
const
USHORT
&
value
,
const
char
*
data
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录