Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
6334495a
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,发现更多精彩内容 >>
提交
6334495a
编写于
7月 10, 2014
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use zh-Hans / zh-Hant when converting OT language tag to hb_language_t
上级
f381e320
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
15 deletion
+6
-15
src/hb-ot-tag.cc
src/hb-ot-tag.cc
+3
-12
test/api/test-ot-tag.c
test/api/test-ot-tag.c
+3
-3
未找到文件。
src/hb-ot-tag.cc
浏览文件 @
6334495a
...
...
@@ -880,18 +880,9 @@ hb_ot_tag_to_language (hb_tag_t tag)
if
((
tag
&
0xFFFF0000
)
==
0x5A480000
)
{
switch
(
tag
)
{
case
HB_TAG
(
'Z'
,
'H'
,
'H'
,
' '
):
return
hb_language_from_string
(
"zh-hk"
,
-
1
);
/* Hong Kong */
default:
{
/* Encode the tag... */
unsigned
char
buf
[
14
]
=
"zh-x-hbot"
;
buf
[
9
]
=
tag
>>
24
;
buf
[
10
]
=
(
tag
>>
16
)
&
0xFF
;
buf
[
11
]
=
(
tag
>>
8
)
&
0xFF
;
buf
[
12
]
=
tag
&
0xFF
;
if
(
buf
[
12
]
==
0x20
)
buf
[
12
]
=
'\0'
;
buf
[
13
]
=
'\0'
;
return
hb_language_from_string
((
char
*
)
buf
,
-
1
);
}
case
HB_TAG
(
'Z'
,
'H'
,
'S'
,
' '
):
return
hb_language_from_string
(
"zh-Hans"
,
-
1
);
/* Simplified */
case
HB_TAG
(
'Z'
,
'H'
,
'T'
,
' '
):
return
hb_language_from_string
(
"zh-Hant"
,
-
1
);
/* Traditional */
default:
break
;
/* Fall through */
}
}
...
...
test/api/test-ot-tag.c
浏览文件 @
6334495a
...
...
@@ -207,9 +207,9 @@ test_ot_tag_language (void)
test_tag_from_language
(
"ZHS"
,
"zh"
);
/* Chinese */
test_tag_from_language
(
"ZHS"
,
"zh-xx"
);
test_tag_to_language
(
"ZHS"
,
"zh-
x-hbotzh
s"
);
test_tag_to_language
(
"ZHT"
,
"zh-
x-hbotzh
t"
);
test_tag_to_language
(
"ZHP"
,
"
zh-
x-hbotzhp"
);
test_tag_to_language
(
"ZHS"
,
"zh-
Han
s"
);
test_tag_to_language
(
"ZHT"
,
"zh-
Han
t"
);
test_tag_to_language
(
"ZHP"
,
"x-hbotzhp"
);
test_language_two_way
(
"ABC"
,
"x-hbotabc"
);
test_tag_from_language
(
"ABC"
,
"asdf-asdf-wer-x-hbotabc-zxc"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录