Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
81ec289d
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看板
提交
81ec289d
编写于
8月 26, 2011
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor
上级
3380de5a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
12 deletion
+12
-12
src/hb-graphite2.cc
src/hb-graphite2.cc
+12
-12
未找到文件。
src/hb-graphite2.cc
浏览文件 @
81ec289d
...
...
@@ -88,7 +88,7 @@ static const void *hb_gr_get_table (const void *data, unsigned int tag, size_t *
{
p
=
(
hb_gr_tablelist_t
*
)
malloc
(
sizeof
(
hb_gr_tablelist_t
));
if
(
!
p
)
{
hb_blob_destroy
(
blob
);
hb_blob_destroy
(
blob
);
return
NULL
;
}
p
->
next
=
NULL
;
...
...
@@ -124,7 +124,7 @@ static void _hb_gr_face_data_destroy (void *data)
hb_gr_tablelist_t
*
old
=
tlist
;
hb_blob_destroy
(
tlist
->
blob
);
tlist
=
tlist
->
next
;
free
(
old
);
free
(
old
);
}
gr_face_destroy
(
f
->
grface
);
}
...
...
@@ -150,9 +150,9 @@ _hb_gr_face_get_data (hb_face_t *face)
hb_blob_t
*
silf_blob
=
hb_face_reference_table
(
face
,
HB_GRAPHITE_TAG_Silf
);
if
(
!
hb_blob_get_length
(
silf_blob
))
if
(
!
hb_blob_get_length
(
silf_blob
))
{
hb_blob_destroy
(
silf_blob
);
hb_blob_destroy
(
silf_blob
);
return
&
_hb_gr_face_data_nil
;
}
...
...
@@ -189,7 +189,7 @@ _hb_gr_font_get_data (hb_font_t *font)
hb_blob_t
*
silf_blob
=
hb_face_reference_table
(
font
->
face
,
HB_GRAPHITE_TAG_Silf
);
if
(
!
hb_blob_get_length
(
silf_blob
))
{
hb_blob_destroy
(
silf_blob
);
hb_blob_destroy
(
silf_blob
);
return
&
_hb_gr_font_data_nil
;
}
...
...
@@ -269,20 +269,20 @@ hb_graphite_shape (hb_font_t *font,
*
p
=
0
;
hb_tag_t
script_tag
[
2
];
hb_ot_tags_from_script
(
hb_buffer_get_script
(
buffer
),
&
script_tag
[
0
],
&
script_tag
[
1
]);
hb_ot_tags_from_script
(
hb_buffer_get_script
(
buffer
),
&
script_tag
[
0
],
&
script_tag
[
1
]);
seg
=
gr_make_seg
(
data
->
grfont
,
data
->
grface
,
script_tag
[
1
]
==
HB_TAG_NONE
?
script_tag
[
0
]
:
script_tag
[
1
],
feats
,
gr_utf32
,
text
,
charlen
,
2
|
(
hb_buffer_get_direction
(
buffer
)
==
HB_DIRECTION_RTL
?
1
:
0
));
2
|
(
hb_buffer_get_direction
(
buffer
)
==
HB_DIRECTION_RTL
?
1
:
0
));
if
(
!
seg
)
goto
dieout
;
glyphlen
=
gr_seg_n_slots
(
seg
);
clusters
=
(
hb_gr_cluster_t
*
)
calloc
(
charlen
,
sizeof
(
hb_gr_cluster_t
));
if
(
!
glyphlen
||
!
clusters
)
goto
dieout
;
gids
=
(
u
nsigned
short
*
)
malloc
(
glyphlen
*
sizeof
(
unsigned
shor
t
));
gids
=
(
u
int16_t
*
)
malloc
(
glyphlen
*
sizeof
(
uint16_
t
));
if
(
!
gids
)
goto
dieout
;
pg
=
gids
;
...
...
@@ -315,14 +315,14 @@ hb_graphite_shape (hb_font_t *font,
}
ci
++
;
buffer
->
clear_output
();
buffer
->
clear_output
();
for
(
unsigned
int
i
=
0
;
i
<
ci
;
++
i
)
buffer
->
replace_glyphs
(
clusters
[
i
].
num_chars
,
clusters
[
i
].
num_glyphs
,
gids
+
clusters
[
i
].
base_glyph
);
buffer
->
swap_buffers
();
buffer
->
swap_buffers
();
hb_glyph_position_t
*
pPos
;
for
(
pPos
=
hb_buffer_get_glyph_positions
(
buffer
,
NULL
),
is
=
gr_seg_first_slot
(
seg
);
is
;
pPos
++
,
is
=
gr_slot_next_in_segment
(
is
))
for
(
pPos
=
hb_buffer_get_glyph_positions
(
buffer
,
NULL
),
is
=
gr_seg_first_slot
(
seg
);
is
;
pPos
++
,
is
=
gr_slot_next_in_segment
(
is
))
{
pPos
->
x_offset
=
gr_slot_origin_X
(
is
)
-
curradvx
;
pPos
->
y_offset
=
gr_slot_origin_Y
(
is
)
-
curradvy
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录