Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
13528d0c
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,发现更多精彩内容 >>
提交
13528d0c
编写于
10月 27, 2010
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Supposedly implement vertical support in GPOS
Not tested at all.
上级
9624de5b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
44 addition
and
22 deletion
+44
-22
src/hb-ot-layout-gpos-private.hh
src/hb-ot-layout-gpos-private.hh
+20
-7
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+24
-15
未找到文件。
src/hb-ot-layout-gpos-private.hh
浏览文件 @
13528d0c
...
...
@@ -855,27 +855,40 @@ struct CursivePosFormat1
(
this
+
this_record
.
exitAnchor
).
get_anchor
(
c
->
layout
,
c
->
buffer
->
info
[
i
].
codepoint
,
&
exit_x
,
&
exit_y
);
(
this
+
next_record
.
entryAnchor
).
get_anchor
(
c
->
layout
,
c
->
buffer
->
info
[
j
].
codepoint
,
&
entry_x
,
&
entry_y
);
/* TODO vertical */
hb_direction_t
direction
=
c
->
buffer
->
props
.
direction
;
/* Align the exit anchor of the left glyph with the entry anchor of the right glyph. */
if
(
c
->
buffer
->
props
.
direction
==
HB_DIRECTION_RTL
)
/* Align the exit anchor of the left/top glyph with the entry anchor of the right/bottom glyph
* by adjusting advance of the left/top glyph. */
if
(
HB_DIRECTION_IS_BACKWARD
(
direction
))
{
c
->
buffer
->
pos
[
j
].
x_advance
=
c
->
buffer
->
pos
[
j
].
x_offset
+
entry_x
-
exit_x
;
if
(
likely
(
HB_DIRECTION_IS_HORIZONTAL
(
direction
)))
c
->
buffer
->
pos
[
j
].
x_advance
=
c
->
buffer
->
pos
[
j
].
x_offset
+
entry_x
-
exit_x
;
else
c
->
buffer
->
pos
[
j
].
y_advance
=
c
->
buffer
->
pos
[
j
].
y_offset
+
entry_y
-
exit_y
;
}
else
{
c
->
buffer
->
pos
[
i
].
x_advance
=
c
->
buffer
->
pos
[
i
].
x_offset
+
exit_x
-
entry_x
;
if
(
likely
(
HB_DIRECTION_IS_HORIZONTAL
(
direction
)))
c
->
buffer
->
pos
[
i
].
x_advance
=
c
->
buffer
->
pos
[
i
].
x_offset
+
exit_x
-
entry_x
;
else
c
->
buffer
->
pos
[
i
].
y_advance
=
c
->
buffer
->
pos
[
i
].
y_offset
+
exit_y
-
entry_y
;
}
if
(
c
->
lookup_flag
&
LookupFlag
::
RightToLeft
)
{
c
->
buffer
->
pos
[
i
].
cursive_chain
=
j
-
i
;
c
->
buffer
->
pos
[
i
].
y_offset
=
entry_y
-
exit_y
;
if
(
likely
(
HB_DIRECTION_IS_HORIZONTAL
(
direction
)))
c
->
buffer
->
pos
[
i
].
y_offset
=
entry_y
-
exit_y
;
else
c
->
buffer
->
pos
[
i
].
x_offset
=
entry_x
-
exit_x
;
}
else
{
c
->
buffer
->
pos
[
j
].
cursive_chain
=
i
-
j
;
c
->
buffer
->
pos
[
j
].
y_offset
=
exit_y
-
entry_y
;
if
(
likely
(
HB_DIRECTION_IS_HORIZONTAL
(
direction
)))
c
->
buffer
->
pos
[
j
].
y_offset
=
exit_y
-
entry_y
;
else
c
->
buffer
->
pos
[
j
].
x_offset
=
exit_x
-
entry_x
;
}
c
->
buffer
->
i
=
j
;
...
...
src/hb-ot-layout.cc
浏览文件 @
13528d0c
...
...
@@ -607,25 +607,34 @@ hb_ot_layout_position_finish (hb_font_t *font HB_UNUSED,
unsigned
int
i
,
j
;
unsigned
int
len
=
hb_buffer_get_length
(
buffer
);
hb_internal_glyph_position_t
*
pos
=
(
hb_internal_glyph_position_t
*
)
hb_buffer_get_glyph_positions
(
buffer
);
hb_direction_t
direction
=
buffer
->
props
.
direction
;
/* TODO: Vertical */
/* Handle cursive connections */
/* First handle all chain-back connections */
for
(
j
=
0
;
j
<
len
;
j
++
)
{
if
(
pos
[
j
].
cursive_chain
<
0
)
{
pos
[
j
].
y_offset
+=
pos
[
j
+
pos
[
j
].
cursive_chain
].
y_offset
;
pos
[
j
].
cursive_chain
=
0
;
/* Handle cursive connections:
* First handle all chain-back connections, then handle all chain-forward connections. */
if
(
likely
(
HB_DIRECTION_IS_HORIZONTAL
(
direction
)))
{
for
(
j
=
0
;
j
<
len
;
j
++
)
{
if
(
pos
[
j
].
cursive_chain
<
0
)
pos
[
j
].
y_offset
+=
pos
[
j
+
pos
[
j
].
cursive_chain
].
y_offset
;
}
for
(
i
=
len
;
i
>
0
;
i
--
)
{
j
=
i
-
1
;
if
(
pos
[
j
].
cursive_chain
>
0
)
pos
[
j
].
y_offset
+=
pos
[
j
+
pos
[
j
].
cursive_chain
].
y_offset
;
}
}
/* Then handle all chain-forward connections */
for
(
i
=
len
;
i
>
0
;
i
--
)
{
j
=
i
-
1
;
if
(
pos
[
j
].
cursive_chain
>
0
)
{
pos
[
j
].
y_offset
+=
pos
[
j
+
pos
[
j
].
cursive_chain
].
y_offset
;
pos
[
j
].
cursive_chain
=
0
;
else
{
for
(
j
=
0
;
j
<
len
;
j
++
)
{
if
(
pos
[
j
].
cursive_chain
<
0
)
pos
[
j
].
x_offset
+=
pos
[
j
+
pos
[
j
].
cursive_chain
].
x_offset
;
}
for
(
i
=
len
;
i
>
0
;
i
--
)
{
j
=
i
-
1
;
if
(
pos
[
j
].
cursive_chain
>
0
)
pos
[
j
].
x_offset
+=
pos
[
j
+
pos
[
j
].
cursive_chain
].
x_offset
;
}
}
...
...
@@ -639,7 +648,7 @@ hb_ot_layout_position_finish (hb_font_t *font HB_UNUSED,
pos
[
i
].
x_offset
+=
pos
[
back
].
x_offset
;
pos
[
i
].
y_offset
+=
pos
[
back
].
y_offset
;
if
(
buffer
->
props
.
direction
==
HB_DIRECTION_RTL
)
if
(
HB_DIRECTION_IS_BACKWARD
(
buffer
->
props
.
direction
)
)
for
(
j
=
back
+
1
;
j
<
i
+
1
;
j
++
)
{
pos
[
i
].
x_offset
+=
pos
[
j
].
x_advance
;
pos
[
i
].
y_offset
+=
pos
[
j
].
y_advance
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录