Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
fd034490
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看板
提交
fd034490
编写于
1月 17, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename hb_apply_context_t to hb_ot_apply_context_t
上级
94b49bee
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
89 addition
and
89 deletion
+89
-89
src/hb-aat-layout-morx-table.hh
src/hb-aat-layout-morx-table.hh
+8
-8
src/hb-aat-layout-private.hh
src/hb-aat-layout-private.hh
+1
-1
src/hb-aat-layout.cc
src/hb-aat-layout.cc
+1
-1
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gpos-table.hh
+24
-24
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
+29
-29
src/hb-ot-layout-private.hh
src/hb-ot-layout-private.hh
+2
-2
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+8
-8
src/hb-ot-shape-complex-arabic-fallback.hh
src/hb-ot-shape-complex-arabic-fallback.hh
+1
-1
src/hb-ot-shape-fallback.cc
src/hb-ot-shape-fallback.cc
+2
-2
src/hb-ot-shape.cc
src/hb-ot-shape.cc
+1
-1
未找到文件。
src/hb-aat-layout-morx-table.hh
浏览文件 @
fd034490
...
...
@@ -148,7 +148,7 @@ struct RearrangementSubtable
unsigned
int
last_zero_before_start
;
};
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
...
...
@@ -245,7 +245,7 @@ struct ContextualSubtable
const
UnsizedOffsetListOf
<
Lookup
<
GlyphID
>
,
HBUINT32
>
&
subs
;
};
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
...
...
@@ -326,7 +326,7 @@ struct LigatureSubtable
private:
};
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
...
...
@@ -360,7 +360,7 @@ struct LigatureSubtable
struct
NoncontextualSubtable
{
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
...
...
@@ -396,7 +396,7 @@ struct NoncontextualSubtable
struct
InsertionSubtable
{
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
/* TODO */
...
...
@@ -448,7 +448,7 @@ struct ChainSubtable
Insertion
=
5
};
inline
void
apply
(
hb_apply_context_t
*
c
,
const
char
*
end
)
const
inline
void
apply
(
hb_
ot_
apply_context_t
*
c
,
const
char
*
end
)
const
{
dispatch
(
c
,
end
);
}
...
...
@@ -496,7 +496,7 @@ struct ChainSubtable
struct
Chain
{
inline
void
apply
(
hb_apply_context_t
*
c
,
const
char
*
end
)
const
inline
void
apply
(
hb_
ot_
apply_context_t
*
c
,
const
char
*
end
)
const
{
const
ChainSubtable
*
subtable
=
&
StructAtOffset
<
ChainSubtable
>
(
featureZ
,
featureZ
[
0
].
static_size
*
featureCount
);
unsigned
int
count
=
subtableCount
;
...
...
@@ -555,7 +555,7 @@ struct morx
{
static
const
hb_tag_t
tableTag
=
HB_AAT_TAG_MORX
;
inline
void
apply
(
hb_apply_context_t
*
c
,
unsigned
int
length
)
const
inline
void
apply
(
hb_
ot_
apply_context_t
*
c
,
unsigned
int
length
)
const
{
const
char
*
end
=
(
const
char
*
)
this
+
length
;
const
Chain
*
chain
=
chains
;
...
...
src/hb-aat-layout-private.hh
浏览文件 @
fd034490
...
...
@@ -35,6 +35,6 @@
HB_INTERNAL
void
hb_aat_layout_substitute
(
OT
::
hb_apply_context_t
*
c
);
hb_aat_layout_substitute
(
OT
::
hb_
ot_
apply_context_t
*
c
);
#endif
/* HB_AAT_LAYOUT_PRIVATE_HH */
src/hb-aat-layout.cc
浏览文件 @
fd034490
...
...
@@ -68,7 +68,7 @@ _hb_aat_layout_create (hb_face_t *face)
}
void
hb_aat_layout_substitute
(
OT
::
hb_apply_context_t
*
c
)
hb_aat_layout_substitute
(
OT
::
hb_
ot_
apply_context_t
*
c
)
{
unsigned
int
length
;
const
AAT
::
morx
&
morx
=
_get_morx
(
c
->
face
,
&
length
);
...
...
src/hb-ot-layout-gpos-table.hh
浏览文件 @
fd034490
...
...
@@ -103,7 +103,7 @@ struct ValueFormat : HBUINT16
inline
unsigned
int
get_size
(
void
)
const
{
return
get_len
()
*
Value
::
static_size
;
}
void
apply_value
(
hb_apply_context_t
*
c
,
void
apply_value
(
hb_
ot_
apply_context_t
*
c
,
const
void
*
base
,
const
Value
*
values
,
hb_glyph_position_t
&
glyph_pos
)
const
...
...
@@ -232,7 +232,7 @@ struct ValueFormat : HBUINT16
struct
AnchorFormat1
{
inline
void
get_anchor
(
hb_apply_context_t
*
c
,
hb_codepoint_t
glyph_id
HB_UNUSED
,
inline
void
get_anchor
(
hb_
ot_
apply_context_t
*
c
,
hb_codepoint_t
glyph_id
HB_UNUSED
,
float
*
x
,
float
*
y
)
const
{
hb_font_t
*
font
=
c
->
font
;
...
...
@@ -256,7 +256,7 @@ struct AnchorFormat1
struct
AnchorFormat2
{
inline
void
get_anchor
(
hb_apply_context_t
*
c
,
hb_codepoint_t
glyph_id
,
inline
void
get_anchor
(
hb_
ot_
apply_context_t
*
c
,
hb_codepoint_t
glyph_id
,
float
*
x
,
float
*
y
)
const
{
hb_font_t
*
font
=
c
->
font
;
...
...
@@ -288,7 +288,7 @@ struct AnchorFormat2
struct
AnchorFormat3
{
inline
void
get_anchor
(
hb_apply_context_t
*
c
,
hb_codepoint_t
glyph_id
HB_UNUSED
,
inline
void
get_anchor
(
hb_
ot_
apply_context_t
*
c
,
hb_codepoint_t
glyph_id
HB_UNUSED
,
float
*
x
,
float
*
y
)
const
{
hb_font_t
*
font
=
c
->
font
;
...
...
@@ -325,7 +325,7 @@ struct AnchorFormat3
struct
Anchor
{
inline
void
get_anchor
(
hb_apply_context_t
*
c
,
hb_codepoint_t
glyph_id
,
inline
void
get_anchor
(
hb_
ot_
apply_context_t
*
c
,
hb_codepoint_t
glyph_id
,
float
*
x
,
float
*
y
)
const
{
*
x
=
*
y
=
0
;
...
...
@@ -413,7 +413,7 @@ struct MarkRecord
struct
MarkArray
:
ArrayOf
<
MarkRecord
>
/* Array of MarkRecords--in Coverage order */
{
inline
bool
apply
(
hb_apply_context_t
*
c
,
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
,
unsigned
int
mark_index
,
unsigned
int
glyph_index
,
const
AnchorMatrix
&
anchors
,
unsigned
int
class_count
,
unsigned
int
glyph_pos
)
const
...
...
@@ -470,7 +470,7 @@ struct SinglePosFormat1
return
this
+
coverage
;
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
hb_buffer_t
*
buffer
=
c
->
buffer
;
...
...
@@ -518,7 +518,7 @@ struct SinglePosFormat2
return
this
+
coverage
;
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
hb_buffer_t
*
buffer
=
c
->
buffer
;
...
...
@@ -610,7 +610,7 @@ struct PairSet
c
->
input
->
add_array
(
&
record
->
secondGlyph
,
len
,
record_size
);
}
inline
bool
apply
(
hb_apply_context_t
*
c
,
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
,
const
ValueFormat
*
valueFormats
,
unsigned
int
pos
)
const
{
...
...
@@ -695,14 +695,14 @@ struct PairPosFormat1
return
this
+
coverage
;
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
hb_buffer_t
*
buffer
=
c
->
buffer
;
unsigned
int
index
=
(
this
+
coverage
).
get_coverage
(
buffer
->
cur
().
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return_trace
(
false
);
hb_apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_input
;
hb_
ot_
apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_input
;
skippy_iter
.
reset
(
buffer
->
idx
,
1
);
if
(
!
skippy_iter
.
next
())
return_trace
(
false
);
...
...
@@ -759,14 +759,14 @@ struct PairPosFormat2
return
this
+
coverage
;
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
hb_buffer_t
*
buffer
=
c
->
buffer
;
unsigned
int
index
=
(
this
+
coverage
).
get_coverage
(
buffer
->
cur
().
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return_trace
(
false
);
hb_apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_input
;
hb_
ot_
apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_input
;
skippy_iter
.
reset
(
buffer
->
idx
,
1
);
if
(
!
skippy_iter
.
next
())
return_trace
(
false
);
...
...
@@ -900,7 +900,7 @@ struct CursivePosFormat1
return
this
+
coverage
;
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
hb_buffer_t
*
buffer
=
c
->
buffer
;
...
...
@@ -908,7 +908,7 @@ struct CursivePosFormat1
const
EntryExitRecord
&
this_record
=
entryExitRecord
[(
this
+
coverage
).
get_coverage
(
buffer
->
cur
().
codepoint
)];
if
(
!
this_record
.
exitAnchor
)
return_trace
(
false
);
hb_apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_input
;
hb_
ot_
apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_input
;
skippy_iter
.
reset
(
buffer
->
idx
,
1
);
if
(
!
skippy_iter
.
next
())
return_trace
(
false
);
...
...
@@ -1059,7 +1059,7 @@ struct MarkBasePosFormat1
return
this
+
markCoverage
;
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
hb_buffer_t
*
buffer
=
c
->
buffer
;
...
...
@@ -1067,7 +1067,7 @@ struct MarkBasePosFormat1
if
(
likely
(
mark_index
==
NOT_COVERED
))
return_trace
(
false
);
/* Now we search backwards for a non-mark glyph */
hb_apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_input
;
hb_
ot_
apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_input
;
skippy_iter
.
reset
(
buffer
->
idx
,
1
);
skippy_iter
.
set_lookup_props
(
LookupFlag
::
IgnoreMarks
);
do
{
...
...
@@ -1162,7 +1162,7 @@ struct MarkLigPosFormat1
return
this
+
markCoverage
;
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
hb_buffer_t
*
buffer
=
c
->
buffer
;
...
...
@@ -1170,7 +1170,7 @@ struct MarkLigPosFormat1
if
(
likely
(
mark_index
==
NOT_COVERED
))
return_trace
(
false
);
/* Now we search backwards for a non-mark glyph */
hb_apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_input
;
hb_
ot_
apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_input
;
skippy_iter
.
reset
(
buffer
->
idx
,
1
);
skippy_iter
.
set_lookup_props
(
LookupFlag
::
IgnoreMarks
);
if
(
!
skippy_iter
.
prev
())
return_trace
(
false
);
...
...
@@ -1275,7 +1275,7 @@ struct MarkMarkPosFormat1
return
this
+
mark1Coverage
;
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
hb_buffer_t
*
buffer
=
c
->
buffer
;
...
...
@@ -1283,7 +1283,7 @@ struct MarkMarkPosFormat1
if
(
likely
(
mark1_index
==
NOT_COVERED
))
return_trace
(
false
);
/* now we search backwards for a suitable mark glyph until a non-mark glyph */
hb_apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_input
;
hb_
ot_
apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_input
;
skippy_iter
.
reset
(
buffer
->
idx
,
1
);
skippy_iter
.
set_lookup_props
(
c
->
lookup_props
&
~
LookupFlag
::
IgnoreFlags
);
if
(
!
skippy_iter
.
prev
())
return_trace
(
false
);
...
...
@@ -1450,7 +1450,7 @@ struct PosLookup : Lookup
return
false
;
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
return_trace
(
dispatch
(
c
));
...
...
@@ -1469,7 +1469,7 @@ struct PosLookup : Lookup
dispatch
(
&
c
);
}
static
bool
apply_recurse_func
(
hb_apply_context_t
*
c
,
unsigned
int
lookup_index
);
static
bool
apply_recurse_func
(
hb_
ot_
apply_context_t
*
c
,
unsigned
int
lookup_index
);
template
<
typename
context_t
>
static
inline
typename
context_t
::
return_t
dispatch_recurse_func
(
context_t
*
c
,
unsigned
int
lookup_index
);
...
...
@@ -1621,7 +1621,7 @@ template <typename context_t>
return
l
.
dispatch
(
c
);
}
/*static*/
inline
bool
PosLookup
::
apply_recurse_func
(
hb_apply_context_t
*
c
,
unsigned
int
lookup_index
)
/*static*/
inline
bool
PosLookup
::
apply_recurse_func
(
hb_
ot_
apply_context_t
*
c
,
unsigned
int
lookup_index
)
{
const
GPOS
&
gpos
=
*
(
hb_ot_layout_from_face
(
c
->
face
)
->
gpos
);
const
PosLookup
&
l
=
gpos
.
get_lookup
(
lookup_index
);
...
...
src/hb-ot-layout-gsub-table.hh
浏览文件 @
fd034490
...
...
@@ -76,7 +76,7 @@ struct SingleSubstFormat1
return_trace
(
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_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
hb_codepoint_t
glyph_id
=
c
->
buffer
->
cur
().
codepoint
;
...
...
@@ -161,7 +161,7 @@ struct SingleSubstFormat2
return_trace
(
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_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
hb_codepoint_t
glyph_id
=
c
->
buffer
->
cur
().
codepoint
;
...
...
@@ -272,7 +272,7 @@ struct Sequence
c
->
output
->
add_array
(
substitute
.
array
,
substitute
.
len
);
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
unsigned
int
count
=
substitute
.
len
;
...
...
@@ -363,7 +363,7 @@ struct MultipleSubstFormat1
return_trace
(
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_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
...
...
@@ -495,7 +495,7 @@ struct AlternateSubstFormat1
return_trace
(
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_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
hb_codepoint_t
glyph_id
=
c
->
buffer
->
cur
().
codepoint
;
...
...
@@ -628,7 +628,7 @@ struct Ligature
return_trace
(
true
);
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
unsigned
int
count
=
component
.
len
;
...
...
@@ -730,7 +730,7 @@ struct LigatureSet
return_trace
(
false
);
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
unsigned
int
num_ligs
=
ligature
.
len
;
...
...
@@ -821,7 +821,7 @@ struct LigatureSubstFormat1
return_trace
(
lig_set
.
would_apply
(
c
));
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
hb_codepoint_t
glyph_id
=
c
->
buffer
->
cur
().
codepoint
;
...
...
@@ -993,7 +993,7 @@ struct ReverseChainSingleSubstFormat1
return_trace
(
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_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
if
(
unlikely
(
c
->
nesting_level_left
!=
HB_MAX_NESTING_LEVEL
))
...
...
@@ -1150,7 +1150,7 @@ struct SubstLookup : Lookup
return
lookup_type_is_reverse
(
type
);
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
return_trace
(
dispatch
(
c
));
...
...
@@ -1186,7 +1186,7 @@ struct SubstLookup : Lookup
return_trace
(
dispatch
(
c
));
}
static
bool
apply_recurse_func
(
hb_apply_context_t
*
c
,
unsigned
int
lookup_index
);
static
bool
apply_recurse_func
(
hb_
ot_
apply_context_t
*
c
,
unsigned
int
lookup_index
);
inline
SubstLookupSubTable
&
serialize_subtable
(
hb_serialize_context_t
*
c
,
unsigned
int
i
)
...
...
@@ -1343,7 +1343,7 @@ template <typename context_t>
return
l
.
dispatch
(
c
);
}
/*static*/
inline
bool
SubstLookup
::
apply_recurse_func
(
hb_apply_context_t
*
c
,
unsigned
int
lookup_index
)
/*static*/
inline
bool
SubstLookup
::
apply_recurse_func
(
hb_
ot_
apply_context_t
*
c
,
unsigned
int
lookup_index
)
{
const
GSUB
&
gsub
=
*
(
hb_ot_layout_from_face
(
c
->
face
)
->
gsub
);
const
SubstLookup
&
l
=
gsub
.
get_lookup
(
lookup_index
);
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
fd034490
...
...
@@ -218,8 +218,8 @@ struct hb_add_coverage_context_t :
};
struct
hb_apply_context_t
:
hb_dispatch_context_t
<
hb_apply_context_t
,
bool
,
HB_DEBUG_APPLY
>
struct
hb_
ot_
apply_context_t
:
hb_dispatch_context_t
<
hb_
ot_
apply_context_t
,
bool
,
HB_DEBUG_APPLY
>
{
struct
matcher_t
{
...
...
@@ -271,7 +271,7 @@ struct hb_apply_context_t :
};
inline
may_skip_t
may_skip
(
const
hb_apply_context_t
*
c
,
may_skip
(
const
hb_
ot_
apply_context_t
*
c
,
const
hb_glyph_info_t
&
info
)
const
{
if
(
!
c
->
check_glyph_property
(
&
info
,
lookup_props
))
...
...
@@ -297,7 +297,7 @@ struct hb_apply_context_t :
struct
skipping_iterator_t
{
inline
void
init
(
hb_apply_context_t
*
c_
,
bool
context_match
=
false
)
inline
void
init
(
hb_
ot_
apply_context_t
*
c_
,
bool
context_match
=
false
)
{
c
=
c_
;
match_glyph_data
=
nullptr
;
...
...
@@ -333,7 +333,7 @@ struct hb_apply_context_t :
inline
void
reject
(
void
)
{
num_items
++
;
match_glyph_data
--
;
}
inline
matcher_t
::
may_skip_t
may_skip
(
const
hb_apply_context_t
*
c
,
may_skip
(
const
hb_
ot_
apply_context_t
*
c
,
const
hb_glyph_info_t
&
info
)
const
{
return
matcher
.
may_skip
(
c
,
info
);
...
...
@@ -396,7 +396,7 @@ struct hb_apply_context_t :
unsigned
int
idx
;
protected:
hb_apply_context_t
*
c
;
hb_
ot_
apply_context_t
*
c
;
matcher_t
matcher
;
const
HBUINT16
*
match_glyph_data
;
...
...
@@ -406,7 +406,7 @@ struct hb_apply_context_t :
inline
const
char
*
get_name
(
void
)
{
return
"APPLY"
;
}
typedef
return_t
(
*
recurse_func_t
)
(
hb_apply_context_t
*
c
,
unsigned
int
lookup_index
);
typedef
return_t
(
*
recurse_func_t
)
(
hb_
ot_
apply_context_t
*
c
,
unsigned
int
lookup_index
);
template
<
typename
T
>
inline
return_t
dispatch
(
const
T
&
obj
)
{
return
obj
.
apply
(
this
);
}
static
return_t
default_return_value
(
void
)
{
return
false
;
}
...
...
@@ -444,7 +444,7 @@ struct hb_apply_context_t :
bool
has_glyph_classes
;
hb_apply_context_t
(
unsigned
int
table_index_
,
hb_
ot_
apply_context_t
(
unsigned
int
table_index_
,
hb_font_t
*
font_
,
hb_buffer_t
*
buffer_
)
:
iter_input
(),
iter_context
(),
...
...
@@ -670,7 +670,7 @@ static inline bool would_match_input (hb_would_apply_context_t *c,
return
true
;
}
static
inline
bool
match_input
(
hb_apply_context_t
*
c
,
static
inline
bool
match_input
(
hb_
ot_
apply_context_t
*
c
,
unsigned
int
count
,
/* Including the first glyph (not matched) */
const
HBUINT16
input
[],
/* Array of input values--start with second glyph */
match_func_t
match_func
,
...
...
@@ -686,7 +686,7 @@ static inline bool match_input (hb_apply_context_t *c,
hb_buffer_t
*
buffer
=
c
->
buffer
;
hb_apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_input
;
hb_
ot_
apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_input
;
skippy_iter
.
reset
(
buffer
->
idx
,
count
-
1
);
skippy_iter
.
set_match_func
(
match_func
,
match_data
,
input
);
...
...
@@ -763,7 +763,7 @@ static inline bool match_input (hb_apply_context_t *c,
j
--
;
}
if
(
found
&&
skippy_iter
.
may_skip
(
c
,
out
[
j
])
==
hb_apply_context_t
::
matcher_t
::
SKIP_YES
)
if
(
found
&&
skippy_iter
.
may_skip
(
c
,
out
[
j
])
==
hb_
ot_
apply_context_t
::
matcher_t
::
SKIP_YES
)
ligbase
=
LIGBASE_MAY_SKIP
;
else
ligbase
=
LIGBASE_MAY_NOT_SKIP
;
...
...
@@ -796,7 +796,7 @@ static inline bool match_input (hb_apply_context_t *c,
return_trace
(
true
);
}
static
inline
bool
ligate_input
(
hb_apply_context_t
*
c
,
static
inline
bool
ligate_input
(
hb_
ot_
apply_context_t
*
c
,
unsigned
int
count
,
/* Including the first glyph */
unsigned
int
match_positions
[
HB_MAX_CONTEXT_LENGTH
],
/* Including the first glyph */
unsigned
int
match_length
,
...
...
@@ -894,7 +894,7 @@ static inline bool ligate_input (hb_apply_context_t *c,
return_trace
(
true
);
}
static
inline
bool
match_backtrack
(
hb_apply_context_t
*
c
,
static
inline
bool
match_backtrack
(
hb_
ot_
apply_context_t
*
c
,
unsigned
int
count
,
const
HBUINT16
backtrack
[],
match_func_t
match_func
,
...
...
@@ -903,7 +903,7 @@ static inline bool match_backtrack (hb_apply_context_t *c,
{
TRACE_APPLY
(
nullptr
);
hb_apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_context
;
hb_
ot_
apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_context
;
skippy_iter
.
reset
(
c
->
buffer
->
backtrack_len
(),
count
);
skippy_iter
.
set_match_func
(
match_func
,
match_data
,
backtrack
);
...
...
@@ -916,7 +916,7 @@ static inline bool match_backtrack (hb_apply_context_t *c,
return_trace
(
true
);
}
static
inline
bool
match_lookahead
(
hb_apply_context_t
*
c
,
static
inline
bool
match_lookahead
(
hb_
ot_
apply_context_t
*
c
,
unsigned
int
count
,
const
HBUINT16
lookahead
[],
match_func_t
match_func
,
...
...
@@ -926,7 +926,7 @@ static inline bool match_lookahead (hb_apply_context_t *c,
{
TRACE_APPLY
(
nullptr
);
hb_apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_context
;
hb_
ot_
apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
->
iter_context
;
skippy_iter
.
reset
(
c
->
buffer
->
idx
+
offset
-
1
,
count
);
skippy_iter
.
set_match_func
(
match_func
,
match_data
,
lookahead
);
...
...
@@ -967,7 +967,7 @@ static inline void recurse_lookups (context_t *c,
c
->
recurse
(
lookupRecord
[
i
].
lookupListIndex
);
}
static
inline
bool
apply_lookup
(
hb_apply_context_t
*
c
,
static
inline
bool
apply_lookup
(
hb_
ot_
apply_context_t
*
c
,
unsigned
int
count
,
/* Including the first glyph */
unsigned
int
match_positions
[
HB_MAX_CONTEXT_LENGTH
],
/* Including the first glyph */
unsigned
int
lookupCount
,
...
...
@@ -1149,7 +1149,7 @@ static inline bool context_would_apply_lookup (hb_would_apply_context_t *c,
inputCount
,
input
,
lookup_context
.
funcs
.
match
,
lookup_context
.
match_data
);
}
static
inline
bool
context_apply_lookup
(
hb_apply_context_t
*
c
,
static
inline
bool
context_apply_lookup
(
hb_
ot_
apply_context_t
*
c
,
unsigned
int
inputCount
,
/* Including the first glyph (not matched) */
const
HBUINT16
input
[],
/* Array of input values--start with second glyph */
unsigned
int
lookupCount
,
...
...
@@ -1198,7 +1198,7 @@ struct Rule
return_trace
(
context_would_apply_lookup
(
c
,
inputCount
,
inputZ
,
lookupCount
,
lookupRecord
,
lookup_context
));
}
inline
bool
apply
(
hb_apply_context_t
*
c
,
ContextApplyLookupContext
&
lookup_context
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
,
ContextApplyLookupContext
&
lookup_context
)
const
{
TRACE_APPLY
(
this
);
const
LookupRecord
*
lookupRecord
=
&
StructAtOffset
<
LookupRecord
>
(
inputZ
,
inputZ
[
0
].
static_size
*
(
inputCount
?
inputCount
-
1
:
0
));
...
...
@@ -1259,7 +1259,7 @@ struct RuleSet
return_trace
(
false
);
}
inline
bool
apply
(
hb_apply_context_t
*
c
,
ContextApplyLookupContext
&
lookup_context
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
,
ContextApplyLookupContext
&
lookup_context
)
const
{
TRACE_APPLY
(
this
);
unsigned
int
num_rules
=
rule
.
len
;
...
...
@@ -1339,7 +1339,7 @@ struct ContextFormat1
return
this
+
coverage
;
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
unsigned
int
index
=
(
this
+
coverage
).
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
...
...
@@ -1431,7 +1431,7 @@ struct ContextFormat2
return
this
+
coverage
;
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
unsigned
int
index
=
(
this
+
coverage
).
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
...
...
@@ -1522,7 +1522,7 @@ struct ContextFormat3
return
this
+
coverageZ
[
0
];
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
unsigned
int
index
=
(
this
+
coverageZ
[
0
]).
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
...
...
@@ -1673,7 +1673,7 @@ static inline bool chain_context_would_apply_lookup (hb_would_apply_context_t *c
lookup_context
.
funcs
.
match
,
lookup_context
.
match_data
[
1
]);
}
static
inline
bool
chain_context_apply_lookup
(
hb_apply_context_t
*
c
,
static
inline
bool
chain_context_apply_lookup
(
hb_
ot_
apply_context_t
*
c
,
unsigned
int
backtrackCount
,
const
HBUINT16
backtrack
[],
unsigned
int
inputCount
,
/* Including the first glyph (not matched) */
...
...
@@ -1748,7 +1748,7 @@ struct ChainRule
lookup
.
array
,
lookup_context
));
}
inline
bool
apply
(
hb_apply_context_t
*
c
,
ChainContextApplyLookupContext
&
lookup_context
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
,
ChainContextApplyLookupContext
&
lookup_context
)
const
{
TRACE_APPLY
(
this
);
const
HeadlessArrayOf
<
HBUINT16
>
&
input
=
StructAfter
<
HeadlessArrayOf
<
HBUINT16
>
>
(
backtrack
);
...
...
@@ -1820,7 +1820,7 @@ struct ChainRuleSet
return_trace
(
false
);
}
inline
bool
apply
(
hb_apply_context_t
*
c
,
ChainContextApplyLookupContext
&
lookup_context
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
,
ChainContextApplyLookupContext
&
lookup_context
)
const
{
TRACE_APPLY
(
this
);
unsigned
int
num_rules
=
rule
.
len
;
...
...
@@ -1897,7 +1897,7 @@ struct ChainContextFormat1
return
this
+
coverage
;
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
unsigned
int
index
=
(
this
+
coverage
).
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
...
...
@@ -2001,7 +2001,7 @@ struct ChainContextFormat2
return
this
+
coverage
;
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
unsigned
int
index
=
(
this
+
coverage
).
get_coverage
(
c
->
buffer
->
cur
().
codepoint
);
...
...
@@ -2125,7 +2125,7 @@ struct ChainContextFormat3
return
this
+
input
[
0
];
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
inline
bool
apply
(
hb_
ot_
apply_context_t
*
c
)
const
{
TRACE_APPLY
(
this
);
const
OffsetArrayOf
<
Coverage
>
&
input
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
backtrack
);
...
...
src/hb-ot-layout-private.hh
浏览文件 @
fd034490
...
...
@@ -90,12 +90,12 @@ hb_ot_layout_substitute_start (hb_font_t *font,
struct
hb_ot_layout_lookup_accelerator_t
;
namespace
OT
{
struct
hb_apply_context_t
;
struct
hb_
ot_
apply_context_t
;
struct
SubstLookup
;
}
HB_INTERNAL
void
hb_ot_layout_substitute_lookup
(
OT
::
hb_apply_context_t
*
c
,
hb_ot_layout_substitute_lookup
(
OT
::
hb_
ot_
apply_context_t
*
c
,
const
OT
::
SubstLookup
&
lookup
,
const
hb_ot_layout_lookup_accelerator_t
&
accel
);
...
...
src/hb-ot-layout.cc
浏览文件 @
fd034490
...
...
@@ -1057,13 +1057,13 @@ struct hb_get_subtables_context_t :
OT
::
hb_dispatch_context_t
<
hb_get_subtables_context_t
,
hb_void_t
,
HB_DEBUG_APPLY
>
{
template
<
typename
Type
>
static
inline
bool
apply_to
(
const
void
*
obj
,
OT
::
hb_apply_context_t
*
c
)
static
inline
bool
apply_to
(
const
void
*
obj
,
OT
::
hb_
ot_
apply_context_t
*
c
)
{
const
Type
*
typed_obj
=
(
const
Type
*
)
obj
;
return
typed_obj
->
apply
(
c
);
}
typedef
bool
(
*
hb_apply_func_t
)
(
const
void
*
obj
,
OT
::
hb_apply_context_t
*
c
);
typedef
bool
(
*
hb_apply_func_t
)
(
const
void
*
obj
,
OT
::
hb_
ot_
apply_context_t
*
c
);
struct
hb_applicable_t
{
...
...
@@ -1073,7 +1073,7 @@ struct hb_get_subtables_context_t :
apply_func
=
apply_func_
;
}
inline
bool
apply
(
OT
::
hb_apply_context_t
*
c
)
const
{
return
apply_func
(
obj
,
c
);
}
inline
bool
apply
(
OT
::
hb_
ot_
apply_context_t
*
c
)
const
{
return
apply_func
(
obj
,
c
);
}
private:
const
void
*
obj
;
...
...
@@ -1104,7 +1104,7 @@ struct hb_get_subtables_context_t :
};
static
inline
bool
apply_forward
(
OT
::
hb_apply_context_t
*
c
,
apply_forward
(
OT
::
hb_
ot_
apply_context_t
*
c
,
const
hb_ot_layout_lookup_accelerator_t
&
accel
,
const
hb_get_subtables_context_t
::
array_t
&
subtables
)
{
...
...
@@ -1134,7 +1134,7 @@ apply_forward (OT::hb_apply_context_t *c,
}
static
inline
bool
apply_backward
(
OT
::
hb_apply_context_t
*
c
,
apply_backward
(
OT
::
hb_
ot_
apply_context_t
*
c
,
const
hb_ot_layout_lookup_accelerator_t
&
accel
,
const
hb_get_subtables_context_t
::
array_t
&
subtables
)
{
...
...
@@ -1163,7 +1163,7 @@ apply_backward (OT::hb_apply_context_t *c,
template
<
typename
Proxy
>
static
inline
void
apply_string
(
OT
::
hb_apply_context_t
*
c
,
apply_string
(
OT
::
hb_
ot_
apply_context_t
*
c
,
const
typename
Proxy
::
Lookup
&
lookup
,
const
hb_ot_layout_lookup_accelerator_t
&
accel
)
{
...
...
@@ -1214,7 +1214,7 @@ inline void hb_ot_map_t::apply (const Proxy &proxy,
{
const
unsigned
int
table_index
=
proxy
.
table_index
;
unsigned
int
i
=
0
;
OT
::
hb_apply_context_t
c
(
table_index
,
font
,
buffer
);
OT
::
hb_
ot_
apply_context_t
c
(
table_index
,
font
,
buffer
);
c
.
set_recurse_func
(
Proxy
::
Lookup
::
apply_recurse_func
);
for
(
unsigned
int
stage_index
=
0
;
stage_index
<
stages
[
table_index
].
len
;
stage_index
++
)
{
...
...
@@ -1254,7 +1254,7 @@ void hb_ot_map_t::position (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_
}
HB_INTERNAL
void
hb_ot_layout_substitute_lookup
(
OT
::
hb_apply_context_t
*
c
,
hb_ot_layout_substitute_lookup
(
OT
::
hb_
ot_
apply_context_t
*
c
,
const
OT
::
SubstLookup
&
lookup
,
const
hb_ot_layout_lookup_accelerator_t
&
accel
)
{
...
...
src/hb-ot-shape-complex-arabic-fallback.hh
浏览文件 @
fd034490
...
...
@@ -340,7 +340,7 @@ arabic_fallback_plan_shape (arabic_fallback_plan_t *fallback_plan,
hb_font_t
*
font
,
hb_buffer_t
*
buffer
)
{
OT
::
hb_apply_context_t
c
(
0
,
font
,
buffer
);
OT
::
hb_
ot_
apply_context_t
c
(
0
,
font
,
buffer
);
for
(
unsigned
int
i
=
0
;
i
<
fallback_plan
->
num_lookups
;
i
++
)
if
(
fallback_plan
->
lookup_array
[
i
])
{
c
.
set_lookup_mask
(
fallback_plan
->
mask_array
[
i
]);
...
...
src/hb-ot-shape-fallback.cc
浏览文件 @
fd034490
...
...
@@ -442,10 +442,10 @@ _hb_ot_shape_fallback_kern (const hb_ot_shape_plan_t *plan,
{
if
(
!
plan
->
has_kern
)
return
;
OT
::
hb_apply_context_t
c
(
1
,
font
,
buffer
);
OT
::
hb_
ot_
apply_context_t
c
(
1
,
font
,
buffer
);
c
.
set_lookup_mask
(
plan
->
kern_mask
);
c
.
set_lookup_props
(
OT
::
LookupFlag
::
IgnoreMarks
);
OT
::
hb_apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
.
iter_input
;
OT
::
hb_
ot_
apply_context_t
::
skipping_iterator_t
&
skippy_iter
=
c
.
iter_input
;
skippy_iter
.
init
(
&
c
);
unsigned
int
count
=
buffer
->
len
;
...
...
src/hb-ot-shape.cc
浏览文件 @
fd034490
...
...
@@ -619,7 +619,7 @@ hb_ot_substitute_complex (hb_ot_shape_context_t *c)
c
->
plan
->
substitute
(
c
->
font
,
buffer
);
/* XXX Call morx instead. */
//OT::hb_apply_context_t ac (0, c->font, c->buffer);
//OT::hb_
ot_
apply_context_t ac (0, c->font, c->buffer);
//hb_aat_layout_substitute (&ac);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录