Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
7b08b0a7
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看板
提交
7b08b0a7
编写于
7月 20, 2011
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor
上级
498e1a9b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
4 deletion
+23
-4
src/hb-ot-shape-complex-arabic.cc
src/hb-ot-shape-complex-arabic.cc
+4
-4
src/hb-private.hh
src/hb-private.hh
+19
-0
未找到文件。
src/hb-ot-shape-complex-arabic.cc
浏览文件 @
7b08b0a7
...
...
@@ -61,25 +61,25 @@ static unsigned int get_joining_type (hb_codepoint_t u, hb_unicode_general_categ
{
/* TODO Macroize the magic bit operations */
if
(
likely
(
JOINING_TABLE_FIRST
<=
u
&&
u
<=
JOINING_TABLE_LAST
))
{
if
(
likely
(
hb_codepoint_in_range
(
u
,
JOINING_TABLE_FIRST
,
JOINING_TABLE_LAST
)
))
{
unsigned
int
j_type
=
joining_table
[
u
-
JOINING_TABLE_FIRST
];
if
(
likely
(
j_type
!=
JOINING_TYPE_X
))
return
j_type
;
}
/* Mongolian joining data is not in ArabicJoining.txt yet */
if
(
unlikely
(
0x1800
<=
u
&&
u
<=
0x18AF
))
if
(
unlikely
(
hb_codepoint_in_range
(
u
,
0x1800
,
0x18AF
)
))
{
/* All letters, SIBE SYLLABLE BOUNDARY MARKER, and NIRUGU are D */
if
(
gen_cat
==
HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER
||
u
==
0x1807
||
u
==
0x180A
)
return
JOINING_TYPE_D
;
}
if
(
unlikely
(
(
u
&
~
(
0x200C
^
0x200D
))
==
0x200C
))
{
if
(
unlikely
(
hb_codepoint_in_range
(
u
,
0x200C
,
0x200D
)
))
{
return
u
==
0x200C
?
JOINING_TYPE_U
:
JOINING_TYPE_C
;
}
return
(
(
1
<<
gen_cat
)
&
((
1
<<
HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK
)
|
(
1
<<
HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK
)
|
(
1
<<
HB_UNICODE_GENERAL_CATEGORY_FORMAT
)))
?
return
(
FLAG
(
gen_cat
)
&
(
FLAG
(
HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK
)
|
FLAG
(
HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK
)
|
FLAG
(
HB_UNICODE_GENERAL_CATEGORY_FORMAT
)))
?
JOINING_TYPE_T
:
JOINING_TYPE_U
;
}
...
...
src/hb-private.hh
浏览文件 @
7b08b0a7
...
...
@@ -478,6 +478,25 @@ _hb_trace (const char *what,
}
/* Pre-mature optimization:
* Checks for lo <= u <= hi but with an optimization if lo and hi
* are only different in a contiguous set of lower-most bits.
*/
static
inline
bool
hb_codepoint_in_range
(
hb_codepoint_t
u
,
hb_codepoint_t
lo
,
hb_codepoint_t
hi
)
{
if
(
((
lo
^
hi
)
&
lo
)
==
0
&&
((
lo
^
hi
)
&
hi
)
==
(
lo
^
hi
)
&&
((
lo
^
hi
)
&
((
lo
^
hi
)
+
1
))
==
0
)
return
(
u
&
~
(
lo
^
hi
))
==
lo
;
else
return
lo
<=
u
&&
u
<=
hi
;
}
/* Useful for set-operations on small enums */
#define FLAG(x) (1<<(x))
HB_END_DECLS
#endif
/* HB_PRIVATE_HH */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录