Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
7e53ebe4
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看板
提交
7e53ebe4
编写于
5月 14, 2010
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove the IN_CURGLYPH() macro
上级
d784da19
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
35 addition
and
38 deletion
+35
-38
src/hb-buffer-private.hh
src/hb-buffer-private.hh
+0
-3
src/hb-ot-layout-gpos-private.hh
src/hb-ot-layout-gpos-private.hh
+12
-12
src/hb-ot-layout-gsub-private.hh
src/hb-ot-layout-gsub-private.hh
+8
-8
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+8
-8
src/hb-shape.cc
src/hb-shape.cc
+7
-7
未找到文件。
src/hb-buffer-private.hh
浏览文件 @
7e53ebe4
...
...
@@ -155,9 +155,6 @@ struct _hb_buffer_t {
#define BUFFER buffer
#endif
/* convenience macros */
#define IN_CURGLYPH() (BUFFER->in_string[BUFFER->in_pos].codepoint)
HB_END_DECLS
#endif
/* HB_BUFFER_PRIVATE_H */
src/hb-ot-layout-gpos-private.hh
浏览文件 @
7e53ebe4
...
...
@@ -403,7 +403,7 @@ struct MarkArray : ArrayOf<MarkRecord> /* Array of MarkRecords--in Coverage orde
hb_position_t
mark_x
,
mark_y
,
base_x
,
base_y
;
mark_anchor
.
get_anchor
(
c
->
layout
,
IN_CURGLYPH
()
,
&
mark_x
,
&
mark_y
);
mark_anchor
.
get_anchor
(
c
->
layout
,
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
,
&
mark_x
,
&
mark_y
);
glyph_anchor
.
get_anchor
(
c
->
layout
,
c
->
buffer
->
in_string
[
glyph_pos
].
codepoint
,
&
base_x
,
&
base_y
);
hb_internal_glyph_position_t
&
o
=
c
->
buffer
->
positions
[
c
->
buffer
->
in_pos
];
...
...
@@ -434,7 +434,7 @@ struct SinglePosFormat1
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
TRACE_APPLY
();
unsigned
int
index
=
(
this
+
coverage
)
(
IN_CURGLYPH
()
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
false
;
...
...
@@ -473,7 +473,7 @@ struct SinglePosFormat2
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
TRACE_APPLY
();
unsigned
int
index
=
(
this
+
coverage
)
(
IN_CURGLYPH
()
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
false
;
...
...
@@ -627,7 +627,7 @@ struct PairPosFormat1
if
(
unlikely
(
c
->
buffer
->
in_pos
+
2
>
end
))
return
false
;
unsigned
int
index
=
(
this
+
coverage
)
(
IN_CURGLYPH
()
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
false
;
...
...
@@ -689,7 +689,7 @@ struct PairPosFormat2
if
(
unlikely
(
c
->
buffer
->
in_pos
+
2
>
end
))
return
false
;
unsigned
int
index
=
(
this
+
coverage
)
(
IN_CURGLYPH
()
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
false
;
...
...
@@ -705,7 +705,7 @@ struct PairPosFormat2
unsigned
int
len2
=
valueFormat2
.
get_len
();
unsigned
int
record_len
=
len1
+
len2
;
unsigned
int
klass1
=
(
this
+
classDef1
)
(
IN_CURGLYPH
()
);
unsigned
int
klass1
=
(
this
+
classDef1
)
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
unsigned
int
klass2
=
(
this
+
classDef2
)
(
c
->
buffer
->
in_string
[
j
].
codepoint
);
if
(
unlikely
(
klass1
>=
class1Count
||
klass2
>=
class2Count
))
return
false
;
...
...
@@ -958,7 +958,7 @@ struct CursivePosFormat1
if
(
c
->
property
==
HB_OT_LAYOUT_GLYPH_CLASS_MARK
)
return
false
;
unsigned
int
index
=
(
this
+
coverage
)
(
IN_CURGLYPH
()
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
false
;
...
...
@@ -968,7 +968,7 @@ struct CursivePosFormat1
goto
end
;
hb_position_t
entry_x
,
entry_y
;
(
this
+
record
.
entryAnchor
).
get_anchor
(
c
->
layout
,
IN_CURGLYPH
()
,
&
entry_x
,
&
entry_y
);
(
this
+
record
.
entryAnchor
).
get_anchor
(
c
->
layout
,
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
,
&
entry_x
,
&
entry_y
);
/* TODO vertical */
...
...
@@ -998,7 +998,7 @@ struct CursivePosFormat1
if
(
record
.
exitAnchor
)
{
gpi
->
last
=
c
->
buffer
->
in_pos
;
(
this
+
record
.
exitAnchor
).
get_anchor
(
c
->
layout
,
IN_CURGLYPH
()
,
&
gpi
->
anchor_x
,
&
gpi
->
anchor_y
);
(
this
+
record
.
exitAnchor
).
get_anchor
(
c
->
layout
,
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
,
&
gpi
->
anchor_x
,
&
gpi
->
anchor_y
);
}
c
->
buffer
->
in_pos
++
;
...
...
@@ -1067,7 +1067,7 @@ struct MarkBasePosFormat1
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
TRACE_APPLY
();
unsigned
int
mark_index
=
(
this
+
markCoverage
)
(
IN_CURGLYPH
()
);
unsigned
int
mark_index
=
(
this
+
markCoverage
)
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
if
(
likely
(
mark_index
==
NOT_COVERED
))
return
false
;
...
...
@@ -1169,7 +1169,7 @@ struct MarkLigPosFormat1
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
TRACE_APPLY
();
unsigned
int
mark_index
=
(
this
+
markCoverage
)
(
IN_CURGLYPH
()
);
unsigned
int
mark_index
=
(
this
+
markCoverage
)
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
if
(
likely
(
mark_index
==
NOT_COVERED
))
return
false
;
...
...
@@ -1288,7 +1288,7 @@ struct MarkMarkPosFormat1
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
TRACE_APPLY
();
unsigned
int
mark1_index
=
(
this
+
mark1Coverage
)
(
IN_CURGLYPH
()
);
unsigned
int
mark1_index
=
(
this
+
mark1Coverage
)
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
if
(
likely
(
mark1_index
==
NOT_COVERED
))
return
false
;
...
...
src/hb-ot-layout-gsub-private.hh
浏览文件 @
7e53ebe4
...
...
@@ -43,7 +43,7 @@ struct SingleSubstFormat1
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
TRACE_APPLY
();
hb_codepoint_t
glyph_id
=
IN_CURGLYPH
()
;
hb_codepoint_t
glyph_id
=
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
;
unsigned
int
index
=
(
this
+
coverage
)
(
glyph_id
);
if
(
likely
(
index
==
NOT_COVERED
))
return
false
;
...
...
@@ -84,7 +84,7 @@ struct SingleSubstFormat2
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
TRACE_APPLY
();
hb_codepoint_t
glyph_id
=
IN_CURGLYPH
()
;
hb_codepoint_t
glyph_id
=
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
;
unsigned
int
index
=
(
this
+
coverage
)
(
glyph_id
);
if
(
likely
(
index
==
NOT_COVERED
))
return
false
;
...
...
@@ -208,7 +208,7 @@ struct MultipleSubstFormat1
{
TRACE_APPLY
();
unsigned
int
index
=
(
this
+
coverage
)
(
IN_CURGLYPH
()
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
false
;
...
...
@@ -277,7 +277,7 @@ struct AlternateSubstFormat1
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
TRACE_APPLY
();
hb_codepoint_t
glyph_id
=
IN_CURGLYPH
()
;
hb_codepoint_t
glyph_id
=
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
;
unsigned
int
index
=
(
this
+
coverage
)
(
glyph_id
);
if
(
likely
(
index
==
NOT_COVERED
))
...
...
@@ -420,7 +420,7 @@ struct Ligature
for
(
i
=
1
;
i
<
count
;
i
++
)
{
while
(
_hb_ot_layout_skip_mark
(
c
->
layout
->
face
,
&
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
],
c
->
lookup_flag
,
NULL
))
c
->
buffer
->
add_output_glyph
(
IN_CURGLYPH
()
,
i
,
lig_id
);
c
->
buffer
->
add_output_glyph
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
,
i
,
lig_id
);
(
c
->
buffer
->
in_pos
)
++
;
}
...
...
@@ -487,7 +487,7 @@ struct LigatureSubstFormat1
inline
bool
apply
(
hb_apply_context_t
*
c
)
const
{
TRACE_APPLY
();
hb_codepoint_t
glyph_id
=
IN_CURGLYPH
()
;
hb_codepoint_t
glyph_id
=
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
;
bool
first_is_mark
=
!!
(
c
->
property
&
HB_OT_LAYOUT_GLYPH_CLASS_MARK
);
...
...
@@ -608,7 +608,7 @@ struct ReverseChainSingleSubstFormat1
if
(
unlikely
(
c
->
context_length
!=
NO_CONTEXT
))
return
false
;
/* No chaining to this type */
unsigned
int
index
=
(
this
+
coverage
)
(
IN_CURGLYPH
()
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
false
;
...
...
@@ -623,7 +623,7 @@ struct ReverseChainSingleSubstFormat1
match_coverage
,
this
,
1
))
{
IN_CURGLYPH
()
=
substitute
[
index
];
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
=
substitute
[
index
];
c
->
buffer
->
in_pos
--
;
/* Reverse! */
return
true
;
}
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
7e53ebe4
...
...
@@ -342,7 +342,7 @@ struct ContextFormat1
inline
bool
apply
(
hb_apply_context_t
*
c
,
apply_lookup_func_t
apply_func
)
const
{
TRACE_APPLY
();
unsigned
int
index
=
(
this
+
coverage
)
(
IN_CURGLYPH
()
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
false
;
...
...
@@ -381,12 +381,12 @@ struct ContextFormat2
inline
bool
apply
(
hb_apply_context_t
*
c
,
apply_lookup_func_t
apply_func
)
const
{
TRACE_APPLY
();
unsigned
int
index
=
(
this
+
coverage
)
(
IN_CURGLYPH
()
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
false
;
const
ClassDef
&
class_def
=
this
+
classDef
;
index
=
class_def
(
IN_CURGLYPH
()
);
index
=
class_def
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
const
RuleSet
&
rule_set
=
this
+
ruleSet
[
index
];
/* LONGTERMTODO: Old code fetches glyph classes at most once and caches
* them across subrule lookups. Not sure it's worth it.
...
...
@@ -429,7 +429,7 @@ struct ContextFormat3
inline
bool
apply
(
hb_apply_context_t
*
c
,
apply_lookup_func_t
apply_func
)
const
{
TRACE_APPLY
();
unsigned
int
index
=
(
this
+
coverage
[
0
])
(
IN_CURGLYPH
()
);
unsigned
int
index
=
(
this
+
coverage
[
0
])
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
false
;
...
...
@@ -633,7 +633,7 @@ struct ChainContextFormat1
inline
bool
apply
(
hb_apply_context_t
*
c
,
apply_lookup_func_t
apply_func
)
const
{
TRACE_APPLY
();
unsigned
int
index
=
(
this
+
coverage
)
(
IN_CURGLYPH
()
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
false
;
...
...
@@ -671,7 +671,7 @@ struct ChainContextFormat2
inline
bool
apply
(
hb_apply_context_t
*
c
,
apply_lookup_func_t
apply_func
)
const
{
TRACE_APPLY
();
unsigned
int
index
=
(
this
+
coverage
)
(
IN_CURGLYPH
()
);
unsigned
int
index
=
(
this
+
coverage
)
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
false
;
...
...
@@ -679,7 +679,7 @@ struct ChainContextFormat2
const
ClassDef
&
input_class_def
=
this
+
inputClassDef
;
const
ClassDef
&
lookahead_class_def
=
this
+
lookaheadClassDef
;
index
=
input_class_def
(
IN_CURGLYPH
()
);
index
=
input_class_def
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
const
ChainRuleSet
&
rule_set
=
this
+
ruleSet
[
index
];
/* LONGTERMTODO: Old code fetches glyph classes at most once and caches
* them across subrule lookups. Not sure it's worth it.
...
...
@@ -737,7 +737,7 @@ struct ChainContextFormat3
TRACE_APPLY
();
const
OffsetArrayOf
<
Coverage
>
&
input
=
StructAfter
<
OffsetArrayOf
<
Coverage
>
>
(
backtrack
);
unsigned
int
index
=
(
this
+
input
[
0
])
(
IN_CURGLYPH
()
);
unsigned
int
index
=
(
this
+
input
[
0
])
(
c
->
buffer
->
in_string
[
c
->
buffer
->
in_pos
].
codepoint
);
if
(
likely
(
index
==
NOT_COVERED
))
return
false
;
...
...
src/hb-shape.cc
浏览文件 @
7e53ebe4
...
...
@@ -50,7 +50,7 @@ hb_form_clusters (hb_buffer_t *buffer)
count
=
buffer
->
in_length
;
for
(
buffer
->
in_pos
=
1
;
buffer
->
in_pos
<
count
;
buffer
->
in_pos
++
)
if
(
buffer
->
unicode
->
get_general_category
(
IN_CURGLYPH
()
)
==
HB_CATEGORY_NON_SPACING_MARK
)
if
(
buffer
->
unicode
->
get_general_category
(
buffer
->
in_string
[
buffer
->
in_pos
].
codepoint
)
==
HB_CATEGORY_NON_SPACING_MARK
)
buffer
->
in_string
[
buffer
->
in_pos
].
cluster
=
buffer
->
in_string
[
buffer
->
in_pos
-
1
].
cluster
;
}
...
...
@@ -84,7 +84,7 @@ hb_mirror_chars (hb_buffer_t *buffer)
count
=
buffer
->
in_length
;
for
(
buffer
->
in_pos
=
0
;
buffer
->
in_pos
<
count
;
buffer
->
in_pos
++
)
{
IN_CURGLYPH
()
=
get_mirroring
(
IN_CURGLYPH
()
);
buffer
->
in_string
[
buffer
->
in_pos
].
codepoint
=
get_mirroring
(
buffer
->
in_string
[
buffer
->
in_pos
].
codepoint
);
}
}
...
...
@@ -100,13 +100,13 @@ hb_map_glyphs (hb_font_t *font,
count
=
buffer
->
in_length
-
1
;
for
(
buffer
->
in_pos
=
0
;
buffer
->
in_pos
<
count
;
buffer
->
in_pos
++
)
{
if
(
unlikely
(
is_variation_selector
(
buffer
->
in_string
[
buffer
->
in_pos
+
1
].
codepoint
)))
{
IN_CURGLYPH
()
=
hb_font_get_glyph
(
font
,
face
,
IN_CURGLYPH
()
,
buffer
->
in_string
[
buffer
->
in_pos
+
1
].
codepoint
);
buffer
->
in_string
[
buffer
->
in_pos
].
codepoint
=
hb_font_get_glyph
(
font
,
face
,
buffer
->
in_string
[
buffer
->
in_pos
].
codepoint
,
buffer
->
in_string
[
buffer
->
in_pos
+
1
].
codepoint
);
buffer
->
in_pos
++
;
}
else
{
IN_CURGLYPH
()
=
hb_font_get_glyph
(
font
,
face
,
IN_CURGLYPH
()
,
0
);
buffer
->
in_string
[
buffer
->
in_pos
].
codepoint
=
hb_font_get_glyph
(
font
,
face
,
buffer
->
in_string
[
buffer
->
in_pos
].
codepoint
,
0
);
}
}
IN_CURGLYPH
()
=
hb_font_get_glyph
(
font
,
face
,
IN_CURGLYPH
()
,
0
);
buffer
->
in_string
[
buffer
->
in_pos
].
codepoint
=
hb_font_get_glyph
(
font
,
face
,
buffer
->
in_string
[
buffer
->
in_pos
].
codepoint
,
0
);
}
static
void
...
...
@@ -157,7 +157,7 @@ hb_position_default (hb_font_t *font,
count
=
buffer
->
in_length
;
for
(
buffer
->
in_pos
=
0
;
buffer
->
in_pos
<
count
;
buffer
->
in_pos
++
)
{
hb_glyph_metrics_t
metrics
;
hb_font_get_glyph_metrics
(
font
,
face
,
IN_CURGLYPH
()
,
&
metrics
);
hb_font_get_glyph_metrics
(
font
,
face
,
buffer
->
in_string
[
buffer
->
in_pos
].
codepoint
,
&
metrics
);
buffer
->
positions
[
buffer
->
in_pos
].
x_advance
=
metrics
.
x_advance
;
buffer
->
positions
[
buffer
->
in_pos
].
y_advance
=
metrics
.
y_advance
;
}
...
...
@@ -196,7 +196,7 @@ hb_truetype_kern (hb_font_t *font,
count
=
buffer
->
in_length
;
for
(
buffer
->
in_pos
=
1
;
buffer
->
in_pos
<
count
;
buffer
->
in_pos
++
)
{
hb_position_t
kern
,
kern1
,
kern2
;
kern
=
hb_font_get_kerning
(
font
,
face
,
buffer
->
in_string
[
buffer
->
in_pos
-
1
].
codepoint
,
IN_CURGLYPH
()
);
kern
=
hb_font_get_kerning
(
font
,
face
,
buffer
->
in_string
[
buffer
->
in_pos
-
1
].
codepoint
,
buffer
->
in_string
[
buffer
->
in_pos
].
codepoint
);
kern1
=
kern
>>
1
;
kern2
=
kern
-
kern1
;
buffer
->
positions
[
buffer
->
in_pos
-
1
].
x_advance
+=
kern1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录