Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
5ebabece
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,发现更多精彩内容 >>
提交
5ebabece
编写于
11月 03, 2009
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move unicode_funcs to buffer
上级
d5a8e460
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
63 addition
and
36 deletion
+63
-36
TODO
TODO
+0
-1
src/hb-buffer-private.h
src/hb-buffer-private.h
+11
-1
src/hb-buffer.c
src/hb-buffer.c
+38
-9
src/hb-buffer.h
src/hb-buffer.h
+10
-0
src/hb-font-private.h
src/hb-font-private.h
+0
-3
src/hb-font.cc
src/hb-font.cc
+0
-17
src/hb-font.h
src/hb-font.h
+4
-5
未找到文件。
TODO
浏览文件 @
5ebabece
- cmap14 support in get_glyph callback
- cmap14 support in get_glyph callback
- Use size_t in sanitize?
- Use size_t in sanitize?
- Move unicode_funcs to buffer
- Buffer error handling?
- Buffer error handling?
hb-ot:
hb-ot:
...
...
src/hb-buffer-private.h
浏览文件 @
5ebabece
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include "hb-private.h"
#include "hb-private.h"
#include "hb-buffer.h"
#include "hb-buffer.h"
#include "hb-unicode-private.h"
HB_BEGIN_DECLS
HB_BEGIN_DECLS
...
@@ -69,6 +70,14 @@ ASSERT_STATIC (sizeof (hb_glyph_info_t) == sizeof (hb_glyph_position_t));
...
@@ -69,6 +70,14 @@ ASSERT_STATIC (sizeof (hb_glyph_info_t) == sizeof (hb_glyph_position_t));
struct
_hb_buffer_t
{
struct
_hb_buffer_t
{
hb_reference_count_t
ref_count
;
hb_reference_count_t
ref_count
;
/* Information about how the text in the buffer should be treated */
hb_unicode_funcs_t
*
unicode
;
hb_direction_t
direction
;
/* Buffer contents */
unsigned
int
allocated
;
unsigned
int
allocated
;
hb_bool_t
have_output
;
/* weather we have an output buffer going on */
hb_bool_t
have_output
;
/* weather we have an output buffer going on */
...
@@ -81,7 +90,8 @@ struct _hb_buffer_t {
...
@@ -81,7 +90,8 @@ struct _hb_buffer_t {
hb_internal_glyph_info_t
*
out_string
;
hb_internal_glyph_info_t
*
out_string
;
hb_internal_glyph_position_t
*
positions
;
hb_internal_glyph_position_t
*
positions
;
hb_direction_t
direction
;
/* Other stuff */
unsigned
int
max_lig_id
;
unsigned
int
max_lig_id
;
};
};
...
...
src/hb-buffer.c
浏览文件 @
5ebabece
...
@@ -31,7 +31,9 @@
...
@@ -31,7 +31,9 @@
static
hb_buffer_t
_hb_buffer_nil
=
{
static
hb_buffer_t
_hb_buffer_nil
=
{
HB_REFERENCE_COUNT_INVALID
/* ref_count */
HB_REFERENCE_COUNT_INVALID
,
/* ref_count */
&
_hb_unicode_funcs_nil
/* unicode */
};
};
/* Here is how the buffer works internally:
/* Here is how the buffer works internally:
...
@@ -84,6 +86,8 @@ hb_buffer_create (unsigned int pre_alloc_size)
...
@@ -84,6 +86,8 @@ hb_buffer_create (unsigned int pre_alloc_size)
if
(
pre_alloc_size
)
if
(
pre_alloc_size
)
hb_buffer_ensure
(
buffer
,
pre_alloc_size
);
hb_buffer_ensure
(
buffer
,
pre_alloc_size
);
buffer
->
unicode
=
&
_hb_unicode_funcs_nil
;
return
buffer
;
return
buffer
;
}
}
...
@@ -104,12 +108,45 @@ hb_buffer_destroy (hb_buffer_t *buffer)
...
@@ -104,12 +108,45 @@ hb_buffer_destroy (hb_buffer_t *buffer)
{
{
HB_OBJECT_DO_DESTROY
(
buffer
);
HB_OBJECT_DO_DESTROY
(
buffer
);
hb_unicode_funcs_destroy
(
buffer
->
unicode
);
free
(
buffer
->
in_string
);
free
(
buffer
->
in_string
);
free
(
buffer
->
positions
);
free
(
buffer
->
positions
);
free
(
buffer
);
free
(
buffer
);
}
}
void
hb_buffer_set_unicode_funcs
(
hb_buffer_t
*
buffer
,
hb_unicode_funcs_t
*
unicode
)
{
hb_unicode_funcs_reference
(
unicode
);
hb_unicode_funcs_destroy
(
buffer
->
unicode
);
buffer
->
unicode
=
unicode
;
}
hb_unicode_funcs_t
*
hb_buffer_get_unicode_funcs
(
hb_buffer_t
*
buffer
)
{
return
buffer
->
unicode
;
}
void
hb_buffer_set_direction
(
hb_buffer_t
*
buffer
,
hb_direction_t
direction
)
{
buffer
->
direction
=
direction
;
}
hb_direction_t
hb_buffer_get_direction
(
hb_buffer_t
*
buffer
)
{
return
buffer
->
direction
;
}
void
void
hb_buffer_clear
(
hb_buffer_t
*
buffer
)
hb_buffer_clear
(
hb_buffer_t
*
buffer
)
{
{
...
@@ -171,14 +208,6 @@ hb_buffer_add_glyph (hb_buffer_t *buffer,
...
@@ -171,14 +208,6 @@ hb_buffer_add_glyph (hb_buffer_t *buffer,
buffer
->
in_length
++
;
buffer
->
in_length
++
;
}
}
void
hb_buffer_set_direction
(
hb_buffer_t
*
buffer
,
hb_direction_t
direction
)
{
buffer
->
direction
=
direction
;
}
/* HarfBuzz-Internal API */
/* HarfBuzz-Internal API */
...
...
src/hb-buffer.h
浏览文件 @
5ebabece
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#define HB_BUFFER_H
#define HB_BUFFER_H
#include "hb-common.h"
#include "hb-common.h"
#include "hb-unicode.h"
HB_BEGIN_DECLS
HB_BEGIN_DECLS
...
@@ -80,6 +81,14 @@ void
...
@@ -80,6 +81,14 @@ void
hb_buffer_destroy
(
hb_buffer_t
*
buffer
);
hb_buffer_destroy
(
hb_buffer_t
*
buffer
);
void
hb_buffer_set_unicode_funcs
(
hb_buffer_t
*
buffer
,
hb_unicode_funcs_t
*
unicode_funcs
);
hb_unicode_funcs_t
*
hb_buffer_get_unicode_funcs
(
hb_buffer_t
*
buffer
);
void
void
hb_buffer_set_direction
(
hb_buffer_t
*
buffer
,
hb_buffer_set_direction
(
hb_buffer_t
*
buffer
,
hb_direction_t
direction
);
hb_direction_t
direction
);
...
@@ -88,6 +97,7 @@ hb_direction_t
...
@@ -88,6 +97,7 @@ hb_direction_t
hb_buffer_get_direction
(
hb_buffer_t
*
buffer
);
hb_buffer_get_direction
(
hb_buffer_t
*
buffer
);
void
void
hb_buffer_clear
(
hb_buffer_t
*
buffer
);
hb_buffer_clear
(
hb_buffer_t
*
buffer
);
...
...
src/hb-font-private.h
浏览文件 @
5ebabece
...
@@ -31,7 +31,6 @@
...
@@ -31,7 +31,6 @@
#include "hb-font.h"
#include "hb-font.h"
#include "hb-unicode-private.h"
#include "hb-ot-layout-private.h"
#include "hb-ot-layout-private.h"
HB_BEGIN_DECLS
HB_BEGIN_DECLS
...
@@ -68,8 +67,6 @@ struct _hb_face_t {
...
@@ -68,8 +67,6 @@ struct _hb_face_t {
hb_destroy_func_t
destroy
;
hb_destroy_func_t
destroy
;
void
*
user_data
;
void
*
user_data
;
hb_unicode_funcs_t
*
unicode
;
hb_ot_layout_t
ot_layout
;
hb_ot_layout_t
ot_layout
;
};
};
...
...
src/hb-font.cc
浏览文件 @
5ebabece
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
#include "hb-private.h"
#include "hb-private.h"
#include "hb-font-private.h"
#include "hb-font-private.h"
#include "hb-unicode-private.h"
#include "hb-open-file-private.hh"
#include "hb-open-file-private.hh"
#include "hb-blob.h"
#include "hb-blob.h"
...
@@ -138,8 +137,6 @@ static hb_face_t _hb_face_nil = {
...
@@ -138,8 +137,6 @@ static hb_face_t _hb_face_nil = {
NULL
,
/* destroy */
NULL
,
/* destroy */
NULL
,
/* user_data */
NULL
,
/* user_data */
&
_hb_unicode_funcs_nil
,
/* unicode */
{}
/* ot_layout */
{}
/* ot_layout */
};
};
...
@@ -208,23 +205,9 @@ hb_face_destroy (hb_face_t *face)
...
@@ -208,23 +205,9 @@ hb_face_destroy (hb_face_t *face)
if
(
face
->
destroy
)
if
(
face
->
destroy
)
face
->
destroy
(
face
->
user_data
);
face
->
destroy
(
face
->
user_data
);
hb_unicode_funcs_destroy
(
face
->
unicode
);
free
(
face
);
free
(
face
);
}
}
void
hb_face_set_unicode_funcs
(
hb_face_t
*
face
,
hb_unicode_funcs_t
*
unicode
)
{
if
(
HB_OBJECT_IS_INERT
(
face
))
return
;
hb_unicode_funcs_reference
(
unicode
);
hb_unicode_funcs_destroy
(
face
->
unicode
);
face
->
unicode
=
unicode
;
}
hb_blob_t
*
hb_blob_t
*
hb_face_get_table
(
hb_face_t
*
face
,
hb_face_get_table
(
hb_face_t
*
face
,
hb_tag_t
tag
)
hb_tag_t
tag
)
...
...
src/hb-font.h
浏览文件 @
5ebabece
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#include "hb-common.h"
#include "hb-common.h"
#include "hb-blob.h"
#include "hb-blob.h"
#include "hb-unicode.h"
HB_BEGIN_DECLS
HB_BEGIN_DECLS
...
@@ -61,10 +60,6 @@ hb_face_get_reference_count (hb_face_t *face);
...
@@ -61,10 +60,6 @@ hb_face_get_reference_count (hb_face_t *face);
void
void
hb_face_destroy
(
hb_face_t
*
face
);
hb_face_destroy
(
hb_face_t
*
face
);
void
hb_face_set_unicode_funcs
(
hb_face_t
*
face
,
hb_unicode_funcs_t
*
unicode_funcs
);
hb_blob_t
*
hb_blob_t
*
hb_face_get_table
(
hb_face_t
*
face
,
hb_face_get_table
(
hb_face_t
*
face
,
hb_tag_t
tag
);
hb_tag_t
tag
);
...
@@ -158,6 +153,10 @@ void
...
@@ -158,6 +153,10 @@ void
hb_font_set_funcs
(
hb_font_t
*
font
,
hb_font_set_funcs
(
hb_font_t
*
font
,
hb_font_funcs_t
*
klass
);
hb_font_funcs_t
*
klass
);
hb_font_funcs_t
*
hb_font_get_funcs
(
hb_font_t
*
font
);
/*
/*
* XXX
* XXX
* should we decompose this to units_per_EM and font-size?
* should we decompose this to units_per_EM and font-size?
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录