Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
21fdcee0
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,发现更多精彩内容 >>
提交
21fdcee0
编写于
8月 01, 2012
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add hb_unicode_combining_class_t
上级
84186a64
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
134 addition
and
49 deletion
+134
-49
src/hb-common.h
src/hb-common.h
+1
-37
src/hb-glib.cc
src/hb-glib.cc
+2
-2
src/hb-icu.cc
src/hb-icu.cc
+2
-2
src/hb-unicode-private.hh
src/hb-unicode-private.hh
+1
-1
src/hb-unicode.cc
src/hb-unicode.cc
+6
-5
src/hb-unicode.h
src/hb-unicode.h
+122
-2
未找到文件。
src/hb-common.h
浏览文件 @
21fdcee0
...
@@ -141,47 +141,11 @@ hb_language_t
...
@@ -141,47 +141,11 @@ hb_language_t
hb_language_get_default
(
void
);
hb_language_get_default
(
void
);
/* hb_unicode_general_category_t */
typedef
enum
{
HB_UNICODE_GENERAL_CATEGORY_CONTROL
,
/* Cc */
HB_UNICODE_GENERAL_CATEGORY_FORMAT
,
/* Cf */
HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED
,
/* Cn */
HB_UNICODE_GENERAL_CATEGORY_PRIVATE_USE
,
/* Co */
HB_UNICODE_GENERAL_CATEGORY_SURROGATE
,
/* Cs */
HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER
,
/* Ll */
HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER
,
/* Lm */
HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER
,
/* Lo */
HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER
,
/* Lt */
HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER
,
/* Lu */
HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK
,
/* Mc */
HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK
,
/* Me */
HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK
,
/* Mn */
HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER
,
/* Nd */
HB_UNICODE_GENERAL_CATEGORY_LETTER_NUMBER
,
/* Nl */
HB_UNICODE_GENERAL_CATEGORY_OTHER_NUMBER
,
/* No */
HB_UNICODE_GENERAL_CATEGORY_CONNECT_PUNCTUATION
,
/* Pc */
HB_UNICODE_GENERAL_CATEGORY_DASH_PUNCTUATION
,
/* Pd */
HB_UNICODE_GENERAL_CATEGORY_CLOSE_PUNCTUATION
,
/* Pe */
HB_UNICODE_GENERAL_CATEGORY_FINAL_PUNCTUATION
,
/* Pf */
HB_UNICODE_GENERAL_CATEGORY_INITIAL_PUNCTUATION
,
/* Pi */
HB_UNICODE_GENERAL_CATEGORY_OTHER_PUNCTUATION
,
/* Po */
HB_UNICODE_GENERAL_CATEGORY_OPEN_PUNCTUATION
,
/* Ps */
HB_UNICODE_GENERAL_CATEGORY_CURRENCY_SYMBOL
,
/* Sc */
HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL
,
/* Sk */
HB_UNICODE_GENERAL_CATEGORY_MATH_SYMBOL
,
/* Sm */
HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL
,
/* So */
HB_UNICODE_GENERAL_CATEGORY_LINE_SEPARATOR
,
/* Zl */
HB_UNICODE_GENERAL_CATEGORY_PARAGRAPH_SEPARATOR
,
/* Zp */
HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR
/* Zs */
}
hb_unicode_general_category_t
;
/* hb_script_t */
/* hb_script_t */
/* http://unicode.org/iso15924/ */
/* http://unicode.org/iso15924/ */
/* http://goo.gl/x9ilM */
/* http://goo.gl/x9ilM */
/* Unicode Character Database property: Script (sc) */
typedef
enum
typedef
enum
{
{
/* Unicode-1.1 additions */
/* Unicode-1.1 additions */
...
...
src/hb-glib.cc
浏览文件 @
21fdcee0
...
@@ -192,13 +192,13 @@ hb_glib_script_from_script (hb_script_t script)
...
@@ -192,13 +192,13 @@ hb_glib_script_from_script (hb_script_t script)
}
}
static
unsigned
in
t
static
hb_unicode_combining_class_
t
hb_glib_unicode_combining_class
(
hb_unicode_funcs_t
*
ufuncs
HB_UNUSED
,
hb_glib_unicode_combining_class
(
hb_unicode_funcs_t
*
ufuncs
HB_UNUSED
,
hb_codepoint_t
unicode
,
hb_codepoint_t
unicode
,
void
*
user_data
HB_UNUSED
)
void
*
user_data
HB_UNUSED
)
{
{
return
g_unichar_combining_class
(
unicode
);
return
(
hb_unicode_combining_class_t
)
g_unichar_combining_class
(
unicode
);
}
}
static
unsigned
int
static
unsigned
int
...
...
src/hb-icu.cc
浏览文件 @
21fdcee0
...
@@ -63,13 +63,13 @@ hb_icu_script_from_script (hb_script_t script)
...
@@ -63,13 +63,13 @@ hb_icu_script_from_script (hb_script_t script)
}
}
static
unsigned
in
t
static
hb_unicode_combining_class_
t
hb_icu_unicode_combining_class
(
hb_unicode_funcs_t
*
ufuncs
HB_UNUSED
,
hb_icu_unicode_combining_class
(
hb_unicode_funcs_t
*
ufuncs
HB_UNUSED
,
hb_codepoint_t
unicode
,
hb_codepoint_t
unicode
,
void
*
user_data
HB_UNUSED
)
void
*
user_data
HB_UNUSED
)
{
{
return
u_getCombiningClass
(
unicode
);
return
(
hb_unicode_combining_class_t
)
u_getCombiningClass
(
unicode
);
}
}
static
unsigned
int
static
unsigned
int
...
...
src/hb-unicode-private.hh
浏览文件 @
21fdcee0
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
/* Simple callbacks are those taking a hb_codepoint_t and returning a hb_codepoint_t */
/* Simple callbacks are those taking a hb_codepoint_t and returning a hb_codepoint_t */
#define HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE \
#define HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE \
HB_UNICODE_FUNC_IMPLEMENT (
unsigned in
t, combining_class) \
HB_UNICODE_FUNC_IMPLEMENT (
hb_unicode_combining_class_
t, combining_class) \
HB_UNICODE_FUNC_IMPLEMENT (unsigned int, eastasian_width) \
HB_UNICODE_FUNC_IMPLEMENT (unsigned int, eastasian_width) \
HB_UNICODE_FUNC_IMPLEMENT (hb_unicode_general_category_t, general_category) \
HB_UNICODE_FUNC_IMPLEMENT (hb_unicode_general_category_t, general_category) \
HB_UNICODE_FUNC_IMPLEMENT (hb_codepoint_t, mirroring) \
HB_UNICODE_FUNC_IMPLEMENT (hb_codepoint_t, mirroring) \
...
...
src/hb-unicode.cc
浏览文件 @
21fdcee0
...
@@ -38,12 +38,12 @@
...
@@ -38,12 +38,12 @@
* hb_unicode_funcs_t
* hb_unicode_funcs_t
*/
*/
static
unsigned
in
t
static
hb_unicode_combining_class_
t
hb_unicode_combining_class_nil
(
hb_unicode_funcs_t
*
ufuncs
HB_UNUSED
,
hb_unicode_combining_class_nil
(
hb_unicode_funcs_t
*
ufuncs
HB_UNUSED
,
hb_codepoint_t
unicode
HB_UNUSED
,
hb_codepoint_t
unicode
HB_UNUSED
,
void
*
user_data
HB_UNUSED
)
void
*
user_data
HB_UNUSED
)
{
{
return
0
;
return
HB_UNICODE_COMBINING_CLASS_NOT_REORDERED
;
}
}
static
unsigned
int
static
unsigned
int
...
@@ -354,11 +354,11 @@ _hb_unicode_modified_combining_class (hb_unicode_funcs_t *ufuncs,
...
@@ -354,11 +354,11 @@ _hb_unicode_modified_combining_class (hb_unicode_funcs_t *ufuncs,
*/
*/
c
=
c
==
33
?
27
:
c
+
1
;
c
=
c
==
33
?
27
:
c
+
1
;
}
}
else
if
(
unlikely
(
hb_in_range
<
int
>
(
c
,
10
,
2
5
)))
else
if
(
unlikely
(
hb_in_range
<
int
>
(
c
,
10
,
2
6
)))
{
{
/* The equivalent fix for Hebrew is more complex.
/* The equivalent fix for Hebrew is more complex.
*
*
* We permute the "fixed-position" classes 10-2
5
into the order
* We permute the "fixed-position" classes 10-2
6
into the order
* described in the SBL Hebrew manual:
* described in the SBL Hebrew manual:
*
*
* http://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf
* http://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf
...
@@ -369,7 +369,7 @@ _hb_unicode_modified_combining_class (hb_unicode_funcs_t *ufuncs,
...
@@ -369,7 +369,7 @@ _hb_unicode_modified_combining_class (hb_unicode_funcs_t *ufuncs,
* More details here:
* More details here:
* https://bugzilla.mozilla.org/show_bug.cgi?id=662055
* https://bugzilla.mozilla.org/show_bug.cgi?id=662055
*/
*/
static
const
int
permuted_hebrew_classes
[
2
5
-
10
+
1
]
=
{
static
const
int
permuted_hebrew_classes
[
2
6
-
10
+
1
]
=
{
/* 10 sheva */
22
,
/* 10 sheva */
22
,
/* 11 hataf segol */
15
,
/* 11 hataf segol */
15
,
/* 12 hataf patah */
16
,
/* 12 hataf patah */
16
,
...
@@ -386,6 +386,7 @@ _hb_unicode_modified_combining_class (hb_unicode_funcs_t *ufuncs,
...
@@ -386,6 +386,7 @@ _hb_unicode_modified_combining_class (hb_unicode_funcs_t *ufuncs,
/* 23 rafe */
13
,
/* 23 rafe */
13
,
/* 24 shin dot */
10
,
/* 24 shin dot */
10
,
/* 25 sin dot */
11
,
/* 25 sin dot */
11
,
/* 26 point varika */
26
,
};
};
c
=
permuted_hebrew_classes
[
c
-
10
];
c
=
permuted_hebrew_classes
[
c
-
10
];
}
}
...
...
src/hb-unicode.h
浏览文件 @
21fdcee0
...
@@ -40,6 +40,126 @@
...
@@ -40,6 +40,126 @@
HB_BEGIN_DECLS
HB_BEGIN_DECLS
/* hb_unicode_general_category_t */
/* Unicode Character Database property: General_Category (gc) */
typedef
enum
{
HB_UNICODE_GENERAL_CATEGORY_CONTROL
,
/* Cc */
HB_UNICODE_GENERAL_CATEGORY_FORMAT
,
/* Cf */
HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED
,
/* Cn */
HB_UNICODE_GENERAL_CATEGORY_PRIVATE_USE
,
/* Co */
HB_UNICODE_GENERAL_CATEGORY_SURROGATE
,
/* Cs */
HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER
,
/* Ll */
HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER
,
/* Lm */
HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER
,
/* Lo */
HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER
,
/* Lt */
HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER
,
/* Lu */
HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK
,
/* Mc */
HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK
,
/* Me */
HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK
,
/* Mn */
HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER
,
/* Nd */
HB_UNICODE_GENERAL_CATEGORY_LETTER_NUMBER
,
/* Nl */
HB_UNICODE_GENERAL_CATEGORY_OTHER_NUMBER
,
/* No */
HB_UNICODE_GENERAL_CATEGORY_CONNECT_PUNCTUATION
,
/* Pc */
HB_UNICODE_GENERAL_CATEGORY_DASH_PUNCTUATION
,
/* Pd */
HB_UNICODE_GENERAL_CATEGORY_CLOSE_PUNCTUATION
,
/* Pe */
HB_UNICODE_GENERAL_CATEGORY_FINAL_PUNCTUATION
,
/* Pf */
HB_UNICODE_GENERAL_CATEGORY_INITIAL_PUNCTUATION
,
/* Pi */
HB_UNICODE_GENERAL_CATEGORY_OTHER_PUNCTUATION
,
/* Po */
HB_UNICODE_GENERAL_CATEGORY_OPEN_PUNCTUATION
,
/* Ps */
HB_UNICODE_GENERAL_CATEGORY_CURRENCY_SYMBOL
,
/* Sc */
HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL
,
/* Sk */
HB_UNICODE_GENERAL_CATEGORY_MATH_SYMBOL
,
/* Sm */
HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL
,
/* So */
HB_UNICODE_GENERAL_CATEGORY_LINE_SEPARATOR
,
/* Zl */
HB_UNICODE_GENERAL_CATEGORY_PARAGRAPH_SEPARATOR
,
/* Zp */
HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR
/* Zs */
}
hb_unicode_general_category_t
;
/* hb_unicode_combining_class_t */
/* Unicode Character Database property: Canonical_Combining_Class (ccc) */
typedef
enum
{
HB_UNICODE_COMBINING_CLASS_NOT_REORDERED
=
0
,
HB_UNICODE_COMBINING_CLASS_OVERLAY
=
1
,
HB_UNICODE_COMBINING_CLASS_NUKTA
=
7
,
HB_UNICODE_COMBINING_CLASS_KANA_VOICING
=
8
,
HB_UNICODE_COMBINING_CLASS_VIRAMA
=
9
,
/* Hebrew */
HB_UNICODE_COMBINING_CLASS_CCC10
=
10
,
HB_UNICODE_COMBINING_CLASS_CCC11
=
11
,
HB_UNICODE_COMBINING_CLASS_CCC12
=
12
,
HB_UNICODE_COMBINING_CLASS_CCC13
=
13
,
HB_UNICODE_COMBINING_CLASS_CCC14
=
14
,
HB_UNICODE_COMBINING_CLASS_CCC15
=
15
,
HB_UNICODE_COMBINING_CLASS_CCC16
=
16
,
HB_UNICODE_COMBINING_CLASS_CCC17
=
17
,
HB_UNICODE_COMBINING_CLASS_CCC18
=
18
,
HB_UNICODE_COMBINING_CLASS_CCC19
=
19
,
HB_UNICODE_COMBINING_CLASS_CCC20
=
20
,
HB_UNICODE_COMBINING_CLASS_CCC21
=
21
,
HB_UNICODE_COMBINING_CLASS_CCC22
=
22
,
HB_UNICODE_COMBINING_CLASS_CCC23
=
23
,
HB_UNICODE_COMBINING_CLASS_CCC24
=
24
,
HB_UNICODE_COMBINING_CLASS_CCC25
=
25
,
HB_UNICODE_COMBINING_CLASS_CCC26
=
26
,
/* Arabic */
HB_UNICODE_COMBINING_CLASS_CCC27
=
27
,
HB_UNICODE_COMBINING_CLASS_CCC28
=
28
,
HB_UNICODE_COMBINING_CLASS_CCC29
=
29
,
HB_UNICODE_COMBINING_CLASS_CCC30
=
30
,
HB_UNICODE_COMBINING_CLASS_CCC31
=
31
,
HB_UNICODE_COMBINING_CLASS_CCC32
=
32
,
HB_UNICODE_COMBINING_CLASS_CCC33
=
33
,
HB_UNICODE_COMBINING_CLASS_CCC34
=
34
,
HB_UNICODE_COMBINING_CLASS_CCC35
=
35
,
/* Syriac */
HB_UNICODE_COMBINING_CLASS_CCC36
=
36
,
/* Telugu */
HB_UNICODE_COMBINING_CLASS_CCC84
=
84
,
HB_UNICODE_COMBINING_CLASS_CCC91
=
91
,
/* Thai */
HB_UNICODE_COMBINING_CLASS_CCC103
=
103
,
HB_UNICODE_COMBINING_CLASS_CCC107
=
107
,
/* Lao */
HB_UNICODE_COMBINING_CLASS_CCC118
=
118
,
HB_UNICODE_COMBINING_CLASS_CCC122
=
122
,
/* Tibetan */
HB_UNICODE_COMBINING_CLASS_CCC129
=
129
,
HB_UNICODE_COMBINING_CLASS_CCC130
=
130
,
HB_UNICODE_COMBINING_CLASS_CCC133
=
132
,
HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW_LEFT
=
200
,
HB_UNICODE_COMBINING_CLASS_ATTACHED_BELOW
=
202
,
HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE
=
214
,
HB_UNICODE_COMBINING_CLASS_ATTACHED_ABOVE_RIGHT
=
216
,
HB_UNICODE_COMBINING_CLASS_BELOW_LEFT
=
218
,
HB_UNICODE_COMBINING_CLASS_BELOW
=
220
,
HB_UNICODE_COMBINING_CLASS_BELOW_RIGHT
=
222
,
HB_UNICODE_COMBINING_CLASS_LEFT
=
224
,
HB_UNICODE_COMBINING_CLASS_RIGHT
=
226
,
HB_UNICODE_COMBINING_CLASS_ABOVE_LEFT
=
228
,
HB_UNICODE_COMBINING_CLASS_ABOVE
=
230
,
HB_UNICODE_COMBINING_CLASS_ABOVE_RIGHT
=
232
,
HB_UNICODE_COMBINING_CLASS_DOUBLE_BELOW
=
233
,
HB_UNICODE_COMBINING_CLASS_DOUBLE_ABOVE
=
234
,
HB_UNICODE_COMBINING_CLASS_IOTA_SUBSCRIPT
=
240
,
HB_UNICODE_COMBINING_CLASS_INVALID
=
255
}
hb_unicode_combining_class_t
;
/*
/*
* hb_unicode_funcs_t
* hb_unicode_funcs_t
*/
*/
...
@@ -95,7 +215,7 @@ hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs);
...
@@ -95,7 +215,7 @@ hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs);
/* typedefs */
/* typedefs */
typedef
unsigned
int
(
*
hb_unicode_combining_class_func_t
)
(
hb_unicode_funcs_t
*
ufuncs
,
typedef
hb_unicode_combining_class_t
(
*
hb_unicode_combining_class_func_t
)
(
hb_unicode_funcs_t
*
ufuncs
,
hb_codepoint_t
unicode
,
hb_codepoint_t
unicode
,
void
*
user_data
);
void
*
user_data
);
typedef
unsigned
int
(
*
hb_unicode_eastasian_width_func_t
)
(
hb_unicode_funcs_t
*
ufuncs
,
typedef
unsigned
int
(
*
hb_unicode_eastasian_width_func_t
)
(
hb_unicode_funcs_t
*
ufuncs
,
...
@@ -192,7 +312,7 @@ hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs,
...
@@ -192,7 +312,7 @@ hb_unicode_funcs_set_decompose_compatibility_func (hb_unicode_funcs_t *ufuncs,
/* accessors */
/* accessors */
unsigned
in
t
hb_unicode_combining_class_
t
hb_unicode_combining_class
(
hb_unicode_funcs_t
*
ufuncs
,
hb_unicode_combining_class
(
hb_unicode_funcs_t
*
ufuncs
,
hb_codepoint_t
unicode
);
hb_codepoint_t
unicode
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录