Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
01b9148d
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看板
提交
01b9148d
编写于
9月 14, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[unicode] Move Fitzpatrick hack from ot-layout into unicode.hh
上级
6ebbf514
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
28 addition
and
20 deletion
+28
-20
src/hb-ot-layout.hh
src/hb-ot-layout.hh
+1
-11
src/hb-unicode.hh
src/hb-unicode.hh
+27
-9
未找到文件。
src/hb-ot-layout.hh
浏览文件 @
01b9148d
...
...
@@ -245,7 +245,7 @@ _hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_buffer_t *buffer)
props
|=
UPROPS_MASK_HIDDEN
;
}
}
else
if
(
unlikely
(
HB_UNICODE_GENERAL_CATEGORY_IS_NON_ENCLOSING_MARK
_OR_MODIFIER_SYMBOL
(
gen_cat
)))
else
if
(
unlikely
(
HB_UNICODE_GENERAL_CATEGORY_IS_NON_ENCLOSING_MARK
(
gen_cat
)))
{
/* The above check is just an optimization to let in only things we need further
* processing on. */
...
...
@@ -264,16 +264,6 @@ _hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_buffer_t *buffer)
* the "else if".
*/
props
|=
unicode
->
modified_combining_class
(
u
)
<<
8
;
/* Recategorize emoji skin-tone modifiers as Unicode mark, so they
* behave correctly in non-native directionality. They originally
* are MODIFIER_SYMBOL. Fixes:
* https://github.com/harfbuzz/harfbuzz/issues/169
*/
if
(
unlikely
(
hb_in_range
(
u
,
0x1F3FBu
,
0x1F3FFu
)))
{
props
=
gen_cat
=
HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK
;
}
}
}
...
...
src/hb-unicode.hh
浏览文件 @
01b9148d
...
...
@@ -102,23 +102,42 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE
}
inline
hb_unicode_general_category_t
modified_general_category
(
hb_codepoint_t
u
)
{
hb_unicode_general_category_t
cat
=
general_category
(
u
);
if
(
unlikely
(
cat
==
HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL
))
{
/* Recategorize emoji skin-tone modifiers as Unicode mark, so they
* behave correctly in non-native directionality. They originally
* are MODIFIER_SYMBOL. Fixes:
* https://github.com/harfbuzz/harfbuzz/issues/169
*/
if
(
unlikely
(
hb_in_range
(
u
,
0x1F3FBu
,
0x1F3FFu
)))
cat
=
HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK
;
}
return
cat
;
}
inline
unsigned
int
modified_combining_class
(
hb_codepoint_t
u
nicode
)
modified_combining_class
(
hb_codepoint_t
u
)
{
/* XXX This hack belongs to the Myanmar shaper. */
if
(
unlikely
(
u
nicode
==
0x1037u
))
unicode
=
0x103Au
;
if
(
unlikely
(
u
==
0x1037u
))
u
=
0x103Au
;
/* XXX This hack belongs to the USE shaper (for Tai Tham):
* Reorder SAKOT to ensure it comes after any tone marks. */
if
(
unlikely
(
u
nicode
==
0x1A60u
))
return
254
;
if
(
unlikely
(
u
==
0x1A60u
))
return
254
;
/* XXX This hack belongs to the Tibetan shaper:
* Reorder PADMA to ensure it comes after any vowel marks. */
if
(
unlikely
(
u
nicode
==
0x0FC6u
))
return
254
;
if
(
unlikely
(
u
==
0x0FC6u
))
return
254
;
/* Reorder TSA -PHRU to reorder before U+0F74 */
if
(
unlikely
(
u
nicode
==
0x0F39u
))
return
127
;
if
(
unlikely
(
u
==
0x0F39u
))
return
127
;
return
_hb_modified_combining_class
[
combining_class
(
u
nicode
)];
return
_hb_modified_combining_class
[
combining_class
(
u
)];
}
static
inline
hb_bool_t
...
...
@@ -360,10 +379,9 @@ DECLARE_NULL_INSTANCE (hb_unicode_funcs_t);
FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) | \
FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)))
#define HB_UNICODE_GENERAL_CATEGORY_IS_NON_ENCLOSING_MARK
_OR_MODIFIER_SYMBOL
(gen_cat) \
#define HB_UNICODE_GENERAL_CATEGORY_IS_NON_ENCLOSING_MARK(gen_cat) \
(FLAG_UNSAFE (gen_cat) & \
(FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) | \
FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) | \
FLAG (HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL)))
FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)))
#endif
/* HB_UNICODE_HH */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录