Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
b67881b1
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
接近 2 年 前同步成功
通知
1
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看板
提交
b67881b1
编写于
11月 24, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[OTLayout] Remove operator() from Coverage
上级
a88e7160
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
34 addition
and
36 deletion
+34
-36
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-common-private.hh
+0
-2
src/hb-ot-layout-gdef-table.hh
src/hb-ot-layout-gdef-table.hh
+2
-2
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gpos-table.hh
+12
-12
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsub-table.hh
+12
-12
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+8
-8
未找到文件。
src/hb-ot-layout-common-private.hh
浏览文件 @
b67881b1
...
@@ -541,8 +541,6 @@ struct CoverageFormat2
...
@@ -541,8 +541,6 @@ struct CoverageFormat2
struct
Coverage
struct
Coverage
{
{
inline
unsigned
int
operator
()
(
hb_codepoint_t
glyph_id
)
const
{
return
get_coverage
(
glyph_id
);
}
inline
unsigned
int
get_coverage
(
hb_codepoint_t
glyph_id
)
const
inline
unsigned
int
get_coverage
(
hb_codepoint_t
glyph_id
)
const
{
{
switch
(
u
.
format
)
{
switch
(
u
.
format
)
{
...
...
src/hb-ot-layout-gdef-table.hh
浏览文件 @
b67881b1
...
@@ -51,7 +51,7 @@ struct AttachList
...
@@ -51,7 +51,7 @@ struct AttachList
unsigned
int
*
point_count
/* IN/OUT */
,
unsigned
int
*
point_count
/* IN/OUT */
,
unsigned
int
*
point_array
/* OUT */
)
const
unsigned
int
*
point_array
/* OUT */
)
const
{
{
unsigned
int
index
=
(
this
+
coverage
)
(
glyph_id
);
unsigned
int
index
=
(
this
+
coverage
)
.
get_coverage
(
glyph_id
);
if
(
index
==
NOT_COVERED
)
if
(
index
==
NOT_COVERED
)
{
{
if
(
point_count
)
if
(
point_count
)
...
@@ -242,7 +242,7 @@ struct LigCaretList
...
@@ -242,7 +242,7 @@ struct LigCaretList
unsigned
int
*
caret_count
/* IN/OUT */
,
unsigned
int
*
caret_count
/* IN/OUT */
,
hb_position_t
*
caret_array
/* OUT */
)
const
hb_position_t
*
caret_array
/* OUT */
)
const
{
{
unsigned
int
index
=
(
this
+
coverage
)
(
glyph_id
);
unsigned
int
index
=
(
this
+
coverage
)
.
get_coverage
(
glyph_id
);
if
(
index
==
NOT_COVERED
)
if
(
index
==
NOT_COVERED
)
{
{
if
(
caret_count
)
if
(
caret_count
)
...
...
src/hb-ot-layout-gpos-table.hh
浏览文件 @
b67881b1
...
@@ -433,7 +433,7 @@ struct SinglePosFormat1
...
@@ -433,7 +433,7 @@ struct SinglePosFormat1
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
cur
().
codepoint
);
unsigned
int
index
=
(
this
+
coverage
)
.
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
valueFormat
.
apply_value
(
c
->
font
,
c
->
direction
,
this
,
valueFormat
.
apply_value
(
c
->
font
,
c
->
direction
,
this
,
...
@@ -478,7 +478,7 @@ struct SinglePosFormat2
...
@@ -478,7 +478,7 @@ struct SinglePosFormat2
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
cur
().
codepoint
);
unsigned
int
index
=
(
this
+
coverage
)
.
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
>=
valueCount
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
>=
valueCount
))
return
TRACE_RETURN
(
false
);
...
@@ -655,7 +655,7 @@ struct PairPosFormat1
...
@@ -655,7 +655,7 @@ struct PairPosFormat1
hb_apply_context_t
::
mark_skipping_forward_iterator_t
skippy_iter
(
c
,
c
->
buffer
->
idx
,
1
);
hb_apply_context_t
::
mark_skipping_forward_iterator_t
skippy_iter
(
c
,
c
->
buffer
->
idx
,
1
);
if
(
skippy_iter
.
has_no_chance
())
return
TRACE_RETURN
(
false
);
if
(
skippy_iter
.
has_no_chance
())
return
TRACE_RETURN
(
false
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
cur
().
codepoint
);
unsigned
int
index
=
(
this
+
coverage
)
.
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
!
skippy_iter
.
next
())
return
TRACE_RETURN
(
false
);
if
(
!
skippy_iter
.
next
())
return
TRACE_RETURN
(
false
);
...
@@ -727,7 +727,7 @@ struct PairPosFormat2
...
@@ -727,7 +727,7 @@ struct PairPosFormat2
hb_apply_context_t
::
mark_skipping_forward_iterator_t
skippy_iter
(
c
,
c
->
buffer
->
idx
,
1
);
hb_apply_context_t
::
mark_skipping_forward_iterator_t
skippy_iter
(
c
,
c
->
buffer
->
idx
,
1
);
if
(
skippy_iter
.
has_no_chance
())
return
TRACE_RETURN
(
false
);
if
(
skippy_iter
.
has_no_chance
())
return
TRACE_RETURN
(
false
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
cur
().
codepoint
);
unsigned
int
index
=
(
this
+
coverage
)
.
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
!
skippy_iter
.
next
())
return
TRACE_RETURN
(
false
);
if
(
!
skippy_iter
.
next
())
return
TRACE_RETURN
(
false
);
...
@@ -877,12 +877,12 @@ struct CursivePosFormat1
...
@@ -877,12 +877,12 @@ struct CursivePosFormat1
hb_apply_context_t
::
mark_skipping_forward_iterator_t
skippy_iter
(
c
,
c
->
buffer
->
idx
,
1
);
hb_apply_context_t
::
mark_skipping_forward_iterator_t
skippy_iter
(
c
,
c
->
buffer
->
idx
,
1
);
if
(
skippy_iter
.
has_no_chance
())
return
TRACE_RETURN
(
false
);
if
(
skippy_iter
.
has_no_chance
())
return
TRACE_RETURN
(
false
);
const
EntryExitRecord
&
this_record
=
entryExitRecord
[(
this
+
coverage
)
(
c
->
buffer
->
cur
().
codepoint
)];
const
EntryExitRecord
&
this_record
=
entryExitRecord
[(
this
+
coverage
)
.
get_coverage
(
c
->
buffer
->
cur
().
codepoint
)];
if
(
!
this_record
.
exitAnchor
)
return
TRACE_RETURN
(
false
);
if
(
!
this_record
.
exitAnchor
)
return
TRACE_RETURN
(
false
);
if
(
!
skippy_iter
.
next
())
return
TRACE_RETURN
(
false
);
if
(
!
skippy_iter
.
next
())
return
TRACE_RETURN
(
false
);
const
EntryExitRecord
&
next_record
=
entryExitRecord
[(
this
+
coverage
)
(
c
->
buffer
->
info
[
skippy_iter
.
idx
].
codepoint
)];
const
EntryExitRecord
&
next_record
=
entryExitRecord
[(
this
+
coverage
)
.
get_coverage
(
c
->
buffer
->
info
[
skippy_iter
.
idx
].
codepoint
)];
if
(
!
next_record
.
entryAnchor
)
return
TRACE_RETURN
(
false
);
if
(
!
next_record
.
entryAnchor
)
return
TRACE_RETURN
(
false
);
unsigned
int
i
=
c
->
buffer
->
idx
;
unsigned
int
i
=
c
->
buffer
->
idx
;
...
@@ -1018,7 +1018,7 @@ struct MarkBasePosFormat1
...
@@ -1018,7 +1018,7 @@ struct MarkBasePosFormat1
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
unsigned
int
mark_index
=
(
this
+
markCoverage
)
(
c
->
buffer
->
cur
().
codepoint
);
unsigned
int
mark_index
=
(
this
+
markCoverage
)
.
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
if
(
likely
(
mark_index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
mark_index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
/* now we search backwards for a non-mark glyph */
/* now we search backwards for a non-mark glyph */
...
@@ -1034,7 +1034,7 @@ struct MarkBasePosFormat1
...
@@ -1034,7 +1034,7 @@ struct MarkBasePosFormat1
/* The following assertion is too strong, so we've disabled it. */
/* The following assertion is too strong, so we've disabled it. */
if
(
!
(
property
&
HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH
))
{
/*return TRACE_RETURN (false);*/
}
if
(
!
(
property
&
HB_OT_LAYOUT_GLYPH_PROPS_BASE_GLYPH
))
{
/*return TRACE_RETURN (false);*/
}
unsigned
int
base_index
=
(
this
+
baseCoverage
)
(
c
->
buffer
->
info
[
skippy_iter
.
idx
].
codepoint
);
unsigned
int
base_index
=
(
this
+
baseCoverage
)
.
get_coverage
(
c
->
buffer
->
info
[
skippy_iter
.
idx
].
codepoint
);
if
(
base_index
==
NOT_COVERED
)
return
TRACE_RETURN
(
false
);
if
(
base_index
==
NOT_COVERED
)
return
TRACE_RETURN
(
false
);
return
TRACE_RETURN
((
this
+
markArray
).
apply
(
c
,
mark_index
,
base_index
,
this
+
baseArray
,
classCount
,
skippy_iter
.
idx
));
return
TRACE_RETURN
((
this
+
markArray
).
apply
(
c
,
mark_index
,
base_index
,
this
+
baseArray
,
classCount
,
skippy_iter
.
idx
));
...
@@ -1122,7 +1122,7 @@ struct MarkLigPosFormat1
...
@@ -1122,7 +1122,7 @@ struct MarkLigPosFormat1
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
unsigned
int
mark_index
=
(
this
+
markCoverage
)
(
c
->
buffer
->
cur
().
codepoint
);
unsigned
int
mark_index
=
(
this
+
markCoverage
)
.
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
if
(
likely
(
mark_index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
mark_index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
/* now we search backwards for a non-mark glyph */
/* now we search backwards for a non-mark glyph */
...
@@ -1134,7 +1134,7 @@ struct MarkLigPosFormat1
...
@@ -1134,7 +1134,7 @@ struct MarkLigPosFormat1
if
(
!
(
property
&
HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE
))
{
/*return TRACE_RETURN (false);*/
}
if
(
!
(
property
&
HB_OT_LAYOUT_GLYPH_PROPS_LIGATURE
))
{
/*return TRACE_RETURN (false);*/
}
unsigned
int
j
=
skippy_iter
.
idx
;
unsigned
int
j
=
skippy_iter
.
idx
;
unsigned
int
lig_index
=
(
this
+
ligatureCoverage
)
(
c
->
buffer
->
info
[
j
].
codepoint
);
unsigned
int
lig_index
=
(
this
+
ligatureCoverage
)
.
get_coverage
(
c
->
buffer
->
info
[
j
].
codepoint
);
if
(
lig_index
==
NOT_COVERED
)
return
TRACE_RETURN
(
false
);
if
(
lig_index
==
NOT_COVERED
)
return
TRACE_RETURN
(
false
);
const
LigatureArray
&
lig_array
=
this
+
ligatureArray
;
const
LigatureArray
&
lig_array
=
this
+
ligatureArray
;
...
@@ -1238,7 +1238,7 @@ struct MarkMarkPosFormat1
...
@@ -1238,7 +1238,7 @@ struct MarkMarkPosFormat1
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
unsigned
int
mark1_index
=
(
this
+
mark1Coverage
)
(
c
->
buffer
->
cur
().
codepoint
);
unsigned
int
mark1_index
=
(
this
+
mark1Coverage
)
.
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
if
(
likely
(
mark1_index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
mark1_index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
/* now we search backwards for a suitable mark glyph until a non-mark glyph */
/* now we search backwards for a suitable mark glyph until a non-mark glyph */
...
@@ -1271,7 +1271,7 @@ struct MarkMarkPosFormat1
...
@@ -1271,7 +1271,7 @@ struct MarkMarkPosFormat1
return
TRACE_RETURN
(
false
);
return
TRACE_RETURN
(
false
);
good:
good:
unsigned
int
mark2_index
=
(
this
+
mark2Coverage
)
(
c
->
buffer
->
info
[
j
].
codepoint
);
unsigned
int
mark2_index
=
(
this
+
mark2Coverage
)
.
get_coverage
(
c
->
buffer
->
info
[
j
].
codepoint
);
if
(
mark2_index
==
NOT_COVERED
)
return
TRACE_RETURN
(
false
);
if
(
mark2_index
==
NOT_COVERED
)
return
TRACE_RETURN
(
false
);
return
TRACE_RETURN
((
this
+
mark1Array
).
apply
(
c
,
mark1_index
,
mark2_index
,
this
+
mark2Array
,
classCount
,
j
));
return
TRACE_RETURN
((
this
+
mark1Array
).
apply
(
c
,
mark1_index
,
mark2_index
,
this
+
mark2Array
,
classCount
,
j
));
...
...
src/hb-ot-layout-gsub-table.hh
浏览文件 @
b67881b1
...
@@ -67,14 +67,14 @@ struct SingleSubstFormat1
...
@@ -67,14 +67,14 @@ struct SingleSubstFormat1
inline
bool
would_apply
(
hb_would_apply_context_t
*
c
)
const
inline
bool
would_apply
(
hb_would_apply_context_t
*
c
)
const
{
{
TRACE_WOULD_APPLY
(
this
);
TRACE_WOULD_APPLY
(
this
);
return
TRACE_RETURN
(
c
->
len
==
1
&&
(
this
+
coverage
)
(
c
->
glyphs
[
0
])
!=
NOT_COVERED
);
return
TRACE_RETURN
(
c
->
len
==
1
&&
(
this
+
coverage
)
.
get_coverage
(
c
->
glyphs
[
0
])
!=
NOT_COVERED
);
}
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
hb_codepoint_t
glyph_id
=
c
->
buffer
->
cur
().
codepoint
;
hb_codepoint_t
glyph_id
=
c
->
buffer
->
cur
().
codepoint
;
unsigned
int
index
=
(
this
+
coverage
)
(
glyph_id
);
unsigned
int
index
=
(
this
+
coverage
)
.
get_coverage
(
glyph_id
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
/* According to the Adobe Annotated OpenType Suite, result is always
/* According to the Adobe Annotated OpenType Suite, result is always
...
@@ -143,14 +143,14 @@ struct SingleSubstFormat2
...
@@ -143,14 +143,14 @@ struct SingleSubstFormat2
inline
bool
would_apply
(
hb_would_apply_context_t
*
c
)
const
inline
bool
would_apply
(
hb_would_apply_context_t
*
c
)
const
{
{
TRACE_WOULD_APPLY
(
this
);
TRACE_WOULD_APPLY
(
this
);
return
TRACE_RETURN
(
c
->
len
==
1
&&
(
this
+
coverage
)
(
c
->
glyphs
[
0
])
!=
NOT_COVERED
);
return
TRACE_RETURN
(
c
->
len
==
1
&&
(
this
+
coverage
)
.
get_coverage
(
c
->
glyphs
[
0
])
!=
NOT_COVERED
);
}
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
hb_codepoint_t
glyph_id
=
c
->
buffer
->
cur
().
codepoint
;
hb_codepoint_t
glyph_id
=
c
->
buffer
->
cur
().
codepoint
;
unsigned
int
index
=
(
this
+
coverage
)
(
glyph_id
);
unsigned
int
index
=
(
this
+
coverage
)
.
get_coverage
(
glyph_id
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
unlikely
(
index
>=
substitute
.
len
))
return
TRACE_RETURN
(
false
);
if
(
unlikely
(
index
>=
substitute
.
len
))
return
TRACE_RETURN
(
false
);
...
@@ -334,14 +334,14 @@ struct MultipleSubstFormat1
...
@@ -334,14 +334,14 @@ struct MultipleSubstFormat1
inline
bool
would_apply
(
hb_would_apply_context_t
*
c
)
const
inline
bool
would_apply
(
hb_would_apply_context_t
*
c
)
const
{
{
TRACE_WOULD_APPLY
(
this
);
TRACE_WOULD_APPLY
(
this
);
return
TRACE_RETURN
(
c
->
len
==
1
&&
(
this
+
coverage
)
(
c
->
glyphs
[
0
])
!=
NOT_COVERED
);
return
TRACE_RETURN
(
c
->
len
==
1
&&
(
this
+
coverage
)
.
get_coverage
(
c
->
glyphs
[
0
])
!=
NOT_COVERED
);
}
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
cur
().
codepoint
);
unsigned
int
index
=
(
this
+
coverage
)
.
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
return
TRACE_RETURN
((
this
+
sequence
[
index
]).
apply
(
c
));
return
TRACE_RETURN
((
this
+
sequence
[
index
]).
apply
(
c
));
...
@@ -467,7 +467,7 @@ struct AlternateSubstFormat1
...
@@ -467,7 +467,7 @@ struct AlternateSubstFormat1
inline
bool
would_apply
(
hb_would_apply_context_t
*
c
)
const
inline
bool
would_apply
(
hb_would_apply_context_t
*
c
)
const
{
{
TRACE_WOULD_APPLY
(
this
);
TRACE_WOULD_APPLY
(
this
);
return
TRACE_RETURN
(
c
->
len
==
1
&&
(
this
+
coverage
)
(
c
->
glyphs
[
0
])
!=
NOT_COVERED
);
return
TRACE_RETURN
(
c
->
len
==
1
&&
(
this
+
coverage
)
.
get_coverage
(
c
->
glyphs
[
0
])
!=
NOT_COVERED
);
}
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
...
@@ -475,7 +475,7 @@ struct AlternateSubstFormat1
...
@@ -475,7 +475,7 @@ struct AlternateSubstFormat1
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
hb_codepoint_t
glyph_id
=
c
->
buffer
->
cur
().
codepoint
;
hb_codepoint_t
glyph_id
=
c
->
buffer
->
cur
().
codepoint
;
unsigned
int
index
=
(
this
+
coverage
)
(
glyph_id
);
unsigned
int
index
=
(
this
+
coverage
)
.
get_coverage
(
glyph_id
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
const
AlternateSet
&
alt_set
=
this
+
alternateSet
[
index
];
const
AlternateSet
&
alt_set
=
this
+
alternateSet
[
index
];
...
@@ -780,7 +780,7 @@ struct LigatureSubstFormat1
...
@@ -780,7 +780,7 @@ struct LigatureSubstFormat1
inline
bool
would_apply
(
hb_would_apply_context_t
*
c
)
const
inline
bool
would_apply
(
hb_would_apply_context_t
*
c
)
const
{
{
TRACE_WOULD_APPLY
(
this
);
TRACE_WOULD_APPLY
(
this
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
glyphs
[
0
]);
unsigned
int
index
=
(
this
+
coverage
)
.
get_coverage
(
c
->
glyphs
[
0
]);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
const
LigatureSet
&
lig_set
=
this
+
ligatureSet
[
index
];
const
LigatureSet
&
lig_set
=
this
+
ligatureSet
[
index
];
...
@@ -792,7 +792,7 @@ struct LigatureSubstFormat1
...
@@ -792,7 +792,7 @@ struct LigatureSubstFormat1
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
hb_codepoint_t
glyph_id
=
c
->
buffer
->
cur
().
codepoint
;
hb_codepoint_t
glyph_id
=
c
->
buffer
->
cur
().
codepoint
;
unsigned
int
index
=
(
this
+
coverage
)
(
glyph_id
);
unsigned
int
index
=
(
this
+
coverage
)
.
get_coverage
(
glyph_id
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
const
LigatureSet
&
lig_set
=
this
+
ligatureSet
[
index
];
const
LigatureSet
&
lig_set
=
this
+
ligatureSet
[
index
];
...
@@ -957,7 +957,7 @@ struct ReverseChainSingleSubstFormat1
...
@@ -957,7 +957,7 @@ struct ReverseChainSingleSubstFormat1
inline
bool
would_apply
(
hb_would_apply_context_t
*
c
)
const
inline
bool
would_apply
(
hb_would_apply_context_t
*
c
)
const
{
{
TRACE_WOULD_APPLY
(
this
);
TRACE_WOULD_APPLY
(
this
);
return
TRACE_RETURN
(
c
->
len
==
1
&&
(
this
+
coverage
)
(
c
->
glyphs
[
0
])
!=
NOT_COVERED
);
return
TRACE_RETURN
(
c
->
len
==
1
&&
(
this
+
coverage
)
.
get_coverage
(
c
->
glyphs
[
0
])
!=
NOT_COVERED
);
}
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
...
@@ -966,7 +966,7 @@ struct ReverseChainSingleSubstFormat1
...
@@ -966,7 +966,7 @@ struct ReverseChainSingleSubstFormat1
if
(
unlikely
(
c
->
nesting_level_left
!=
MAX_NESTING_LEVEL
))
if
(
unlikely
(
c
->
nesting_level_left
!=
MAX_NESTING_LEVEL
))
return
TRACE_RETURN
(
false
);
/* No chaining to this type */
return
TRACE_RETURN
(
false
);
/* No chaining to this type */
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
cur
().
codepoint
);
unsigned
int
index
=
(
this
+
coverage
)
.
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
const
OffsetArrayOf
<
Coverage
>
&
lookahead
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
backtrack
);
const
OffsetArrayOf
<
Coverage
>
&
lookahead
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
backtrack
);
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
b67881b1
...
@@ -1103,7 +1103,7 @@ struct ContextFormat1
...
@@ -1103,7 +1103,7 @@ struct ContextFormat1
{
{
TRACE_WOULD_APPLY
(
this
);
TRACE_WOULD_APPLY
(
this
);
const
RuleSet
&
rule_set
=
this
+
ruleSet
[(
this
+
coverage
)
(
c
->
glyphs
[
0
])];
const
RuleSet
&
rule_set
=
this
+
ruleSet
[(
this
+
coverage
)
.
get_coverage
(
c
->
glyphs
[
0
])];
struct
ContextApplyLookupContext
lookup_context
=
{
struct
ContextApplyLookupContext
lookup_context
=
{
{
match_glyph
},
{
match_glyph
},
NULL
NULL
...
@@ -1119,7 +1119,7 @@ struct ContextFormat1
...
@@ -1119,7 +1119,7 @@ struct ContextFormat1
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
cur
().
codepoint
);
unsigned
int
index
=
(
this
+
coverage
)
.
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
return
TRACE_RETURN
(
false
);
...
@@ -1209,7 +1209,7 @@ struct ContextFormat2
...
@@ -1209,7 +1209,7 @@ struct ContextFormat2
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
cur
().
codepoint
);
unsigned
int
index
=
(
this
+
coverage
)
.
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
const
ClassDef
&
class_def
=
this
+
classDef
;
const
ClassDef
&
class_def
=
this
+
classDef
;
...
@@ -1299,7 +1299,7 @@ struct ContextFormat3
...
@@ -1299,7 +1299,7 @@ struct ContextFormat3
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
unsigned
int
index
=
(
this
+
coverage
[
0
])
(
c
->
buffer
->
cur
().
codepoint
);
unsigned
int
index
=
(
this
+
coverage
[
0
])
.
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
const
LookupRecord
*
lookupRecord
=
&
StructAtOffset
<
LookupRecord
>
(
coverage
,
coverage
[
0
].
static_size
*
glyphCount
);
const
LookupRecord
*
lookupRecord
=
&
StructAtOffset
<
LookupRecord
>
(
coverage
,
coverage
[
0
].
static_size
*
glyphCount
);
...
@@ -1660,7 +1660,7 @@ struct ChainContextFormat1
...
@@ -1660,7 +1660,7 @@ struct ChainContextFormat1
{
{
TRACE_WOULD_APPLY
(
this
);
TRACE_WOULD_APPLY
(
this
);
const
ChainRuleSet
&
rule_set
=
this
+
ruleSet
[(
this
+
coverage
)
(
c
->
glyphs
[
0
])];
const
ChainRuleSet
&
rule_set
=
this
+
ruleSet
[(
this
+
coverage
)
.
get_coverage
(
c
->
glyphs
[
0
])];
struct
ChainContextApplyLookupContext
lookup_context
=
{
struct
ChainContextApplyLookupContext
lookup_context
=
{
{
match_glyph
},
{
match_glyph
},
{
NULL
,
NULL
,
NULL
}
{
NULL
,
NULL
,
NULL
}
...
@@ -1676,7 +1676,7 @@ struct ChainContextFormat1
...
@@ -1676,7 +1676,7 @@ struct ChainContextFormat1
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
cur
().
codepoint
);
unsigned
int
index
=
(
this
+
coverage
)
.
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
const
ChainRuleSet
&
rule_set
=
this
+
ruleSet
[
index
];
const
ChainRuleSet
&
rule_set
=
this
+
ruleSet
[
index
];
...
@@ -1769,7 +1769,7 @@ struct ChainContextFormat2
...
@@ -1769,7 +1769,7 @@ struct ChainContextFormat2
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
{
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
cur
().
codepoint
);
unsigned
int
index
=
(
this
+
coverage
)
.
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
const
ClassDef
&
backtrack_class_def
=
this
+
backtrackClassDef
;
const
ClassDef
&
backtrack_class_def
=
this
+
backtrackClassDef
;
...
@@ -1892,7 +1892,7 @@ struct ChainContextFormat3
...
@@ -1892,7 +1892,7 @@ struct ChainContextFormat3
TRACE_APPLY
(
this
);
TRACE_APPLY
(
this
);
const
OffsetArrayOf
<
Coverage
>
&
input
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
backtrack
);
const
OffsetArrayOf
<
Coverage
>
&
input
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
backtrack
);
unsigned
int
index
=
(
this
+
input
[
0
])
(
c
->
buffer
->
cur
().
codepoint
);
unsigned
int
index
=
(
this
+
input
[
0
])
.
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
if
(
likely
(
index
==
NOT_COVERED
))
return
TRACE_RETURN
(
false
);
const
OffsetArrayOf
<
Coverage
>
&
lookahead
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
input
);
const
OffsetArrayOf
<
Coverage
>
&
lookahead
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
input
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录