Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
49cb8785
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看板
提交
49cb8785
编写于
9月 09, 2016
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[GX] Pass apply-context down to get_anchor()
Needed to access GDEF for varStore.
上级
f0c3fd8c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
30 addition
and
27 deletion
+30
-27
src/hb-ot-layout-gpos-table.hh
src/hb-ot-layout-gpos-table.hh
+30
-27
未找到文件。
src/hb-ot-layout-gpos-table.hh
浏览文件 @
49cb8785
...
...
@@ -231,11 +231,12 @@ struct ValueFormat : USHORT
struct
AnchorFormat1
{
inline
void
get_anchor
(
hb_
font_t
*
font
,
hb_codepoint_t
glyph_id
HB_UNUSED
,
inline
void
get_anchor
(
hb_
apply_context_t
*
c
,
hb_codepoint_t
glyph_id
HB_UNUSED
,
hb_position_t
*
x
,
hb_position_t
*
y
)
const
{
*
x
=
font
->
em_scale_x
(
xCoordinate
);
*
y
=
font
->
em_scale_y
(
yCoordinate
);
hb_font_t
*
font
=
c
->
font
;
*
x
=
font
->
em_scale_x
(
xCoordinate
);
*
y
=
font
->
em_scale_y
(
yCoordinate
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
...
...
@@ -254,18 +255,19 @@ struct AnchorFormat1
struct
AnchorFormat2
{
inline
void
get_anchor
(
hb_
font_t
*
font
,
hb_codepoint_t
glyph_id
,
inline
void
get_anchor
(
hb_
apply_context_t
*
c
,
hb_codepoint_t
glyph_id
,
hb_position_t
*
x
,
hb_position_t
*
y
)
const
{
unsigned
int
x_ppem
=
font
->
x_ppem
;
unsigned
int
y_ppem
=
font
->
y_ppem
;
hb_position_t
cx
,
cy
;
hb_bool_t
ret
;
hb_font_t
*
font
=
c
->
font
;
unsigned
int
x_ppem
=
font
->
x_ppem
;
unsigned
int
y_ppem
=
font
->
y_ppem
;
hb_position_t
cx
,
cy
;
hb_bool_t
ret
;
ret
=
(
x_ppem
||
y_ppem
)
&&
font
->
get_glyph_contour_point_for_origin
(
glyph_id
,
anchorPoint
,
HB_DIRECTION_LTR
,
&
cx
,
&
cy
);
*
x
=
ret
&&
x_ppem
?
cx
:
font
->
em_scale_x
(
xCoordinate
);
*
y
=
ret
&&
y_ppem
?
cy
:
font
->
em_scale_y
(
yCoordinate
);
ret
=
(
x_ppem
||
y_ppem
)
&&
font
->
get_glyph_contour_point_for_origin
(
glyph_id
,
anchorPoint
,
HB_DIRECTION_LTR
,
&
cx
,
&
cy
);
*
x
=
ret
&&
x_ppem
?
cx
:
font
->
em_scale_x
(
xCoordinate
);
*
y
=
ret
&&
y_ppem
?
cy
:
font
->
em_scale_y
(
yCoordinate
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
...
...
@@ -285,16 +287,17 @@ struct AnchorFormat2
struct
AnchorFormat3
{
inline
void
get_anchor
(
hb_
font_t
*
font
,
hb_codepoint_t
glyph_id
HB_UNUSED
,
inline
void
get_anchor
(
hb_
apply_context_t
*
c
,
hb_codepoint_t
glyph_id
HB_UNUSED
,
hb_position_t
*
x
,
hb_position_t
*
y
)
const
{
*
x
=
font
->
em_scale_x
(
xCoordinate
);
*
y
=
font
->
em_scale_y
(
yCoordinate
);
hb_font_t
*
font
=
c
->
font
;
*
x
=
font
->
em_scale_x
(
xCoordinate
);
*
y
=
font
->
em_scale_y
(
yCoordinate
);
if
(
font
->
x_ppem
||
font
->
num_coords
)
*
x
+=
(
this
+
xDeviceTable
).
get_x_delta
(
font
);
if
(
font
->
y_ppem
||
font
->
num_coords
)
*
y
+=
(
this
+
yDeviceTable
).
get_x_delta
(
font
);
if
(
font
->
x_ppem
||
font
->
num_coords
)
*
x
+=
(
this
+
xDeviceTable
).
get_x_delta
(
font
);
if
(
font
->
y_ppem
||
font
->
num_coords
)
*
y
+=
(
this
+
yDeviceTable
).
get_x_delta
(
font
);
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
const
...
...
@@ -321,14 +324,14 @@ struct AnchorFormat3
struct
Anchor
{
inline
void
get_anchor
(
hb_
font_t
*
font
,
hb_codepoint_t
glyph_id
,
inline
void
get_anchor
(
hb_
apply_context_t
*
c
,
hb_codepoint_t
glyph_id
,
hb_position_t
*
x
,
hb_position_t
*
y
)
const
{
*
x
=
*
y
=
0
;
switch
(
u
.
format
)
{
case
1
:
u
.
format1
.
get_anchor
(
font
,
glyph_id
,
x
,
y
);
return
;
case
2
:
u
.
format2
.
get_anchor
(
font
,
glyph_id
,
x
,
y
);
return
;
case
3
:
u
.
format3
.
get_anchor
(
font
,
glyph_id
,
x
,
y
);
return
;
case
1
:
u
.
format1
.
get_anchor
(
c
,
glyph_id
,
x
,
y
);
return
;
case
2
:
u
.
format2
.
get_anchor
(
c
,
glyph_id
,
x
,
y
);
return
;
case
3
:
u
.
format3
.
get_anchor
(
c
,
glyph_id
,
x
,
y
);
return
;
default:
return
;
}
}
...
...
@@ -428,8 +431,8 @@ 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
->
font
,
buffer
->
cur
().
codepoint
,
&
mark_x
,
&
mark_y
);
glyph_anchor
.
get_anchor
(
c
->
font
,
buffer
->
info
[
glyph_pos
].
codepoint
,
&
base_x
,
&
base_y
);
mark_anchor
.
get_anchor
(
c
,
buffer
->
cur
().
codepoint
,
&
mark_x
,
&
mark_y
);
glyph_anchor
.
get_anchor
(
c
,
buffer
->
info
[
glyph_pos
].
codepoint
,
&
base_x
,
&
base_y
);
hb_glyph_position_t
&
o
=
buffer
->
cur_pos
();
o
.
x_offset
=
base_x
-
mark_x
;
...
...
@@ -931,8 +934,8 @@ struct CursivePosFormat1
unsigned
int
j
=
skippy_iter
.
idx
;
hb_position_t
entry_x
,
entry_y
,
exit_x
,
exit_y
;
(
this
+
this_record
.
exitAnchor
).
get_anchor
(
c
->
font
,
buffer
->
info
[
i
].
codepoint
,
&
exit_x
,
&
exit_y
);
(
this
+
next_record
.
entryAnchor
).
get_anchor
(
c
->
font
,
buffer
->
info
[
j
].
codepoint
,
&
entry_x
,
&
entry_y
);
(
this
+
this_record
.
exitAnchor
).
get_anchor
(
c
,
buffer
->
info
[
i
].
codepoint
,
&
exit_x
,
&
exit_y
);
(
this
+
next_record
.
entryAnchor
).
get_anchor
(
c
,
buffer
->
info
[
j
].
codepoint
,
&
entry_x
,
&
entry_y
);
hb_glyph_position_t
*
pos
=
buffer
->
pos
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录