Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
0382b718
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看板
提交
0382b718
编写于
11月 02, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use as_array in more places
上级
91de9dfc
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
11 deletion
+15
-11
src/hb-aat-layout-morx-table.hh
src/hb-aat-layout-morx-table.hh
+2
-2
src/hb-ot-layout-gsubgpos.hh
src/hb-ot-layout-gsubgpos.hh
+13
-9
未找到文件。
src/hb-aat-layout-morx-table.hh
浏览文件 @
0382b718
...
...
@@ -977,7 +977,7 @@ struct Chain
inline
void
apply
(
hb_aat_apply_context_t
*
c
,
hb_mask_t
flags
)
const
{
const
ChainSubtable
<
Types
>
*
subtable
=
&
StructA
tOffset
<
ChainSubtable
<
Types
>
>
(
&
featureZ
,
featureZ
[
0
].
static_size
*
featureCount
);
const
ChainSubtable
<
Types
>
*
subtable
=
&
StructA
fter
<
ChainSubtable
<
Types
>
>
(
featureZ
.
as_array
(
featureCount
)
);
unsigned
int
count
=
subtableCount
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
...
...
@@ -1059,7 +1059,7 @@ struct Chain
if
(
!
c
->
check_array
(
featureZ
.
arrayZ
,
featureCount
))
return_trace
(
false
);
const
ChainSubtable
<
Types
>
*
subtable
=
&
StructA
tOffset
<
ChainSubtable
<
Types
>
>
(
&
featureZ
,
featureZ
[
0
].
static_size
*
featureCount
);
const
ChainSubtable
<
Types
>
*
subtable
=
&
StructA
fter
<
ChainSubtable
<
Types
>
>
(
featureZ
.
as_array
(
featureCount
)
);
unsigned
int
count
=
subtableCount
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
...
...
src/hb-ot-layout-gsubgpos.hh
浏览文件 @
0382b718
...
...
@@ -1308,7 +1308,8 @@ struct Rule
inline
void
closure
(
hb_closure_context_t
*
c
,
ContextClosureLookupContext
&
lookup_context
)
const
{
TRACE_CLOSURE
(
this
);
const
UnsizedArrayOf
<
LookupRecord
>
&
lookupRecord
=
StructAtOffset
<
UnsizedArrayOf
<
LookupRecord
>
>
(
inputZ
.
arrayZ
,
inputZ
[
0
].
static_size
*
(
inputCount
?
inputCount
-
1
:
0
));
const
UnsizedArrayOf
<
LookupRecord
>
&
lookupRecord
=
StructAfter
<
UnsizedArrayOf
<
LookupRecord
>
>
(
inputZ
.
as_array
((
inputCount
?
inputCount
-
1
:
0
)));
context_closure_lookup
(
c
,
inputCount
,
inputZ
.
arrayZ
,
lookupCount
,
lookupRecord
.
arrayZ
,
...
...
@@ -1318,7 +1319,8 @@ struct Rule
inline
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
,
ContextCollectGlyphsLookupContext
&
lookup_context
)
const
{
TRACE_COLLECT_GLYPHS
(
this
);
const
UnsizedArrayOf
<
LookupRecord
>
&
lookupRecord
=
StructAtOffset
<
UnsizedArrayOf
<
LookupRecord
>
>
(
inputZ
.
arrayZ
,
inputZ
[
0
].
static_size
*
(
inputCount
?
inputCount
-
1
:
0
));
const
UnsizedArrayOf
<
LookupRecord
>
&
lookupRecord
=
StructAfter
<
UnsizedArrayOf
<
LookupRecord
>
>
(
inputZ
.
as_array
(
inputCount
?
inputCount
-
1
:
0
));
context_collect_glyphs_lookup
(
c
,
inputCount
,
inputZ
.
arrayZ
,
lookupCount
,
lookupRecord
.
arrayZ
,
...
...
@@ -1328,14 +1330,16 @@ struct Rule
inline
bool
would_apply
(
hb_would_apply_context_t
*
c
,
ContextApplyLookupContext
&
lookup_context
)
const
{
TRACE_WOULD_APPLY
(
this
);
const
UnsizedArrayOf
<
LookupRecord
>
&
lookupRecord
=
StructAtOffset
<
UnsizedArrayOf
<
LookupRecord
>
>
(
inputZ
.
arrayZ
,
inputZ
[
0
].
static_size
*
(
inputCount
?
inputCount
-
1
:
0
));
const
UnsizedArrayOf
<
LookupRecord
>
&
lookupRecord
=
StructAfter
<
UnsizedArrayOf
<
LookupRecord
>
>
(
inputZ
.
as_array
(
inputCount
?
inputCount
-
1
:
0
));
return_trace
(
context_would_apply_lookup
(
c
,
inputCount
,
inputZ
.
arrayZ
,
lookupCount
,
lookupRecord
.
arrayZ
,
lookup_context
));
}
inline
bool
apply
(
hb_ot_apply_context_t
*
c
,
ContextApplyLookupContext
&
lookup_context
)
const
{
TRACE_APPLY
(
this
);
const
UnsizedArrayOf
<
LookupRecord
>
&
lookupRecord
=
StructAtOffset
<
UnsizedArrayOf
<
LookupRecord
>
>
(
inputZ
.
arrayZ
,
inputZ
[
0
].
static_size
*
(
inputCount
?
inputCount
-
1
:
0
));
const
UnsizedArrayOf
<
LookupRecord
>
&
lookupRecord
=
StructAfter
<
UnsizedArrayOf
<
LookupRecord
>
>
(
inputZ
.
as_array
(
inputCount
?
inputCount
-
1
:
0
));
return_trace
(
context_apply_lookup
(
c
,
inputCount
,
inputZ
.
arrayZ
,
lookupCount
,
lookupRecord
.
arrayZ
,
lookup_context
));
}
...
...
@@ -1686,7 +1690,7 @@ struct ContextFormat3
if
(
!
(
this
+
coverageZ
[
0
]).
intersects
(
c
->
glyphs
))
return
;
const
LookupRecord
*
lookupRecord
=
&
StructA
tOffset
<
LookupRecord
>
(
coverageZ
.
arrayZ
,
coverageZ
[
0
].
static_size
*
glyphCount
);
const
LookupRecord
*
lookupRecord
=
&
StructA
fter
<
LookupRecord
>
(
coverageZ
.
as_array
(
glyphCount
)
);
struct
ContextClosureLookupContext
lookup_context
=
{
{
intersects_coverage
},
this
...
...
@@ -1702,7 +1706,7 @@ struct ContextFormat3
TRACE_COLLECT_GLYPHS
(
this
);
(
this
+
coverageZ
[
0
]).
add_coverage
(
c
->
input
);
const
LookupRecord
*
lookupRecord
=
&
StructA
tOffset
<
LookupRecord
>
(
coverageZ
.
arrayZ
,
coverageZ
[
0
].
static_size
*
glyphCount
);
const
LookupRecord
*
lookupRecord
=
&
StructA
fter
<
LookupRecord
>
(
coverageZ
.
as_array
(
glyphCount
)
);
struct
ContextCollectGlyphsLookupContext
lookup_context
=
{
{
collect_coverage
},
this
...
...
@@ -1718,7 +1722,7 @@ struct ContextFormat3
{
TRACE_WOULD_APPLY
(
this
);
const
LookupRecord
*
lookupRecord
=
&
StructA
tOffset
<
LookupRecord
>
(
coverageZ
.
arrayZ
,
coverageZ
[
0
].
static_size
*
glyphCount
);
const
LookupRecord
*
lookupRecord
=
&
StructA
fter
<
LookupRecord
>
(
coverageZ
.
as_array
(
glyphCount
)
);
struct
ContextApplyLookupContext
lookup_context
=
{
{
match_coverage
},
this
...
...
@@ -1735,7 +1739,7 @@ struct ContextFormat3
unsigned
int
index
=
(
this
+
coverageZ
[
0
]).
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return_trace
(
false
);
const
LookupRecord
*
lookupRecord
=
&
StructA
tOffset
<
LookupRecord
>
(
coverageZ
.
arrayZ
,
coverageZ
[
0
].
static_size
*
glyphCount
);
const
LookupRecord
*
lookupRecord
=
&
StructA
fter
<
LookupRecord
>
(
coverageZ
.
as_array
(
glyphCount
)
);
struct
ContextApplyLookupContext
lookup_context
=
{
{
match_coverage
},
this
...
...
@@ -1759,7 +1763,7 @@ struct ContextFormat3
if
(
!
c
->
check_array
(
coverageZ
.
arrayZ
,
count
))
return_trace
(
false
);
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
if
(
!
coverageZ
[
i
].
sanitize
(
c
,
this
))
return_trace
(
false
);
const
LookupRecord
*
lookupRecord
=
&
StructA
tOffset
<
LookupRecord
>
(
coverageZ
.
arrayZ
,
coverageZ
[
0
].
static_size
*
count
);
const
LookupRecord
*
lookupRecord
=
&
StructA
fter
<
LookupRecord
>
(
coverageZ
.
as_array
(
glyphCount
)
);
return_trace
(
c
->
check_array
(
lookupRecord
,
lookupCount
));
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录