Commit 08868a81 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

tests: Reuse attribute serialization code

Update affected test outputs.
parent c58dfbfa
<span font="Cantarell 11" fallback="false">a b
c</span>
Items: a b |[0x2028] |c
Chars: 3(0) |1(3) |1(4)
Font: Cantarell 11 |Cantarell 11 |Cantarell 11
Script: latin |latin |latin
Lang: en-us |en-us |en-us
Bidi: 0 |0 |0
Attrs: [0,7]fallback=0|[0,7]fallback=0|[0,7]fallback=0
Items: a b |[0x2028] |c
Chars: 3(0) |1(3) |1(4)
Font: Cantarell 11 |Cantarell 11 |Cantarell 11
Script: latin |latin |latin
Lang: en-us |en-us |en-us
Bidi: 0 |0 |0
Attrs: 0 7 fallback false|0 7 fallback false|0 7 fallback false
<span font="Cantarell 11">one <span font_features="tnum=0">tw<u>o</u> <span font_features="dlig=1">two</span> </span>th<b>r</b>ee</span>
Items: one two two th |r |ee
Chars: 14(0) |1(14) |2(15)
Font: Cantarell 11 |Cantarell Bold 11|Cantarell 11
Script: latin |latin |latin
Lang: en-us |en-us |en-us
Bidi: 0 |0 |0
Attrs: [8,11]font-features=dlig=1,[6,7]underline=1,[4,12]font-features=tnum=0| |
Items: one two two th |r |ee
Chars: 14(0) |1(14) |2(15)
Font: Cantarell 11 |Cantarell Bold 11|Cantarell 11
Script: latin |latin |latin
Lang: en-us |en-us |en-us
Bidi: 0 |0 |0
Attrs: 8 11 font-features "dlig=1",6 7 underline single,4 12 font-features "tnum=0"| |
......@@ -11,8 +11,8 @@ width: 225280
range 0 22
range 22 41
[22,41]foreground=#00000000ffff
[22,41]underline=1
22 41 foreground #00000000ffff
22 41 underline single
range 41 2147483647
--- directions
......@@ -33,11 +33,11 @@ i=2, index=49, paragraph-start=1, dir=ltr ''
i=1, index=0, chars=22, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'This is a test of the '
i=2, index=22, chars=11, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'automatic e'
[22,41]foreground=#00000000ffff
[22,41]underline=1
22 41 foreground #00000000ffff
22 41 underline single
i=3, index=33, chars=15, level=0, gravity=south, flags=2, font=OMITTED, script=common, language=en-us, 'mergency brake!'
[0,2147483647]fallback=0
[22,41]foreground=#00000000ffff
[22,41]underline=1
0 2147483647 fallback false
22 41 foreground #00000000ffff
22 41 underline single
i=4, index=48, no run, line end
i=5, index=49, no run, line end
......@@ -32,6 +32,6 @@ i=2, index=12, chars=4, level=1, gravity=south, flags=0, font=OMITTED, script=he
i=3, index=14, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=hebrew, language=he, ' '
i=4, index=15, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=greek, language=el, 'Γ'
i=5, index=17, chars=7, level=0, gravity=south, flags=2, font=OMITTED, script=common, language=en-us, 'ειά σας'
[0,2147483647]fallback=0
0 2147483647 fallback false
i=6, index=30, no run, line end
i=7, index=31, no run, line end
......@@ -10,16 +10,16 @@ width: 225280
--- attributes
range 0 6
[0,6]underline=2
[0,6]overline=1
0 6 underline double
0 6 overline single
range 6 7
range 7 10
[7,10]underline=3
[7,10]strikethrough=1
7 10 underline low
7 10 strikethrough true
range 10 11
range 11 16
[11,16]underline=4
[11,16]rise=1024
11 16 underline error
11 16 rise 1024
range 16 2147483647
--- directions
......@@ -39,15 +39,15 @@ i=2, index=17, paragraph-start=1, dir=ltr ''
--- runs
i=1, index=0, chars=6, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'double'
[0,6]underline=2
[0,6]overline=1
0 6 underline double
0 6 overline single
i=2, index=6, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' '
i=3, index=7, chars=3, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'low'
[7,10]underline=3
[7,10]strikethrough=1
7 10 underline low
7 10 strikethrough true
i=4, index=10, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' '
i=5, index=11, chars=5, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'error'
[11,16]rise=1024
[11,16]underline=4
11 16 rise 1024
11 16 underline error
i=6, index=16, no run, line end
i=7, index=17, no run, line end
......@@ -26,10 +26,10 @@ i=1, index=0, paragraph-start=1, dir=ltr 'a b c d
e f
--- runs
i=1, index=0, chars=25, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'a b c d'
[0,-1]show=2
0 4294967295 show 2
i=2, index=25, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '
'
[0,-1]show=2
0 4294967295 show 2
i=3, index=28, chars=24, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'e f g h
'
[0,-1]show=2
0 4294967295 show 2
i=4, index=52, no run, line end
......@@ -28,7 +28,7 @@ i=2, index=38, paragraph-start=1, dir=ltr ''
--- runs
i=1, index=0, chars=1, level=0, gravity=south, flags=2, font=OMITTED, script=common, language=en-us, '你'
[0,2147483647]fallback=1
0 2147483647 fallback true
i=2, index=3, chars=2, level=0, gravity=south, flags=0, font=OMITTED, script=han, language=xx, '好 '
i=3, index=7, chars=6, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'Hello '
i=4, index=19, chars=4, level=1, gravity=south, flags=0, font=OMITTED, script=hebrew, language=he, 'שלום'
......
......@@ -32,5 +32,5 @@ i=1, index=0, chars=25, level=0, gravity=south, flags=0, font=OMITTED, script=la
i=2, index=25, no run, line end
i=3, index=25, chars=20, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'long enough to wrap '
i=4, index=45, chars=53, level=0, gravity=south, flags=2, font=OMITTED, script=common, language=en-us, 'due to height limitations. It might, or it might not.'
[0,2147483647]fallback=0
0 2147483647 fallback false
i=5, index=98, no run, line end
......@@ -32,6 +32,6 @@ i=1, index=0, chars=25, level=0, gravity=south, flags=0, font=OMITTED, script=la
i=2, index=25, no run, line end
i=3, index=25, chars=20, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'long enough to wrap '
i=4, index=45, chars=53, level=0, gravity=south, flags=2, font=OMITTED, script=common, language=en-us, 'due to height limitations. It might, or it might not.'
[0,2147483647]fallback=0
0 2147483647 fallback false
i=5, index=98, no run, line end
i=6, index=99, no run, line end
......@@ -9,7 +9,7 @@ lines: 3
--- attributes
range 0 57
[0,57]show=7
0 57 show 7
range 57 2147483647
--- directions
......@@ -30,11 +30,11 @@ i=3, index=58, paragraph-start=1, dir=ltr ''
--- runs
i=1, index=0, chars=16, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'some line breaks'
[0,57]show=7
0 57 show 7
i=2, index=16, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '
'
[0,57]show=7
0 57 show 7
i=3, index=19, no run, line end
i=4, index=19, chars=32, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'and mis­ce­llaneous ignora‌bles'
[0,57]show=7
0 57 show 7
i=5, index=57, no run, line end
i=6, index=58, no run, line end
......@@ -10,10 +10,10 @@ lines: 2
range 0 9
range 9 13
[9,13]style=2
9 13 style italic
range 13 20
range 20 25
[20,25]underline=1
20 25 underline single
range 25 2147483647
--- directions
......@@ -36,7 +36,7 @@ i=1, index=0, chars=9, level=0, gravity=south, flags=0, font=OMITTED, script=lat
i=2, index=9, chars=4, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'blue'
i=3, index=13, chars=7, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' drink '
i=4, index=20, chars=5, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'after'
[20,25]underline=1
20 25 underline single
i=5, index=25, chars=7, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' dinner'
i=6, index=32, no run, line end
i=7, index=33, no run, line end
......@@ -9,10 +9,10 @@ lines: 2
--- attributes
range 0 3
[0,3]gravity=1
[0,3]gravity-hint=1
0 3 gravity east
0 3 gravity-hint strong
range 3 6
[3,6]gravity=0
3 6 gravity south
range 6 2147483647
--- directions
......@@ -32,9 +32,9 @@ i=2, index=7, paragraph-start=1, dir=ltr ''
--- runs
i=1, index=0, chars=3, level=0, gravity=east, flags=0, font=OMITTED, script=latin, language=en-us, 'abc'
[0,3]gravity=1
[0,3]gravity-hint=1
0 3 gravity east
0 3 gravity-hint strong
i=2, index=3, chars=3, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'def'
[3,6]gravity=0
3 6 gravity south
i=3, index=6, no run, line end
i=4, index=7, no run, line end
......@@ -10,45 +10,45 @@ lines: 2
range 0 1
range 1 2
[1,2]font-desc=Italic
[1,2]font-scale=2
[1,2]baseline-shift=2
1 2 font-desc "Italic"
1 2 font-scale subscript
1 2 baseline-shift subscript
range 2 6
range 6 7
[6,11]font-scale=1
[6,11]baseline-shift=1
6 11 font-scale superscript
6 11 baseline-shift superscript
range 7 8
[6,11]font-scale=1
[6,11]baseline-shift=1
[7,11]font-scale=1
[7,11]baseline-shift=1
6 11 font-scale superscript
6 11 baseline-shift superscript
7 11 font-scale superscript
7 11 baseline-shift superscript
range 8 9
[6,11]font-scale=1
[6,11]baseline-shift=1
[7,11]font-scale=1
[7,11]baseline-shift=1
[8,11]font-scale=1
[8,11]baseline-shift=1
6 11 font-scale superscript
6 11 baseline-shift superscript
7 11 font-scale superscript
7 11 baseline-shift superscript
8 11 font-scale superscript
8 11 baseline-shift superscript
range 9 10
[6,11]font-scale=1
[6,11]baseline-shift=1
[7,11]font-scale=1
[7,11]baseline-shift=1
[8,11]font-scale=1
[8,11]baseline-shift=1
[9,11]font-scale=1
[9,11]baseline-shift=1
6 11 font-scale superscript
6 11 baseline-shift superscript
7 11 font-scale superscript
7 11 baseline-shift superscript
8 11 font-scale superscript
8 11 baseline-shift superscript
9 11 font-scale superscript
9 11 baseline-shift superscript
range 10 11
[6,11]font-scale=1
[6,11]baseline-shift=1
[7,11]font-scale=1
[7,11]baseline-shift=1
[8,11]font-scale=1
[8,11]baseline-shift=1
[9,11]font-scale=1
[9,11]baseline-shift=1
[10,11]font-scale=1
[10,11]baseline-shift=1
6 11 font-scale superscript
6 11 baseline-shift superscript
7 11 font-scale superscript
7 11 baseline-shift superscript
8 11 font-scale superscript
8 11 baseline-shift superscript
9 11 font-scale superscript
9 11 baseline-shift superscript
10 11 font-scale superscript
10 11 baseline-shift superscript
range 11 2147483647
--- directions
......@@ -69,43 +69,43 @@ i=2, index=12, paragraph-start=1, dir=ltr ''
i=1, index=0, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'e'
i=2, index=1, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '0'
[1,2]font-scale=2
[1,2]baseline-shift=2
1 2 font-scale subscript
1 2 baseline-shift subscript
i=3, index=2, chars=4, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' = o'
i=4, index=6, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'o'
[6,11]font-scale=1
[6,11]baseline-shift=1
6 11 font-scale superscript
6 11 baseline-shift superscript
i=5, index=7, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'o'
[6,11]font-scale=1
[6,11]baseline-shift=1
[7,11]font-scale=1
[7,11]baseline-shift=1
6 11 font-scale superscript
6 11 baseline-shift superscript
7 11 font-scale superscript
7 11 baseline-shift superscript
i=6, index=8, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '.'
[6,11]font-scale=1
[6,11]baseline-shift=1
[7,11]font-scale=1
[7,11]baseline-shift=1
[8,11]font-scale=1
[8,11]baseline-shift=1
6 11 font-scale superscript
6 11 baseline-shift superscript
7 11 font-scale superscript
7 11 baseline-shift superscript
8 11 font-scale superscript
8 11 baseline-shift superscript
i=7, index=9, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '.'
[6,11]font-scale=1
[6,11]baseline-shift=1
[7,11]font-scale=1
[7,11]baseline-shift=1
[8,11]font-scale=1
[8,11]baseline-shift=1
[9,11]font-scale=1
[9,11]baseline-shift=1
6 11 font-scale superscript
6 11 baseline-shift superscript
7 11 font-scale superscript
7 11 baseline-shift superscript
8 11 font-scale superscript
8 11 baseline-shift superscript
9 11 font-scale superscript
9 11 baseline-shift superscript
i=8, index=10, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '.'
[6,11]font-scale=1
[6,11]baseline-shift=1
[7,11]font-scale=1
[7,11]baseline-shift=1
[8,11]font-scale=1
[8,11]baseline-shift=1
[9,11]font-scale=1
[9,11]baseline-shift=1
[10,11]font-scale=1
[10,11]baseline-shift=1
6 11 font-scale superscript
6 11 baseline-shift superscript
7 11 font-scale superscript
7 11 baseline-shift superscript
8 11 font-scale superscript
8 11 baseline-shift superscript
9 11 font-scale superscript
9 11 baseline-shift superscript
10 11 font-scale superscript
10 11 baseline-shift superscript
i=9, index=11, no run, line end
i=10, index=12, no run, line end
......@@ -12,7 +12,7 @@ width: 194560
range 0 21
range 21 31
[21,31]font-features=tnum=1
21 31 font-features "tnum=1"
range 31 2147483647
--- directions
......@@ -38,16 +38,16 @@ i=7, index=125, paragraph-start=1, dir=ltr ''
--- runs
i=1, index=0, chars=21, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'A test with multiple '
[21,31]font-features=tnum=1
21 31 font-features "tnum=1"
i=2, index=21, no run, line end
i=3, index=21, chars=23, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'paragraphs and with no-'
[21,31]font-features=tnum=1
21 31 font-features "tnum=1"
i=4, index=44, no run, line end
i=5, index=44, chars=30, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'break attributes, which might '
[21,31]font-features=tnum=1
21 31 font-features "tnum=1"
i=6, index=74, no run, line end
i=7, index=74, chars=16, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'trigger a crash.'
[21,31]font-features=tnum=1
21 31 font-features "tnum=1"
i=8, index=90, no run, line end
i=9, index=91, chars=26, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'If it doesn't the fix has '
i=10, index=117, no run, line end
......
......@@ -12,8 +12,8 @@ indent: 51200
range 0 22
range 22 41
[22,41]foreground=#00000000ffff
[22,41]underline=1
22 41 foreground #00000000ffff
22 41 underline single
range 41 2147483647
--- directions
......@@ -34,10 +34,10 @@ i=2, index=49, paragraph-start=1, dir=ltr ''
i=1, index=0, chars=12, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'This is a te'
i=2, index=12, chars=26, level=0, gravity=south, flags=2, font=OMITTED, script=common, language=en-us, 'st of the automatic emerge'
[0,2147483647]fallback=0
0 2147483647 fallback false
i=3, index=38, chars=3, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'ncy'
[22,41]foreground=#00000000ffff
[22,41]underline=1
22 41 foreground #00000000ffff
22 41 underline single
i=4, index=41, chars=7, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' brake!'
i=5, index=48, no run, line end
i=6, index=49, no run, line end
......@@ -10,7 +10,7 @@ width: 102400
--- attributes
range 0 30
[0,30]letter-spacing=8888
0 30 letter-spacing 8888
range 30 2147483647
--- directions
......@@ -33,17 +33,17 @@ i=5, index=31, paragraph-start=1, dir=ltr ''
--- runs
i=1, index=0, chars=6, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'Hello '
[0,30]letter-spacing=8888
0 30 letter-spacing 8888
i=2, index=6, no run, line end
i=3, index=12, chars=4, level=1, gravity=south, flags=0, font=OMITTED, script=hebrew, language=he, 'שלום'
[0,30]letter-spacing=8888
0 30 letter-spacing 8888
i=4, index=14, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=hebrew, language=he, ' '
[0,30]letter-spacing=8888
0 30 letter-spacing 8888
i=5, index=15, no run, line end
i=6, index=15, chars=5, level=0, gravity=south, flags=0, font=OMITTED, script=greek, language=el, 'Γειά '
[0,30]letter-spacing=8888
0 30 letter-spacing 8888
i=7, index=24, no run, line end
i=8, index=24, chars=3, level=0, gravity=south, flags=0, font=OMITTED, script=greek, language=el, 'σας'
[0,30]letter-spacing=8888
0 30 letter-spacing 8888
i=9, index=30, no run, line end
i=10, index=31, no run, line end
......@@ -4,11 +4,11 @@ Blue text is cool!
---
range 0 9
[0,9]scale=1.440000
[0,9]foreground=#00000000ffff
0 9 scale 1.440000
0 9 foreground #00000000ffff
range 9 13
range 13 17
[13,17]style=2
13 17 style italic
range 17 2147483647
......
......@@ -4,17 +4,17 @@ Lots of attrs
---
range 0 13
[0,13]font-desc=Sans Italic 12 @wdth=100,wght=200
[0,13]foreground=#0000ffff0000
[0,13]background=#f0f0f0f0f0f0
[0,13]underline=2
[0,13]underline-color=#ffff00000000
[0,13]gravity=0
[0,13]gravity-hint=1
[0,13]strikethrough=1
[0,13]strikethrough-color=#00000000ffff
[0,13]fallback=0
[0,13]language=de
0 13 font-desc "Sans Italic 12 @wdth=100,wght=200"
0 13 foreground #0000ffff0000
0 13 background #f0f0f0f0f0f0
0 13 underline double
0 13 underline-color #ffff00000000
0 13 gravity south
0 13 gravity-hint strong
0 13 strikethrough true
0 13 strikethrough-color #00000000ffff
0 13 fallback false
0 13 language de
range 13 2147483647
......
......@@ -4,42 +4,42 @@ Lots of attrs
---
range 0 5
[0,13]font-desc=Sans Italic 12 @wdth=100,wght=200
[0,13]foreground=#0000ffff0000
[0,13]background=#f0f0f0f0f0f0
[0,13]underline=2
[0,13]underline-color=#ffff00000000
[0,13]gravity=0
[0,13]gravity-hint=1
[0,13]strikethrough=1
[0,13]strikethrough-color=#00000000ffff
[0,13]fallback=0
[0,13]language=de
0 13 font-desc "Sans Italic 12 @wdth=100,wght=200"
0 13 foreground #0000ffff0000
0 13 background #f0f0f0f0f0f0
0 13 underline double
0 13 underline-color #ffff00000000
0 13 gravity south
0 13 gravity-hint strong
0 13 strikethrough true
0 13 strikethrough-color #00000000ffff
0 13 fallback false
0 13 language de
range 5 7
[0,13]font-desc=Sans Italic 12 @wdth=100,wght=200
[0,13]foreground=#0000ffff0000
[0,13]background=#f0f0f0f0f0f0
[0,13]underline=2
[0,13]underline-color=#ffff00000000
[0,13]gravity=0
[0,13]gravity-hint=1
[0,13]strikethrough=1
[0,13]strikethrough-color=#00000000ffff
[0,13]fallback=0
[0,13]language=de
[5,7]font-desc=Bold
0 13 font-desc "Sans Italic 12 @wdth=100,wght=200"
0 13 foreground #0000ffff0000
0 13 background #f0f0f0f0f0f0
0 13 underline double
0 13 underline-color #ffff00000000
0 13 gravity south
0 13 gravity-hint strong
0 13 strikethrough true
0 13 strikethrough-color #00000000ffff
0 13 fallback false
0 13 language de
5 7 font-desc "Bold"
range 7 13
[0,13]font-desc=Sans Italic 12 @wdth=100,wght=200
[0,13]foreground=#0000ffff0000
[0,13]background=#f0f0f0f0f0f0
[0,13]underline=2
[0,13]underline-color=#ffff00000000
[0,13]gravity=0
[0,13]gravity-hint=1
[0,13]strikethrough=1
[0,13]strikethrough-color=#00000000ffff
[0,13]fallback=0
[0,13]language=de
0 13 font-desc "Sans Italic 12 @wdth=100,wght=200"
0 13 foreground #0000ffff0000
0 13 background #f0f0f0f0f0f0
0 13 underline double
0 13 underline-color #ffff00000000
0 13 gravity south
0 13 gravity-hint strong
0 13 strikethrough true
0 13 strikethrough-color #00000000ffff
0 13 fallback false
0 13 language de
range 13 2147483647
......
......@@ -8,19 +8,19 @@ error-line
---
range 0 8
[0,8]overline=1
0 8 overline single
range 8 9
range 9 23
[9,23]overline-color=#ffff00000000
9 23 overline-color #ffff00000000
range 23 24
range 24 35
[24,35]underline=5
24 35 underline single-line
range 35 36
range 36 47
[36,47]underline=6
36 47 underline double-line
range 47 48
range 48 58
[48,58]underline=7