Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
0f7e6b2c
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,发现更多精彩内容 >>
提交
0f7e6b2c
编写于
5月 20, 2009
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[GPOS] Fix more brokenness
上级
ff05d257
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
33 addition
and
18 deletion
+33
-18
src/Makefile.am
src/Makefile.am
+1
-1
src/hb-ot-layout-gpos-private.h
src/hb-ot-layout-gpos-private.h
+20
-17
src/hb-ot-layout.cc
src/hb-ot-layout.cc
+7
-0
src/hb-ot-layout.h
src/hb-ot-layout.h
+5
-0
未找到文件。
src/Makefile.am
浏览文件 @
0f7e6b2c
...
...
@@ -4,7 +4,7 @@ INCLUDES = \
-I
$(srcdir)
\
$(FREETYPE_CFLAGS)
\
$(GLIB_CFLAGS)
CXX
=
gcc
$(GCCOPTS)
-fno-rtti
-fno-exceptions
-Wabi
-Wpadded
-Wcast-align
CXX
=
gcc
$(GCCOPTS)
-
g
-
fno-rtti
-fno-exceptions
-Wabi
-Wpadded
-Wcast-align
noinst_LTLIBRARIES
=
libharfbuzz-1.la
...
...
src/hb-ot-layout-gpos-private.h
浏览文件 @
0f7e6b2c
...
...
@@ -551,18 +551,6 @@ struct CursivePosFormat1
private:
inline
bool
apply
(
APPLY_ARG_DEF
)
const
{
struct
hb_ot_layout_t
::
gpos_info_t
*
gpi
=
&
layout
->
gpos_info
;
hb_codepoint_t
last_pos
=
gpi
->
last
;
gpi
->
last
=
0xFFFF
;
/* We don't handle mark glyphs here. */
if
(
property
==
HB_OT_LAYOUT_GLYPH_CLASS_MARK
)
return
false
;
unsigned
int
index
=
(
this
+
coverage
)
(
IN_CURGLYPH
());
if
(
HB_LIKELY
(
index
==
NOT_COVERED
))
return
false
;
/* Now comes the messiest part of the whole OpenType
specification. At first glance, cursive connections seem easy
to understand, but there are pitfalls! The reason is that
...
...
@@ -680,6 +668,18 @@ struct CursivePosFormat1
Since horizontal advance widths or vertical advance heights
can be used alone but not together, no ambiguity occurs. */
struct
hb_ot_layout_t
::
gpos_info_t
*
gpi
=
&
layout
->
gpos_info
;
hb_codepoint_t
last_pos
=
gpi
->
last
;
gpi
->
last
=
0xFFFF
;
/* We don't handle mark glyphs here. */
if
(
property
==
HB_OT_LAYOUT_GLYPH_CLASS_MARK
)
return
false
;
unsigned
int
index
=
(
this
+
coverage
)
(
IN_CURGLYPH
());
if
(
HB_LIKELY
(
index
==
NOT_COVERED
))
return
false
;
const
EntryExitRecord
&
record
=
entryExitRecord
[
index
];
hb_position_t
entry_x
,
entry_y
,
exit_x
,
exit_y
;
...
...
@@ -696,24 +696,27 @@ struct CursivePosFormat1
}
else
{
POSITION
(
gpi
->
last
)
->
x_advance
=
gpi
->
anchor_x
-
entry_x
;
POSITION
(
gpi
->
last
)
->
new_advance
=
TRUE
;
POSITION
(
last_pos
)
->
x_advance
=
gpi
->
anchor_x
-
entry_x
;
POSITION
(
last_pos
)
->
new_advance
=
TRUE
;
}
if
(
lookup_flag
&
LookupFlag
::
RightToLeft
)
{
POSITION
(
gpi
->
last
)
->
cursive_chain
=
gpi
->
last
-
buffer
->
in_pos
;
POSITION
(
gpi
->
last
)
->
y_pos
=
entry_y
-
gpi
->
anchor_y
;
POSITION
(
last_pos
)
->
cursive_chain
=
last_pos
-
buffer
->
in_pos
;
POSITION
(
last_pos
)
->
y_pos
=
entry_y
-
gpi
->
anchor_y
;
}
else
{
POSITION
(
buffer
->
in_pos
)
->
cursive_chain
=
buffer
->
in_pos
-
gpi
->
last
;
POSITION
(
buffer
->
in_pos
)
->
cursive_chain
=
buffer
->
in_pos
-
last_pos
;
POSITION
(
buffer
->
in_pos
)
->
y_pos
=
gpi
->
anchor_y
-
entry_y
;
}
end:
if
(
record
.
exitAnchor
)
{
gpi
->
last
=
buffer
->
in_pos
;
(
this
+
record
.
exitAnchor
).
get_anchor
(
layout
,
IN_CURGLYPH
(),
&
gpi
->
anchor_x
,
&
gpi
->
anchor_y
);
}
buffer
->
in_pos
++
;
return
true
;
...
...
src/hb-ot-layout.cc
浏览文件 @
0f7e6b2c
...
...
@@ -82,6 +82,13 @@ hb_ot_layout_destroy (hb_ot_layout_t *layout)
free
(
layout
);
}
void
hb_ot_layout_set_direction
(
hb_ot_layout_t
*
layout
,
hb_bool_t
r2l
)
{
layout
->
gpos_info
.
r2l
=
!!
r2l
;
}
/*
* GDEF
*/
...
...
src/hb-ot-layout.h
浏览文件 @
0f7e6b2c
...
...
@@ -47,6 +47,11 @@ hb_ot_layout_create_for_data (const char *font_data,
void
hb_ot_layout_destroy
(
hb_ot_layout_t
*
layout
);
/* XXX */
void
hb_ot_layout_set_direction
(
hb_ot_layout_t
*
layout
,
hb_bool_t
r2l
);
/* TODO sanitizing API/constructor (make_writable_func_t) */
/* TODO get_table_func_t constructor */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录