Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
55468ca0
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
接近 2 年 前同步成功
通知
1
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看板
提交
55468ca0
编写于
10月 04, 2018
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[test/text-rendering-tests] Update from upstream
上级
6ff8a8a1
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
36 addition
and
11 deletion
+36
-11
test/shaping/data/text-rendering-tests/Makefile.sources
test/shaping/data/text-rendering-tests/Makefile.sources
+5
-1
test/shaping/data/text-rendering-tests/extract-tests.py
test/shaping/data/text-rendering-tests/extract-tests.py
+12
-0
test/shaping/data/text-rendering-tests/fonts/TestGSUBThree.ttf
...shaping/data/text-rendering-tests/fonts/TestGSUBThree.ttf
+0
-0
test/shaping/data/text-rendering-tests/fonts/TestMORXThirtyfour.ttf
...ng/data/text-rendering-tests/fonts/TestMORXThirtyfour.ttf
+0
-0
test/shaping/data/text-rendering-tests/fonts/TestMORXThirtythree.ttf
...g/data/text-rendering-tests/fonts/TestMORXThirtythree.ttf
+0
-0
test/shaping/data/text-rendering-tests/fonts/TestMORXTwentyfour.ttf
...ng/data/text-rendering-tests/fonts/TestMORXTwentyfour.ttf
+0
-0
test/shaping/data/text-rendering-tests/tests/GSUB-3.tests
test/shaping/data/text-rendering-tests/tests/GSUB-3.tests
+1
-0
test/shaping/data/text-rendering-tests/tests/MORX-24.tests
test/shaping/data/text-rendering-tests/tests/MORX-24.tests
+1
-0
test/shaping/data/text-rendering-tests/tests/MORX-32.tests
test/shaping/data/text-rendering-tests/tests/MORX-32.tests
+4
-4
test/shaping/data/text-rendering-tests/tests/MORX-33.tests
test/shaping/data/text-rendering-tests/tests/MORX-33.tests
+3
-0
test/shaping/data/text-rendering-tests/tests/MORX-34.tests
test/shaping/data/text-rendering-tests/tests/MORX-34.tests
+1
-0
test/shaping/run-tests.py
test/shaping/run-tests.py
+9
-6
未找到文件。
test/shaping/data/text-rendering-tests/Makefile.sources
浏览文件 @
55468ca0
...
...
@@ -15,6 +15,7 @@ TESTS = \
tests/GPOS-5.tests
\
tests/GSUB-1.tests
\
tests/GSUB-2.tests
\
tests/GSUB-3.tests
\
tests/GVAR-1.tests
\
tests/GVAR-2.tests
\
tests/GVAR-3.tests
\
...
...
@@ -42,6 +43,7 @@ TESTS = \
tests/MORX-21.tests
\
tests/MORX-22.tests
\
tests/MORX-23.tests
\
tests/MORX-24.tests
\
tests/MORX-25.tests
\
tests/MORX-26.tests
\
tests/MORX-27.tests
\
...
...
@@ -50,6 +52,9 @@ TESTS = \
tests/MORX-2.tests
\
tests/MORX-30.tests
\
tests/MORX-31.tests
\
tests/MORX-32.tests
\
tests/MORX-33.tests
\
tests/MORX-34.tests
\
tests/MORX-3.tests
\
tests/MORX-4.tests
\
tests/MORX-5.tests
\
...
...
@@ -68,5 +73,4 @@ DISBALED_TESTS = \
tests/SHBALI-2.tests
\
tests/SHKNDA-2.tests
\
tests/SHKNDA-3.tests
\
tests/MORX-32.tests
\
$(NULL)
test/shaping/data/text-rendering-tests/extract-tests.py
浏览文件 @
55468ca0
...
...
@@ -28,6 +28,7 @@ def glyphstr(glyphs):
html
=
ET
.
fromstring
(
sys
.
stdin
.
read
())
found
=
False
for
elt
in
html
.
findall
(
".//*[@class='expected'][@ft:id]"
,
namespaces
):
found
=
True
name
=
elt
.
get
(
ns
(
'ft:id'
))
...
...
@@ -47,4 +48,15 @@ for elt in html.findall(".//*[@class='expected'][@ft:id]", namespaces):
opts
=
opts
+
' --variations=%s'
%
variations
print
(
"../fonts/%s:%s:%s:%s"
%
(
font
,
opts
,
unistr
(
text
),
glyphstr
(
glyphs
)))
for
elt
in
html
.
findall
(
".//*[@class='should-not-crash'][@ft:id]"
,
namespaces
):
found
=
True
name
=
elt
.
get
(
ns
(
'ft:id'
))
text
=
elt
.
get
(
ns
(
'ft:render'
))
font
=
elt
.
get
(
ns
(
'ft:font'
))
variations
=
elt
.
get
(
ns
(
'ft:var'
),
''
).
replace
(
':'
,
'='
).
replace
(
';'
,
','
)
opts
=
''
if
variations
:
opts
=
'--variations=%s'
%
variations
print
(
"../fonts/%s:%s:%s:*"
%
(
font
,
opts
,
unistr
(
text
)))
sys
.
exit
(
0
if
found
else
1
)
test/shaping/data/text-rendering-tests/fonts/TestGSUBThree.ttf
0 → 100644
浏览文件 @
55468ca0
文件已添加
test/shaping/data/text-rendering-tests/fonts/TestMORXThirtyfour.ttf
0 → 100644
浏览文件 @
55468ca0
文件已添加
test/shaping/data/text-rendering-tests/fonts/TestMORXThirtythree.ttf
0 → 100644
浏览文件 @
55468ca0
文件已添加
test/shaping/data/text-rendering-tests/fonts/TestMORXTwentyfour.ttf
0 → 100644
浏览文件 @
55468ca0
文件已添加
test/shaping/data/text-rendering-tests/tests/GSUB-3.tests
0 → 100644
浏览文件 @
55468ca0
../fonts/TestGSUBThree.ttf::U+006C,U+006F,U+006C:*
test/shaping/data/text-rendering-tests/tests/MORX-24.tests
0 → 100644
浏览文件 @
55468ca0
../fonts/TestMORXTwentyfour.ttf::U+0041,U+0042,U+0043,U+0044,U+0045:*
test/shaping/data/text-rendering-tests/tests/MORX-32.tests
浏览文件 @
55468ca0
../fonts/TestMORXThirtytwo.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041:[
I|N@830,0|S@1660,0|A@2490,0
]
../fonts/TestMORXThirtytwo.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0058,U+0041,U+0059:[
I|N@830,0|S@1660,0|X@2490,0|A@2854,0|Y@368
4,0]
../fonts/TestMORXThirtytwo.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0042:[B
|I@830,0|N@1660,0|S@2490,0
]
../fonts/TestMORXThirtytwo.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0058,U+0042,U+0059:[X|
I@364,0|N@1194,0|S@2024,0|B@2854,0|Y@368
4,0]
../fonts/TestMORXThirtytwo.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0041:[
A
]
../fonts/TestMORXThirtytwo.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0058,U+0041,U+0059:[
X|A@364,0|Y@119
4,0]
../fonts/TestMORXThirtytwo.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0042:[B]
../fonts/TestMORXThirtytwo.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0058,U+0042,U+0059:[X|
B@364,0|Y@119
4,0]
test/shaping/data/text-rendering-tests/tests/MORX-33.tests
0 → 100644
浏览文件 @
55468ca0
../fonts/TestMORXThirtythree.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0068,U+0061:[h|a@618,0|h@1179,0|a@1797,0]
../fonts/TestMORXThirtythree.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0068,U+0061,U+0068,U+0061:[h|a@618,0|h@1179,0|a@1797,0|h@2358,0|a@2976,0|h@3537,0|a@4155,0]
../fonts/TestMORXThirtythree.ttf:--font-size=1000 --ned --remove-default-ignorables --font-funcs=ft:U+0061,U+0068:[a|h@561,0]
test/shaping/data/text-rendering-tests/tests/MORX-34.tests
0 → 100644
浏览文件 @
55468ca0
../fonts/TestMORXThirtyfour.ttf::U+0068,U+0061:*
test/shaping/run-tests.py
浏览文件 @
55468ca0
...
...
@@ -19,8 +19,6 @@ if not args or sys.argv[1].find('hb-shape') == -1 or not os.path.exists (sys.arg
sys
.
exit
(
1
)
hb_shape
,
args
=
args
[
0
],
args
[
1
:]
extra_options
=
"--verify"
fails
=
0
reference
=
False
...
...
@@ -48,6 +46,11 @@ for filename in args:
cwd
=
os
.
path
.
dirname
(
filename
)
fontfile
=
os
.
path
.
normpath
(
os
.
path
.
join
(
cwd
,
fontfile
))
extra_options
=
[]
glyphs_expected
=
glyphs_expected
.
strip
()
if
glyphs_expected
!=
'*'
:
extra_options
.
append
(
"--verify"
)
if
line
.
startswith
(
"#"
):
if
not
reference
:
print
(
"# %s %s --unicodes %s"
%
(
hb_shape
,
fontfile
,
unicodes
))
...
...
@@ -55,10 +58,10 @@ for filename in args:
if
not
reference
:
print
(
"%s %s %s %s --unicodes %s"
%
(
hb_shape
,
fontfile
,
extra_options
,
options
,
unicodes
))
(
hb_shape
,
fontfile
,
' '
.
join
(
extra_options
)
,
options
,
unicodes
))
glyphs1
,
returncode
=
cmd
([
hb_shape
,
"--font-funcs=ft"
,
fontfile
,
extra_options
,
"--unicodes"
,
fontfile
]
+
extra_options
+
[
"--unicodes"
,
unicodes
]
+
(
options
.
split
(
' '
)
if
options
else
[]))
if
returncode
:
...
...
@@ -67,7 +70,7 @@ for filename in args:
#continue
glyphs2
,
returncode
=
cmd
([
hb_shape
,
"--font-funcs=ot"
,
fontfile
,
extra_options
,
"--unicodes"
,
fontfile
]
+
extra_options
+
[
"--unicodes"
,
unicodes
]
+
(
options
.
split
(
' '
)
if
options
else
[]))
if
returncode
:
...
...
@@ -84,7 +87,7 @@ for filename in args:
print
(
":"
.
join
([
fontfile
,
options
,
unicodes
,
glyphs1
]))
continue
if
glyphs1
.
strip
()
!=
glyphs_expected
.
strip
()
and
glyphs_expected
.
strip
()
!=
'*'
:
if
glyphs1
.
strip
()
!=
glyphs_expected
and
glyphs_expected
!=
'*'
:
print
(
"Actual: "
+
glyphs1
)
# file=sys.stderr
print
(
"Expected: "
+
glyphs_expected
)
# file=sys.stderr
fails
=
fails
+
1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录