Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
b41f210d
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b41f210d
编写于
8月 14, 2009
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[HB] Merge mark positionin code between three types of lookups
上级
cd33cb9e
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
29 addition
and
66 deletion
+29
-66
src/hb-ot-layout-gpos-private.hh
src/hb-ot-layout-gpos-private.hh
+29
-66
未找到文件。
src/hb-ot-layout-gpos-private.hh
浏览文件 @
b41f210d
...
@@ -310,8 +310,32 @@ ASSERT_SIZE (MarkRecord, 4);
...
@@ -310,8 +310,32 @@ ASSERT_SIZE (MarkRecord, 4);
struct
MarkArray
struct
MarkArray
{
{
inline
unsigned
int
get_class
(
unsigned
int
index
)
const
{
return
markRecord
[
index
].
klass
;
}
inline
bool
apply
(
APPLY_ARG_DEF
,
inline
const
Anchor
&
get_anchor
(
unsigned
int
index
)
const
{
return
this
+
markRecord
[
index
].
markAnchor
;
}
unsigned
int
mark_index
,
unsigned
int
glyph_index
,
const
AnchorMatrix
&
anchors
,
unsigned
int
class_count
,
unsigned
int
glyph_pos
)
const
{
const
MarkRecord
&
record
=
markRecord
[
mark_index
];
unsigned
int
mark_class
=
record
.
klass
;
const
Anchor
&
mark_anchor
=
this
+
record
.
markAnchor
;
const
Anchor
&
glyph_anchor
=
anchors
.
get_anchor
(
glyph_index
,
mark_class
,
class_count
);
hb_position_t
mark_x
,
mark_y
,
base_x
,
base_y
;
mark_anchor
.
get_anchor
(
context
,
IN_CURGLYPH
(),
&
mark_x
,
&
mark_y
);
glyph_anchor
.
get_anchor
(
context
,
IN_GLYPH
(
glyph_pos
),
&
base_x
,
&
base_y
);
hb_internal_glyph_position_t
*
o
=
POSITION
(
buffer
->
in_pos
);
o
->
x_pos
=
base_x
-
mark_x
;
o
->
y_pos
=
base_y
-
mark_y
;
o
->
x_advance
=
0
;
o
->
y_advance
=
0
;
o
->
back
=
buffer
->
in_pos
-
glyph_pos
;
buffer
->
in_pos
++
;
return
true
;
}
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
SANITIZE_DEBUG
();
SANITIZE_DEBUG
();
...
@@ -939,28 +963,7 @@ struct MarkBasePosFormat1
...
@@ -939,28 +963,7 @@ struct MarkBasePosFormat1
if
(
base_index
==
NOT_COVERED
)
if
(
base_index
==
NOT_COVERED
)
return
false
;
return
false
;
const
MarkArray
&
mark_array
=
this
+
markArray
;
return
(
this
+
markArray
).
apply
(
APPLY_ARG
,
mark_index
,
base_index
,
this
+
baseArray
,
classCount
,
j
);
const
BaseArray
&
base_array
=
this
+
baseArray
;
unsigned
int
mark_class
=
mark_array
.
get_class
(
mark_index
);
const
Anchor
&
mark_anchor
=
mark_array
.
get_anchor
(
mark_index
);
const
Anchor
&
base_anchor
=
base_array
.
get_anchor
(
base_index
,
mark_class
,
classCount
);
hb_position_t
mark_x
,
mark_y
,
base_x
,
base_y
;
mark_anchor
.
get_anchor
(
context
,
IN_CURGLYPH
(),
&
mark_x
,
&
mark_y
);
base_anchor
.
get_anchor
(
context
,
IN_GLYPH
(
j
),
&
base_x
,
&
base_y
);
hb_internal_glyph_position_t
*
o
=
POSITION
(
buffer
->
in_pos
);
o
->
x_pos
=
base_x
-
mark_x
;
o
->
y_pos
=
base_y
-
mark_y
;
o
->
x_advance
=
0
;
o
->
y_advance
=
0
;
o
->
back
=
i
;
buffer
->
in_pos
++
;
return
true
;
}
}
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
...
@@ -1061,7 +1064,6 @@ struct MarkLigPosFormat1
...
@@ -1061,7 +1064,6 @@ struct MarkLigPosFormat1
if
(
lig_index
==
NOT_COVERED
)
if
(
lig_index
==
NOT_COVERED
)
return
false
;
return
false
;
const
MarkArray
&
mark_array
=
this
+
markArray
;
const
LigatureArray
&
lig_array
=
this
+
ligatureArray
;
const
LigatureArray
&
lig_array
=
this
+
ligatureArray
;
const
LigatureAttach
&
lig_attach
=
lig_array
[
lig_index
];
const
LigatureAttach
&
lig_attach
=
lig_array
[
lig_index
];
...
@@ -1083,25 +1085,7 @@ struct MarkLigPosFormat1
...
@@ -1083,25 +1085,7 @@ struct MarkLigPosFormat1
else
else
comp_index
=
count
-
1
;
comp_index
=
count
-
1
;
unsigned
int
mark_class
=
mark_array
.
get_class
(
mark_index
);
return
(
this
+
markArray
).
apply
(
APPLY_ARG
,
mark_index
,
comp_index
,
lig_attach
,
classCount
,
j
);
const
Anchor
&
mark_anchor
=
mark_array
.
get_anchor
(
mark_index
);
const
Anchor
&
lig_anchor
=
lig_attach
.
get_anchor
(
comp_index
,
mark_class
,
classCount
);
hb_position_t
mark_x
,
mark_y
,
lig_x
,
lig_y
;
mark_anchor
.
get_anchor
(
context
,
IN_CURGLYPH
(),
&
mark_x
,
&
mark_y
);
lig_anchor
.
get_anchor
(
context
,
IN_GLYPH
(
j
),
&
lig_x
,
&
lig_y
);
hb_internal_glyph_position_t
*
o
=
POSITION
(
buffer
->
in_pos
);
o
->
x_pos
=
lig_x
-
mark_x
;
o
->
y_pos
=
lig_y
-
mark_y
;
o
->
x_advance
=
0
;
o
->
y_advance
=
0
;
o
->
back
=
i
;
buffer
->
in_pos
++
;
return
true
;
}
}
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
...
@@ -1201,28 +1185,7 @@ struct MarkMarkPosFormat1
...
@@ -1201,28 +1185,7 @@ struct MarkMarkPosFormat1
if
(
mark2_index
==
NOT_COVERED
)
if
(
mark2_index
==
NOT_COVERED
)
return
false
;
return
false
;
const
MarkArray
&
mark1_array
=
this
+
mark1Array
;
return
(
this
+
mark1Array
).
apply
(
APPLY_ARG
,
mark1_index
,
mark2_index
,
this
+
mark2Array
,
classCount
,
j
);
const
Mark2Array
&
mark2_array
=
this
+
mark2Array
;
unsigned
int
mark1_class
=
mark1_array
.
get_class
(
mark1_index
);
const
Anchor
&
mark1_anchor
=
mark1_array
.
get_anchor
(
mark1_index
);
const
Anchor
&
mark2_anchor
=
mark2_array
.
get_anchor
(
mark2_index
,
mark1_class
,
classCount
);
hb_position_t
mark1_x
,
mark1_y
,
mark2_x
,
mark2_y
;
mark1_anchor
.
get_anchor
(
context
,
IN_CURGLYPH
(),
&
mark1_x
,
&
mark1_y
);
mark2_anchor
.
get_anchor
(
context
,
IN_GLYPH
(
j
),
&
mark2_x
,
&
mark2_y
);
hb_internal_glyph_position_t
*
o
=
POSITION
(
buffer
->
in_pos
);
o
->
x_pos
=
mark2_x
-
mark1_x
;
o
->
y_pos
=
mark2_y
-
mark1_y
;
o
->
x_advance
=
0
;
o
->
y_advance
=
0
;
o
->
back
=
i
;
buffer
->
in_pos
++
;
return
true
;
}
}
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录