Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
8303593b
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看板
提交
8303593b
编写于
12月 04, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor
Use pointers instead of references, in preparation for upcoming change.
上级
1bcfa06d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
48 addition
and
48 deletion
+48
-48
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gpos-table.hh
+14
-14
src/hb-ot-layout-gsub-table.hh
src/hb-ot-layout-gsub-table.hh
+15
-15
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+19
-19
未找到文件。
src/hb-ot-layout-gpos-table.hh
浏览文件 @
8303593b
...
...
@@ -422,7 +422,7 @@ struct SinglePosFormat1
inline
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
TRACE_COLLECT_GLYPHS
(
this
);
(
this
+
coverage
).
add_coverage
(
&
c
->
input
);
(
this
+
coverage
).
add_coverage
(
c
->
input
);
}
inline
const
Coverage
&
get_coverage
(
void
)
const
...
...
@@ -467,7 +467,7 @@ struct SinglePosFormat2
inline
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
TRACE_COLLECT_GLYPHS
(
this
);
(
this
+
coverage
).
add_coverage
(
&
c
->
input
);
(
this
+
coverage
).
add_coverage
(
c
->
input
);
}
inline
const
Coverage
&
get_coverage
(
void
)
const
...
...
@@ -572,7 +572,7 @@ struct PairSet
unsigned
int
count
=
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
c
->
input
.
add
(
record
->
secondGlyph
);
c
->
input
->
add
(
record
->
secondGlyph
);
record
=
&
StructAtOffset
<
PairValueRecord
>
(
record
,
record_size
);
}
}
...
...
@@ -638,7 +638,7 @@ struct PairPosFormat1
inline
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
TRACE_COLLECT_GLYPHS
(
this
);
(
this
+
coverage
).
add_coverage
(
&
c
->
input
);
(
this
+
coverage
).
add_coverage
(
c
->
input
);
unsigned
int
count
=
pairSet
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
(
this
+
pairSet
[
i
]).
collect_glyphs
(
c
,
&
valueFormat1
);
...
...
@@ -701,19 +701,19 @@ struct PairPosFormat2
inline
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
TRACE_COLLECT_GLYPHS
(
this
);
/* (this+coverage).add_coverage (
&
c->input); // Don't need this. */
/* (this+coverage).add_coverage (c->input); // Don't need this. */
/* TODO only add values for pairs that have nonzero adjustments. */
unsigned
int
count1
=
class1Count
;
const
ClassDef
&
klass1
=
this
+
classDef1
;
for
(
unsigned
int
i
=
0
;
i
<
count1
;
i
++
)
klass1
.
add_class
(
&
c
->
input
,
i
);
klass1
.
add_class
(
c
->
input
,
i
);
unsigned
int
count2
=
class2Count
;
const
ClassDef
&
klass2
=
this
+
classDef2
;
for
(
unsigned
int
i
=
0
;
i
<
count2
;
i
++
)
klass2
.
add_class
(
&
c
->
input
,
i
);
klass2
.
add_class
(
c
->
input
,
i
);
}
inline
const
Coverage
&
get_coverage
(
void
)
const
...
...
@@ -859,7 +859,7 @@ struct CursivePosFormat1
inline
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
TRACE_COLLECT_GLYPHS
(
this
);
(
this
+
coverage
).
add_coverage
(
&
c
->
input
);
(
this
+
coverage
).
add_coverage
(
c
->
input
);
}
inline
const
Coverage
&
get_coverage
(
void
)
const
...
...
@@ -1005,8 +1005,8 @@ struct MarkBasePosFormat1
inline
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
TRACE_COLLECT_GLYPHS
(
this
);
(
this
+
markCoverage
).
add_coverage
(
&
c
->
input
);
(
this
+
baseCoverage
).
add_coverage
(
&
c
->
input
);
(
this
+
markCoverage
).
add_coverage
(
c
->
input
);
(
this
+
baseCoverage
).
add_coverage
(
c
->
input
);
/* TODO only add combinations that have nonzero adjustment. */
}
...
...
@@ -1109,8 +1109,8 @@ struct MarkLigPosFormat1
inline
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
TRACE_COLLECT_GLYPHS
(
this
);
(
this
+
markCoverage
).
add_coverage
(
&
c
->
input
);
(
this
+
ligatureCoverage
).
add_coverage
(
&
c
->
input
);
(
this
+
markCoverage
).
add_coverage
(
c
->
input
);
(
this
+
ligatureCoverage
).
add_coverage
(
c
->
input
);
/* TODO only add combinations that have nonzero adjustment. */
}
...
...
@@ -1225,8 +1225,8 @@ struct MarkMarkPosFormat1
inline
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
TRACE_COLLECT_GLYPHS
(
this
);
(
this
+
mark1Coverage
).
add_coverage
(
&
c
->
input
);
(
this
+
mark2Coverage
).
add_coverage
(
&
c
->
input
);
(
this
+
mark1Coverage
).
add_coverage
(
c
->
input
);
(
this
+
mark2Coverage
).
add_coverage
(
c
->
input
);
/* TODO only add combinations that have nonzero adjustment. */
}
...
...
src/hb-ot-layout-gsub-table.hh
浏览文件 @
8303593b
...
...
@@ -54,8 +54,8 @@ struct SingleSubstFormat1
Coverage
::
Iter
iter
;
for
(
iter
.
init
(
this
+
coverage
);
iter
.
more
();
iter
.
next
())
{
hb_codepoint_t
glyph_id
=
iter
.
get_glyph
();
c
->
input
.
add
(
glyph_id
);
c
->
output
.
add
((
glyph_id
+
deltaGlyphID
)
&
0xFFFF
);
c
->
input
->
add
(
glyph_id
);
c
->
output
->
add
((
glyph_id
+
deltaGlyphID
)
&
0xFFFF
);
}
}
...
...
@@ -130,8 +130,8 @@ struct SingleSubstFormat2
TRACE_COLLECT_GLYPHS
(
this
);
Coverage
::
Iter
iter
;
for
(
iter
.
init
(
this
+
coverage
);
iter
.
more
();
iter
.
next
())
{
c
->
input
.
add
(
iter
.
get_glyph
());
c
->
output
.
add
(
substitute
[
iter
.
get_coverage
()]);
c
->
input
->
add
(
iter
.
get_glyph
());
c
->
output
->
add
(
substitute
[
iter
.
get_coverage
()]);
}
}
...
...
@@ -264,7 +264,7 @@ struct Sequence
TRACE_COLLECT_GLYPHS
(
this
);
unsigned
int
count
=
substitute
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
c
->
output
.
add
(
substitute
[
i
]);
c
->
output
->
add
(
substitute
[
i
]);
}
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
...
...
@@ -320,7 +320,7 @@ struct MultipleSubstFormat1
inline
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
TRACE_COLLECT_GLYPHS
(
this
);
(
this
+
coverage
).
add_coverage
(
&
c
->
input
);
(
this
+
coverage
).
add_coverage
(
c
->
input
);
unsigned
int
count
=
sequence
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
(
this
+
sequence
[
i
]).
collect_glyphs
(
c
);
...
...
@@ -451,11 +451,11 @@ struct AlternateSubstFormat1
TRACE_COLLECT_GLYPHS
(
this
);
Coverage
::
Iter
iter
;
for
(
iter
.
init
(
this
+
coverage
);
iter
.
more
();
iter
.
next
())
{
c
->
input
.
add
(
iter
.
get_glyph
());
c
->
input
->
add
(
iter
.
get_glyph
());
const
AlternateSet
&
alt_set
=
this
+
alternateSet
[
iter
.
get_coverage
()];
unsigned
int
count
=
alt_set
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
c
->
output
.
add
(
alt_set
[
i
]);
c
->
output
->
add
(
alt_set
[
i
]);
}
}
...
...
@@ -595,8 +595,8 @@ struct Ligature
TRACE_COLLECT_GLYPHS
(
this
);
unsigned
int
count
=
component
.
len
;
for
(
unsigned
int
i
=
1
;
i
<
count
;
i
++
)
c
->
input
.
add
(
component
[
i
]);
c
->
output
.
add
(
ligGlyph
);
c
->
input
->
add
(
component
[
i
]);
c
->
output
->
add
(
ligGlyph
);
}
inline
bool
would_apply
(
hb_would_apply_context_t
*
c
)
const
...
...
@@ -767,7 +767,7 @@ struct LigatureSubstFormat1
TRACE_COLLECT_GLYPHS
(
this
);
Coverage
::
Iter
iter
;
for
(
iter
.
init
(
this
+
coverage
);
iter
.
more
();
iter
.
next
())
{
c
->
input
.
add
(
iter
.
get_glyph
());
c
->
input
->
add
(
iter
.
get_glyph
());
(
this
+
ligatureSet
[
iter
.
get_coverage
()]).
collect_glyphs
(
c
);
}
}
...
...
@@ -933,20 +933,20 @@ struct ReverseChainSingleSubstFormat1
unsigned
int
count
;
(
this
+
coverage
).
add_coverage
(
&
c
->
input
);
(
this
+
coverage
).
add_coverage
(
c
->
input
);
count
=
backtrack
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
(
this
+
backtrack
[
i
]).
add_coverage
(
&
c
->
before
);
(
this
+
backtrack
[
i
]).
add_coverage
(
c
->
before
);
count
=
lookahead
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
(
this
+
lookahead
[
i
]).
add_coverage
(
&
c
->
after
);
(
this
+
lookahead
[
i
]).
add_coverage
(
c
->
after
);
const
ArrayOf
<
GlyphID
>
&
substitute
=
StructAfter
<
ArrayOf
<
GlyphID
>
>
(
lookahead
);
count
=
substitute
.
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
c
->
output
.
add
(
substitute
[
i
]);
c
->
output
->
add
(
substitute
[
i
]);
}
inline
const
Coverage
&
get_coverage
(
void
)
const
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
8303593b
...
...
@@ -162,17 +162,17 @@ struct hb_collect_glyphs_context_t
nesting_level_left
--
;
/* Only collect output glyphs in the recursion. */
hb_collect_glyphs_context_t
new_c
(
this
->
face
,
NULL
,
NULL
,
NULL
,
&
output
,
nesting_level_left
);
hb_collect_glyphs_context_t
new_c
(
this
->
face
,
NULL
,
NULL
,
NULL
,
output
,
nesting_level_left
);
recurse_func
(
&
new_c
,
lookup_index
);
nesting_level_left
++
;
return
VOID
;
}
hb_face_t
*
face
;
hb_set_t
&
before
;
hb_set_t
&
input
;
hb_set_t
&
after
;
hb_set_t
&
output
;
hb_set_t
*
before
;
hb_set_t
*
input
;
hb_set_t
*
after
;
hb_set_t
*
output
;
recurse_func_t
recurse_func
;
unsigned
int
nesting_level_left
;
unsigned
int
debug_depth
;
...
...
@@ -184,10 +184,10 @@ struct hb_collect_glyphs_context_t
hb_set_t
*
glyphs_output
,
/* OUT. May be NULL */
unsigned
int
nesting_level_left_
=
MAX_NESTING_LEVEL
)
:
face
(
face_
),
before
(
glyphs_before
?
*
glyphs_before
:
*
hb_set_get_empty
()),
input
(
glyphs_input
?
*
glyphs_input
:
*
hb_set_get_empty
()),
after
(
glyphs_after
?
*
glyphs_after
:
*
hb_set_get_empty
()),
output
(
glyphs_output
?
*
glyphs_output
:
*
hb_set_get_empty
()),
before
(
glyphs_before
?
glyphs_before
:
hb_set_get_empty
()),
input
(
glyphs_input
?
glyphs_input
:
hb_set_get_empty
()),
after
(
glyphs_after
?
glyphs_after
:
hb_set_get_empty
()),
output
(
glyphs_output
?
glyphs_output
:
hb_set_get_empty
()),
recurse_func
(
NULL
),
nesting_level_left
(
nesting_level_left_
),
debug_depth
(
0
)
{}
...
...
@@ -918,7 +918,7 @@ static inline void context_collect_glyphs_lookup (hb_collect_glyphs_context_t *c
const
LookupRecord
lookupRecord
[],
ContextCollectGlyphsLookupContext
&
lookup_context
)
{
collect_array
(
c
,
&
c
->
input
,
collect_array
(
c
,
c
->
input
,
inputCount
?
inputCount
-
1
:
0
,
input
,
lookup_context
.
funcs
.
collect
,
lookup_context
.
collect_data
);
recurse_lookups
(
c
,
...
...
@@ -1090,7 +1090,7 @@ struct ContextFormat1
inline
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
TRACE_COLLECT_GLYPHS
(
this
);
(
this
+
coverage
).
add_coverage
(
&
c
->
input
);
(
this
+
coverage
).
add_coverage
(
c
->
input
);
struct
ContextCollectGlyphsLookupContext
lookup_context
=
{
{
collect_glyph
},
...
...
@@ -1178,7 +1178,7 @@ struct ContextFormat2
inline
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
TRACE_COLLECT_GLYPHS
(
this
);
(
this
+
coverage
).
add_coverage
(
&
c
->
input
);
(
this
+
coverage
).
add_coverage
(
c
->
input
);
struct
ContextCollectGlyphsLookupContext
lookup_context
=
{
{
collect_class
},
...
...
@@ -1268,7 +1268,7 @@ struct ContextFormat3
inline
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
TRACE_COLLECT_GLYPHS
(
this
);
(
this
+
coverage
[
0
]).
add_coverage
(
&
c
->
input
);
(
this
+
coverage
[
0
]).
add_coverage
(
c
->
input
);
const
LookupRecord
*
lookupRecord
=
&
StructAtOffset
<
LookupRecord
>
(
coverage
,
coverage
[
0
].
static_size
*
glyphCount
);
struct
ContextCollectGlyphsLookupContext
lookup_context
=
{
...
...
@@ -1428,13 +1428,13 @@ static inline void chain_context_collect_glyphs_lookup (hb_collect_glyphs_contex
const
LookupRecord
lookupRecord
[],
ChainContextCollectGlyphsLookupContext
&
lookup_context
)
{
collect_array
(
c
,
&
c
->
before
,
collect_array
(
c
,
c
->
before
,
backtrackCount
,
backtrack
,
lookup_context
.
funcs
.
collect
,
lookup_context
.
collect_data
[
0
]);
collect_array
(
c
,
&
c
->
input
,
collect_array
(
c
,
c
->
input
,
inputCount
?
inputCount
-
1
:
0
,
input
,
lookup_context
.
funcs
.
collect
,
lookup_context
.
collect_data
[
1
]);
collect_array
(
c
,
&
c
->
after
,
collect_array
(
c
,
c
->
after
,
lookaheadCount
,
lookahead
,
lookup_context
.
funcs
.
collect
,
lookup_context
.
collect_data
[
2
]);
recurse_lookups
(
c
,
...
...
@@ -1647,7 +1647,7 @@ struct ChainContextFormat1
inline
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
TRACE_COLLECT_GLYPHS
(
this
);
(
this
+
coverage
).
add_coverage
(
&
c
->
input
);
(
this
+
coverage
).
add_coverage
(
c
->
input
);
struct
ChainContextCollectGlyphsLookupContext
lookup_context
=
{
{
collect_glyph
},
...
...
@@ -1737,7 +1737,7 @@ struct ChainContextFormat2
inline
void
collect_glyphs
(
hb_collect_glyphs_context_t
*
c
)
const
{
TRACE_COLLECT_GLYPHS
(
this
);
(
this
+
coverage
).
add_coverage
(
&
c
->
input
);
(
this
+
coverage
).
add_coverage
(
c
->
input
);
struct
ChainContextCollectGlyphsLookupContext
lookup_context
=
{
{
collect_class
},
...
...
@@ -1850,7 +1850,7 @@ struct ChainContextFormat3
TRACE_COLLECT_GLYPHS
(
this
);
const
OffsetArrayOf
<
Coverage
>
&
input
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
backtrack
);
(
this
+
input
[
0
]).
add_coverage
(
&
c
->
input
);
(
this
+
input
[
0
]).
add_coverage
(
c
->
input
);
const
OffsetArrayOf
<
Coverage
>
&
lookahead
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
input
);
const
ArrayOf
<
LookupRecord
>
&
lookup
=
StructAfter
<
ArrayOf
<
LookupRecord
>
>
(
lookahead
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录