Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
8ab797c5
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看板
提交
8ab797c5
编写于
12月 29, 2015
作者:
K
Khaled Hosny
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[docs] A bit more buffers documentation
上级
f18d2226
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
135 addition
and
83 deletion
+135
-83
docs/harfbuzz-sections.txt
docs/harfbuzz-sections.txt
+30
-30
src/hb-buffer.cc
src/hb-buffer.cc
+63
-30
src/hb-buffer.h
src/hb-buffer.h
+6
-1
src/hb-common.cc
src/hb-common.cc
+27
-16
src/hb-common.h
src/hb-common.h
+9
-6
未找到文件。
docs/harfbuzz-sections.txt
浏览文件 @
8ab797c5
...
...
@@ -39,26 +39,26 @@ hb_buffer_add_utf32
hb_buffer_add_utf16
hb_buffer_add_utf8
hb_buffer_set_content_type
hb_buffer_get_content_type
hb_buffer_set_direction
hb_buffer_set_flags
hb_buffer_get_direction
hb_buffer_set_script
hb_buffer_get_script
hb_buffer_set_language
hb_buffer_get_language
hb_buffer_set_flags
hb_buffer_get_flags
hb_buffer_set_length
hb_buffer_
set_script
hb_buffer_
get_length
hb_buffer_set_segment_properties
hb_buffer_set_unicode_funcs
hb_buffer_set_user_data
hb_buffer_guess_segment_properties
hb_buffer_get_content_type
hb_buffer_get_direction
hb_buffer_get_flags
hb_buffer_get_glyph_infos
hb_buffer_get_glyph_positions
hb_buffer_get_language
hb_buffer_get_length
hb_buffer_get_script
hb_buffer_get_segment_properties
hb_buffer_set_unicode_funcs
hb_buffer_get_unicode_funcs
hb_buffer_set_user_data
hb_buffer_get_user_data
hb_buffer_get_glyph_infos
hb_buffer_get_glyph_positions
hb_buffer_normalize_glyphs
hb_buffer_reverse
hb_buffer_reverse_clusters
...
...
@@ -81,39 +81,39 @@ hb_buffer_serialize_format_t
<SECTION>
<FILE>hb-common</FILE>
HB_DIRECTION_REVERSE
HB_LANGUAGE_INVALID
HB_TAG
HB_TAG_NONE
HB_TAG_MAX
HB_UNTAG
hb_bool_t
hb_codepoint_t
hb_destroy_func_t
hb_tag_from_string
hb_tag_to_string
hb_direction_from_string
hb_direction_t
hb_direction_to_string
hb_script_from_iso15924_tag
hb_script_from_string
hb_script_to_iso15924_tag
hb_script_get_horizontal_direction
hb_language_from_string
hb_language_to_string
hb_language_get_default
hb_bool_t
hb_codepoint_t
hb_destroy_func_t
hb_direction_t
hb_language_t
hb_language_to_string
hb_mask_t
hb_position_t
hb_script_from_iso15924_tag
hb_script_from_string
hb_script_get_horizontal_direction
hb_script_t
hb_script_to_iso15924_tag
hb_tag_from_string
hb_tag_t
hb_
tag_to_string
hb_
script_t
hb_user_data_key_t
hb_var_int_t
HB_TAG
HB_TAG_NONE
HB_TAG_MAX
HB_UNTAG
HB_DIRECTION_REVERSE
HB_DIRECTION_IS_BACKWARD
HB_DIRECTION_IS_FORWARD
HB_DIRECTION_IS_HORIZONTAL
HB_DIRECTION_IS_VALID
HB_DIRECTION_IS_VERTICAL
HB_LANGUAGE_INVALID
<SUBSECTION Private>
HB_BEGIN_DECLS
HB_END_DECLS
...
...
src/hb-buffer.cc
浏览文件 @
8ab797c5
...
...
@@ -787,7 +787,7 @@ hb_buffer_get_empty (void)
* being destroyed until a matching call to hb_buffer_destroy() is made.
*
* Return value: (transfer full):
*
t
he referenced #hb_buffer_t.
*
T
he referenced #hb_buffer_t.
*
* Since: 0.9.2
**/
...
...
@@ -868,9 +868,10 @@ hb_buffer_get_user_data (hb_buffer_t *buffer,
/**
* hb_buffer_set_content_type:
* @buffer: an #hb_buffer_t.
* @content_type:
* @content_type:
the type of buffer contents to set
*
*
* Sets the type of @buffer contents, buffers are either empty, contain
* characters (before shaping) or glyphs (the result of shaping).
*
* Since: 0.9.5
**/
...
...
@@ -885,9 +886,10 @@ hb_buffer_set_content_type (hb_buffer_t *buffer,
* hb_buffer_get_content_type:
* @buffer: an #hb_buffer_t.
*
*
*
see hb_buffer_set_content_type().
*
* Return value:
* Return value:
* The type of @buffer contents.
*
* Since: 0.9.5
**/
...
...
@@ -942,9 +944,15 @@ hb_buffer_get_unicode_funcs (hb_buffer_t *buffer)
/**
* hb_buffer_set_direction:
* @buffer: an #hb_buffer_t.
* @direction:
* @direction:
the #hb_direction_t of the @buffer
*
*
* Set the text flow direction of the buffer. No shaping can happen without
* setting @buffer direction, and it controls the visual direction for the
* output glyphs; for RTL direction the glyphs will be reversed. Many layout
* features depend on the proper setting of the direction, for example,
* reversing RTL text before shaping, then shaping with LTR direction is not
* the same as keeping the text in logical order and shaping with RTL
* direction.
*
* Since: 0.9.2
**/
...
...
@@ -963,9 +971,10 @@ hb_buffer_set_direction (hb_buffer_t *buffer,
* hb_buffer_get_direction:
* @buffer: an #hb_buffer_t.
*
*
*
See hb_buffer_set_direction()
*
* Return value:
* Return value:
* The direction of the @buffer.
*
* Since: 0.9.2
**/
...
...
@@ -978,9 +987,17 @@ hb_buffer_get_direction (hb_buffer_t *buffer)
/**
* hb_buffer_set_script:
* @buffer: an #hb_buffer_t.
* @script:
* @script:
an #hb_script_t to set.
*
*
* Sets the script of @buffer to @script.
*
* Script is crucial for choosing the proper shaping behaviour for scripts that
* require it (e.g. Arabic) and the which OpenType features defined in the font
* to be applied.
*
* You can pass one of the predefined #hb_script_t values, or use
* hb_script_from_string() or hb_script_from_iso15924_tag() to get the
* corresponding script from an ISO 15924 script tag.
*
* Since: 0.9.2
**/
...
...
@@ -998,9 +1015,10 @@ hb_buffer_set_script (hb_buffer_t *buffer,
* hb_buffer_get_script:
* @buffer: an #hb_buffer_t.
*
*
*
See hb_buffer_set_script().
*
* Return value:
* Return value:
* The #hb_script_t of the @buffer.
*
* Since: 0.9.2
**/
...
...
@@ -1013,9 +1031,17 @@ hb_buffer_get_script (hb_buffer_t *buffer)
/**
* hb_buffer_set_language:
* @buffer: an #hb_buffer_t.
* @language:
* @language:
an hb_language_t to set.
*
*
* Sets the language of @buffer to @language.
*
* Languages are crucial for selecting which OpenType feature to apply to the
* buffer which can result in applying language-specific behaviour. Languages
* are orthogonal to the scripts, and though they are related, they are
* different concepts and should not be confused with each other.
*
* Use hb_language_from_string() to convert from ISO 639 language codes to
* #hb_language_t.
*
* Since: 0.9.2
**/
...
...
@@ -1033,9 +1059,10 @@ hb_buffer_set_language (hb_buffer_t *buffer,
* hb_buffer_get_language:
* @buffer: an #hb_buffer_t.
*
*
*
See hb_buffer_set_language().
*
* Return value: (transfer none):
* The #hb_language_t of the buffer. Must not be freed by the caller.
*
* Since: 0.9.2
**/
...
...
@@ -1192,7 +1219,8 @@ hb_buffer_get_replacement_codepoint (hb_buffer_t *buffer)
* hb_buffer_reset:
* @buffer: an #hb_buffer_t.
*
*
* Resets the buffer to its initial status, just like new buffers returned from
* hb_buffer_create().
*
* Since: 0.9.2
**/
...
...
@@ -1206,7 +1234,7 @@ hb_buffer_reset (hb_buffer_t *buffer)
* hb_buffer_clear_contents:
* @buffer: an #hb_buffer_t.
*
*
*
Clears the contents of the buffer without resetting other properties.
*
* Since: 0.9.11
**/
...
...
@@ -1219,11 +1247,12 @@ hb_buffer_clear_contents (hb_buffer_t *buffer)
/**
* hb_buffer_pre_allocate:
* @buffer: an #hb_buffer_t.
* @size:
* @size:
number of items to pre allocate.
*
*
*
Pre allocates memory for @buffer to fit at least @size number of items.
*
* Return value:
* Return value:
* %true if the memory pre allocation succeeded, %false otherwise.
*
* Since: 0.9.2
**/
...
...
@@ -1237,9 +1266,10 @@ hb_buffer_pre_allocate (hb_buffer_t *buffer, unsigned int size)
* hb_buffer_allocation_successful:
* @buffer: an #hb_buffer_t.
*
*
*
Check if allocating memory for the buffer succeeded.
*
* Return value:
* Return value:
* %true if memory allocation succeeded, %false otherwise.
*
* Since: 0.9.2
**/
...
...
@@ -1318,7 +1348,8 @@ hb_buffer_set_length (hb_buffer_t *buffer,
*
* Returns the number of items in the buffer.
*
* Return value: buffer length.
* Return value:
* The @buffer length.
*
* Since: 0.9.2
**/
...
...
@@ -1333,10 +1364,11 @@ hb_buffer_get_length (hb_buffer_t *buffer)
* @buffer: an #hb_buffer_t.
* @length: (out): output array length.
*
* Returns buffer glyph information array. Returned pointer
* is valid as long as buffer contents are not modified.
* Returns
@
buffer glyph information array. Returned pointer
* is valid as long as
@
buffer contents are not modified.
*
* Return value: (transfer none) (array length=length): buffer glyph information array.
* Return value: (transfer none) (array length=length):
* The @buffer glyph information array.
*
* Since: 0.9.2
**/
...
...
@@ -1355,10 +1387,11 @@ hb_buffer_get_glyph_infos (hb_buffer_t *buffer,
* @buffer: an #hb_buffer_t.
* @length: (out): output length.
*
* Returns buffer glyph position array. Returned pointer
* is valid as long as buffer contents are not modified.
* Returns
@
buffer glyph position array. Returned pointer
* is valid as long as
@
buffer contents are not modified.
*
* Return value: (transfer none) (array length=length): buffer glyph position array.
* Return value: (transfer none) (array length=length):
* The @buffer glyph position array.
*
* Since: 0.9.2
**/
...
...
src/hb-buffer.h
浏览文件 @
8ab797c5
...
...
@@ -115,7 +115,12 @@ HB_EXTERN void *
hb_buffer_get_user_data
(
hb_buffer_t
*
buffer
,
hb_user_data_key_t
*
key
);
/**
* hb_buffer_content_type_t:
* @HB_BUFFER_CONTENT_TYPE_INVALID: Initial value for new buffer.
* @HB_BUFFER_CONTENT_TYPE_UNICODE: The buffer contains input characters (before shaping).
* @HB_BUFFER_CONTENT_TYPE_GLYPHS: The buffer contains output glyphs (after shaping).
*/
typedef
enum
{
HB_BUFFER_CONTENT_TYPE_INVALID
=
0
,
HB_BUFFER_CONTENT_TYPE_UNICODE
,
...
...
src/hb-common.cc
浏览文件 @
8ab797c5
...
...
@@ -281,12 +281,15 @@ retry:
/**
* hb_language_from_string:
* @str: (array length=len) (element-type uint8_t):
* @len:
* @str: (array length=len) (element-type uint8_t): a string representing
* ISO 639 language code
* @len: length of the @str, or -1 if it is %NULL-terminated.
*
*
* Converts @str representing an ISO 639 language code to the corresponding
* #hb_language_t.
*
* Return value: (transfer none):
* The #hb_language_t corresponding to the ISO 639 language code.
*
* Since: 0.9.2
**/
...
...
@@ -314,11 +317,13 @@ hb_language_from_string (const char *str, int len)
/**
* hb_language_to_string:
* @language:
* @language:
an #hb_language_t to convert.
*
*
*
See hb_language_from_string().
*
* Return value: (transfer none):
* Return value: (transfer none):
* A %NULL-terminated string representing the @language. Must not be freed by
* the caller.
*
* Since: 0.9.2
**/
...
...
@@ -357,11 +362,12 @@ hb_language_get_default (void)
/**
* hb_script_from_iso15924_tag:
* @tag:
* @tag:
an #hb_tag_t representing an ISO 15924 tag.
*
*
*
Converts an ISO 15924 script tag to a corresponding #hb_script_t.
*
* Return value:
* An #hb_script_t corresponding to the ISO 15924 tag.
*
* Since: 0.9.2
**/
...
...
@@ -401,28 +407,33 @@ hb_script_from_iso15924_tag (hb_tag_t tag)
/**
* hb_script_from_string:
* @s: (array length=len) (element-type uint8_t):
* @len:
* @str: (array length=len) (element-type uint8_t): a string representing an
* ISO 15924 tag.
* @len: length of the @str, or -1 if it is %NULL-terminated.
*
*
* Converts a string @str representing an ISO 15924 script tag to a
* corresponding #hb_script_t. Shorthand for hb_tag_from_string() then
* hb_script_from_iso15924_tag().
*
* Return value:
* An #hb_script_t corresponding to the ISO 15924 tag.
*
* Since: 0.9.2
**/
hb_script_t
hb_script_from_string
(
const
char
*
s
,
int
len
)
hb_script_from_string
(
const
char
*
s
tr
,
int
len
)
{
return
hb_script_from_iso15924_tag
(
hb_tag_from_string
(
s
,
len
));
return
hb_script_from_iso15924_tag
(
hb_tag_from_string
(
s
tr
,
len
));
}
/**
* hb_script_to_iso15924_tag:
* @script:
* @script:
an #hb_script_ to convert.
*
*
*
See hb_script_from_iso15924_tag().
*
* Return value:
* Return value:
* An #hb_tag_t representing an ISO 15924 script tag.
*
* Since: 0.9.2
**/
...
...
src/hb-common.h
浏览文件 @
8ab797c5
...
...
@@ -106,8 +106,14 @@ HB_EXTERN void
hb_tag_to_string
(
hb_tag_t
tag
,
char
*
buf
);
/* hb_direction_t */
/**
* hb_direction_t:
* @HB_DIRECTION_INVALID: Initial, unset direction.
* @HB_DIRECTION_LTR: Text is set horizontally from left to right.
* @HB_DIRECTION_RTL: Text is set horizontally from right to left.
* @HB_DIRECTION_TTB: Text is set vertically from top to bottom.
* @HB_DIRECTION_BTT: Text is set vertically from bottom to top.
*/
typedef
enum
{
HB_DIRECTION_INVALID
=
0
,
HB_DIRECTION_LTR
=
4
,
...
...
@@ -136,7 +142,6 @@ hb_direction_to_string (hb_direction_t direction);
typedef
const
struct
hb_language_impl_t
*
hb_language_t
;
/* len=-1 means str is NUL-terminated */
HB_EXTERN
hb_language_t
hb_language_from_string
(
const
char
*
str
,
int
len
);
...
...
@@ -327,10 +332,8 @@ typedef enum
HB_EXTERN
hb_script_t
hb_script_from_iso15924_tag
(
hb_tag_t
tag
);
/* sugar for tag_from_string() then script_from_iso15924_tag */
/* len=-1 means s is NUL-terminated */
HB_EXTERN
hb_script_t
hb_script_from_string
(
const
char
*
s
,
int
len
);
hb_script_from_string
(
const
char
*
s
tr
,
int
len
);
HB_EXTERN
hb_tag_t
hb_script_to_iso15924_tag
(
hb_script_t
script
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录