Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
74b99ef2
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看板
提交
74b99ef2
编写于
4月 20, 2017
作者:
M
mhosken
提交者:
Behdad Esfahbod
4月 20, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix graphite2 rtl conversion (#475)
上级
69664131
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
18 deletion
+14
-18
src/hb-graphite2.cc
src/hb-graphite2.cc
+14
-18
未找到文件。
src/hb-graphite2.cc
浏览文件 @
74b99ef2
...
...
@@ -301,7 +301,7 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
hb_codepoint_t
*
pg
=
gids
;
clusters
[
0
].
cluster
=
buffer
->
info
[
0
].
cluster
;
float
curradv
=
HB_DIRECTION_IS_BACKWARD
(
buffer
->
props
.
direction
)
?
gr_slot_origin_X
(
gr_seg_first_slot
(
seg
))
:
0.
;
float
curradv
=
0.
;
if
(
HB_DIRECTION_IS_BACKWARD
(
buffer
->
props
.
direction
))
{
curradv
=
gr_slot_origin_X
(
gr_seg_first_slot
(
seg
));
...
...
@@ -330,13 +330,10 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
c
->
base_glyph
=
ic
;
c
->
num_glyphs
=
0
;
if
(
HB_DIRECTION_IS_BACKWARD
(
buffer
->
props
.
direction
))
{
ci
++
;
clusters
[
ci
].
advance
=
curradv
-
gr_slot_origin_X
(
is
);
}
else
{
c
->
advance
=
curradv
-
gr_slot_origin_X
(
is
);
else
clusters
[
ci
].
advance
=
gr_slot_origin_X
(
is
)
-
curradv
;
ci
++
;
}
ci
++
;
curradv
=
gr_slot_origin_X
(
is
);
}
clusters
[
ci
].
num_glyphs
++
;
...
...
@@ -345,7 +342,9 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
clusters
[
ci
].
num_chars
=
after
+
1
-
clusters
[
ci
].
base_char
;
}
if
(
!
HB_DIRECTION_IS_BACKWARD
(
buffer
->
props
.
direction
))
if
(
HB_DIRECTION_IS_BACKWARD
(
buffer
->
props
.
direction
))
clusters
[
ci
].
advance
+=
curradv
;
else
clusters
[
ci
].
advance
=
gr_seg_advance_X
(
seg
)
-
curradv
;
ci
++
;
...
...
@@ -366,11 +365,11 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
float
yscale
=
(
float
)
font
->
y_scale
/
upem
;
yscale
*=
yscale
/
xscale
;
/* Positioning. */
int
currclus
=
-
1
;
const
hb_glyph_info_t
*
info
=
buffer
->
info
;
hb_glyph_position_t
*
pPos
=
hb_buffer_get_glyph_positions
(
buffer
,
NULL
);
if
(
!
HB_DIRECTION_IS_BACKWARD
(
buffer
->
props
.
direction
))
{
int
currclus
=
-
1
;
const
hb_glyph_info_t
*
info
=
buffer
->
info
;
hb_glyph_position_t
*
pPos
=
hb_buffer_get_glyph_positions
(
buffer
,
NULL
);
curradvx
=
0
;
for
(
is
=
gr_seg_first_slot
(
seg
);
is
;
pPos
++
,
++
info
,
is
=
gr_slot_next_in_segment
(
is
))
{
...
...
@@ -389,23 +388,20 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
}
else
{
int
currclus
=
-
1
;
const
hb_glyph_info_t
*
info
=
buffer
->
info
;
hb_glyph_position_t
*
pPos
=
hb_buffer_get_glyph_positions
(
buffer
,
NULL
);
curradvx
=
gr_seg_advance_X
(
seg
)
*
xscale
;
curradvx
=
gr_seg_advance_X
(
seg
);
for
(
is
=
gr_seg_first_slot
(
seg
);
is
;
pPos
++
,
info
++
,
is
=
gr_slot_next_in_segment
(
is
))
{
if
(
info
->
cluster
!=
currclus
)
{
pPos
->
x_advance
=
info
->
var1
.
i32
*
xscale
;
if
(
currclus
!=
-
1
)
curradvx
-=
info
[
-
1
].
var1
.
i32
*
xscal
e
;
curradvx
-=
pPos
->
x_advanc
e
;
currclus
=
info
->
cluster
;
}
else
pPos
->
x_advance
=
0.
;
pPos
->
x_advance
=
0.
;
pPos
->
y_advance
=
gr_slot_advance_Y
(
is
,
grface
,
NULL
)
*
yscale
;
curradvy
-=
pPos
->
y_advance
;
pPos
->
x_offset
=
gr_slot_origin_X
(
is
)
*
xscale
-
curradvx
+
pPos
->
x_advance
;
pPos
->
x_offset
=
(
gr_slot_origin_X
(
is
)
-
info
->
var1
.
i32
)
*
xscale
-
curradvx
+
pPos
->
x_advance
;
pPos
->
y_offset
=
gr_slot_origin_Y
(
is
)
*
yscale
-
curradvy
;
}
hb_buffer_reverse_clusters
(
buffer
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录