Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
b632e799
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看板
提交
b632e799
编写于
1月 06, 2015
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix up gobject-introspection a bit
Minimal shaping works now!
上级
3d1a666a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
32 addition
and
10 deletion
+32
-10
src/hb-blob.cc
src/hb-blob.cc
+3
-3
src/hb-buffer.cc
src/hb-buffer.cc
+1
-1
src/sample.py
src/sample.py
+28
-6
未找到文件。
src/hb-blob.cc
浏览文件 @
b632e799
...
@@ -79,11 +79,11 @@ _hb_blob_destroy_user_data (hb_blob_t *blob)
...
@@ -79,11 +79,11 @@ _hb_blob_destroy_user_data (hb_blob_t *blob)
/**
/**
* hb_blob_create: (Xconstructor)
* hb_blob_create: (Xconstructor)
* @data: (array length=length) (closure user_data) (destroy destroy) (scope notified) (transfer none): Pointer to blob data.
* @data: (array length=length) (
element-type uint8_t) (
closure user_data) (destroy destroy) (scope notified) (transfer none): Pointer to blob data.
* @length: Length of @data in bytes.
* @length: Length of @data in bytes.
* @mode: Memory mode for @data.
* @mode: Memory mode for @data.
* @user_data: Data parameter to pass to @destroy.
* @user_data:
(allow-none):
Data parameter to pass to @destroy.
* @destroy: Callback to call when @data is not needed anymore.
* @destroy:
(allow-none):
Callback to call when @data is not needed anymore.
*
*
* Creates a new "blob" object wrapping @data. The @mode parameter is used
* Creates a new "blob" object wrapping @data. The @mode parameter is used
* to negotiate ownership and lifecycle of @data.
* to negotiate ownership and lifecycle of @data.
...
...
src/hb-buffer.cc
浏览文件 @
b632e799
...
@@ -1400,7 +1400,7 @@ hb_buffer_add_utf (hb_buffer_t *buffer,
...
@@ -1400,7 +1400,7 @@ hb_buffer_add_utf (hb_buffer_t *buffer,
/**
/**
* hb_buffer_add_utf8:
* hb_buffer_add_utf8:
* @buffer: a buffer.
* @buffer: a buffer.
* @text: (array length=text_length):
* @text: (array length=text_length)
(element-type uint8_t)
:
* @text_length:
* @text_length:
* @item_offset:
* @item_offset:
* @item_length:
* @item_length:
...
...
src/sample.py
浏览文件 @
b632e799
#!/usr/bin/python
#!/usr/bin/python
# -*- coding: utf-8 -*-
from
__future__
import
print_function
import
sys
import
sys
from
gi.repository
import
HarfBuzz
as
hb
from
gi.repository
import
HarfBuzz
as
hb
def
nothing
():
def
nothing
(
data
):
p
ass
p
rint
(
data
)
fontdata
=
file
(
sys
.
argv
[
1
]).
read
()
fontdata
=
open
(
sys
.
argv
[
1
],
'rb'
).
read
()
blob
=
hb
.
blob_create
(
fontdata
,
hb
.
memory_mode_t
.
WRITABLE
,
None
,
nothing
)
print
blob
buffer
=
hb
.
buffer_create
()
blob
=
hb
.
blob_create
(
fontdata
,
hb
.
memory_mode_t
.
DUPLICATE
,
1234
,
None
)
buf
=
hb
.
buffer_create
()
hb
.
buffer_add_utf8
(
buf
,
"Hello بهداد"
,
0
,
-
1
)
hb
.
buffer_guess_segment_properties
(
buf
)
face
=
hb
.
face_create
(
blob
,
0
)
font
=
hb
.
font_create
(
face
)
upem
=
hb
.
face_get_upem
(
face
)
hb
.
font_set_scale
(
font
,
upem
,
upem
)
#hb.ft_font_set_funcs (font)
hb
.
ot_font_set_funcs
(
font
)
hb
.
shape
(
font
,
buf
,
[])
infos
=
hb
.
buffer_get_glyph_infos
(
buf
)
positions
=
hb
.
buffer_get_glyph_positions
(
buf
)
for
info
,
pos
in
zip
(
infos
,
positions
):
gid
=
info
.
codepoint
cluster
=
info
.
cluster
advance
=
pos
.
x_advance
print
(
gid
,
cluster
,
advance
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录