Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
effc7ced
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看板
提交
effc7ced
编写于
9月 13, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename HeadlessArrayOf::len to lenP1
So it doesn't accidentally match our templates, etc.
上级
180a88a9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
17 deletion
+17
-17
src/hb-open-type.hh
src/hb-open-type.hh
+7
-7
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsub-table.hh
+5
-5
src/hb-ot-layout-gsubgpos.hh
src/hb-ot-layout-gsubgpos.hh
+5
-5
未找到文件。
src/hb-open-type.hh
浏览文件 @
effc7ced
...
...
@@ -570,16 +570,16 @@ struct HeadlessArrayOf
{
inline
const
Type
&
operator
[]
(
unsigned
int
i
)
const
{
if
(
unlikely
(
i
>=
len
||
!
i
))
return
Null
(
Type
);
if
(
unlikely
(
i
>=
len
P1
||
!
i
))
return
Null
(
Type
);
return
arrayZ
[
i
-
1
];
}
inline
Type
&
operator
[]
(
unsigned
int
i
)
{
if
(
unlikely
(
i
>=
len
||
!
i
))
return
Crap
(
Type
);
if
(
unlikely
(
i
>=
len
P1
||
!
i
))
return
Crap
(
Type
);
return
arrayZ
[
i
-
1
];
}
inline
unsigned
int
get_size
(
void
)
const
{
return
len
.
static_size
+
(
len
?
len
-
1
:
0
)
*
Type
::
static_size
;
}
{
return
len
P1
.
static_size
+
(
lenP1
?
lenP1
-
1
:
0
)
*
Type
::
static_size
;
}
inline
bool
serialize
(
hb_serialize_context_t
*
c
,
Supplier
<
Type
>
&
items
,
...
...
@@ -587,7 +587,7 @@ struct HeadlessArrayOf
{
TRACE_SERIALIZE
(
this
);
if
(
unlikely
(
!
c
->
extend_min
(
*
this
)))
return_trace
(
false
);
len
.
set
(
items_len
);
/* TODO(serialize) Overflow? */
len
P1
.
set
(
items_len
);
/* TODO(serialize) Overflow? */
if
(
unlikely
(
!
items_len
))
return_trace
(
true
);
if
(
unlikely
(
!
c
->
extend
(
*
this
)))
return_trace
(
false
);
for
(
unsigned
int
i
=
0
;
i
<
items_len
-
1
;
i
++
)
...
...
@@ -617,12 +617,12 @@ struct HeadlessArrayOf
inline
bool
sanitize_shallow
(
hb_sanitize_context_t
*
c
)
const
{
TRACE_SANITIZE
(
this
);
return_trace
(
len
.
sanitize
(
c
)
&&
(
!
len
||
c
->
check_array
(
arrayZ
,
len
-
1
)));
return_trace
(
len
P1
.
sanitize
(
c
)
&&
(
!
len
P1
||
c
->
check_array
(
arrayZ
,
lenP1
-
1
)));
}
public:
LenType
len
;
LenType
len
P1
;
Type
arrayZ
[
VAR
];
public:
DEFINE_SIZE_ARRAY
(
sizeof
(
LenType
),
arrayZ
);
...
...
src/hb-ot-layout-gsub-table.hh
浏览文件 @
effc7ced
...
...
@@ -710,7 +710,7 @@ struct Ligature
{
inline
bool
intersects
(
const
hb_set_t
*
glyphs
)
const
{
unsigned
int
count
=
component
.
len
;
unsigned
int
count
=
component
.
len
P1
;
for
(
unsigned
int
i
=
1
;
i
<
count
;
i
++
)
if
(
!
glyphs
->
has
(
component
[
i
]))
return
false
;
...
...
@@ -720,7 +720,7 @@ struct Ligature
inline
void
closure
(
hb_closure_context_t
*
c
)
const
{
TRACE_CLOSURE
(
this
);
unsigned
int
count
=
component
.
len
;
unsigned
int
count
=
component
.
len
P1
;
for
(
unsigned
int
i
=
1
;
i
<
count
;
i
++
)
if
(
!
c
->
glyphs
->
has
(
component
[
i
]))
return
;
...
...
@@ -730,14 +730,14 @@ struct Ligature
inline
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
TRACE_COLLECT_GLYPHS
(
this
);
c
->
input
->
add_array
(
component
.
arrayZ
,
component
.
len
?
component
.
len
-
1
:
0
);
c
->
input
->
add_array
(
component
.
arrayZ
,
component
.
len
P1
?
component
.
lenP1
-
1
:
0
);
c
->
output
->
add
(
ligGlyph
);
}
inline
bool
would_apply
(
hb_would_apply_context_t
*
c
)
const
{
TRACE_WOULD_APPLY
(
this
);
if
(
c
->
len
!=
component
.
len
)
if
(
c
->
len
!=
component
.
len
P1
)
return_trace
(
false
);
for
(
unsigned
int
i
=
1
;
i
<
c
->
len
;
i
++
)
...
...
@@ -750,7 +750,7 @@ struct Ligature
inline
bool
apply
(
hb_ot_apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
unsigned
int
count
=
component
.
len
;
unsigned
int
count
=
component
.
len
P1
;
if
(
unlikely
(
!
count
))
return_trace
(
false
);
...
...
src/hb-ot-layout-gsubgpos.hh
浏览文件 @
effc7ced
...
...
@@ -1879,7 +1879,7 @@ struct ChainRule
const
ArrayOf
<
HBUINT16
>
&
lookahead
=
StructAfter
<
ArrayOf
<
HBUINT16
>
>
(
input
);
return
chain_context_intersects
(
glyphs
,
backtrack
.
len
,
backtrack
.
arrayZ
,
input
.
len
,
input
.
arrayZ
,
input
.
len
P1
,
input
.
arrayZ
,
lookahead
.
len
,
lookahead
.
arrayZ
,
lookup_context
);
}
...
...
@@ -1892,7 +1892,7 @@ struct ChainRule
const
ArrayOf
<
LookupRecord
>
&
lookup
=
StructAfter
<
ArrayOf
<
LookupRecord
>
>
(
lookahead
);
chain_context_closure_lookup
(
c
,
backtrack
.
len
,
backtrack
.
arrayZ
,
input
.
len
,
input
.
arrayZ
,
input
.
len
P1
,
input
.
arrayZ
,
lookahead
.
len
,
lookahead
.
arrayZ
,
lookup
.
len
,
lookup
.
arrayZ
,
lookup_context
);
...
...
@@ -1906,7 +1906,7 @@ struct ChainRule
const
ArrayOf
<
LookupRecord
>
&
lookup
=
StructAfter
<
ArrayOf
<
LookupRecord
>
>
(
lookahead
);
chain_context_collect_glyphs_lookup
(
c
,
backtrack
.
len
,
backtrack
.
arrayZ
,
input
.
len
,
input
.
arrayZ
,
input
.
len
P1
,
input
.
arrayZ
,
lookahead
.
len
,
lookahead
.
arrayZ
,
lookup
.
len
,
lookup
.
arrayZ
,
lookup_context
);
...
...
@@ -1920,7 +1920,7 @@ struct ChainRule
const
ArrayOf
<
LookupRecord
>
&
lookup
=
StructAfter
<
ArrayOf
<
LookupRecord
>
>
(
lookahead
);
return_trace
(
chain_context_would_apply_lookup
(
c
,
backtrack
.
len
,
backtrack
.
arrayZ
,
input
.
len
,
input
.
arrayZ
,
input
.
len
P1
,
input
.
arrayZ
,
lookahead
.
len
,
lookahead
.
arrayZ
,
lookup
.
len
,
lookup
.
arrayZ
,
lookup_context
));
}
...
...
@@ -1933,7 +1933,7 @@ struct ChainRule
const
ArrayOf
<
LookupRecord
>
&
lookup
=
StructAfter
<
ArrayOf
<
LookupRecord
>
>
(
lookahead
);
return_trace
(
chain_context_apply_lookup
(
c
,
backtrack
.
len
,
backtrack
.
arrayZ
,
input
.
len
,
input
.
arrayZ
,
input
.
len
P1
,
input
.
arrayZ
,
lookahead
.
len
,
lookahead
.
arrayZ
,
lookup
.
len
,
lookup
.
arrayZ
,
lookup_context
));
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录