Commit 9a63774e authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Update test-layout

Use the new output serialization in test-layout
to store both the input and output in the same
file.
parent 3f6f2887
Bratwurst
--- parameters
wrapped: 0
ellipsized: 0
lines: 1
width: 102400
--- attributes
range 0 4
range 4 2147483647
4 4294967295 style italic
range 2147483647 2147483647
--- directions
0 0 0 0 0 0 0 0 0
--- cursor positions
0(0) 1(0) 2(0) 3(0) 4(0) 5(0) 6(0) 7(0) 8(0) 8(1)
--- lines
i=1, index=0, paragraph-start=1, dir=ltr 'Bratwurst'
--- runs
i=1, index=0, chars=4, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'Brat'
i=2, index=4, chars=5, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, 'wurst'
i=3, index=9, no run, line end
{
"context" : {
"font" : "serif 12",
"language" : "en-us",
"base-gravity" : "south",
"gravity-hint" : "natural",
"base-dir" : "weak-ltr",
"round-glyph-positions" : true,
"transform" : [
1.0,
0.0,
0.0,
1.0,
0.0,
0.0
]
},
"comment" : [
"A case with a single word made up of two items,",
"expected to produce a single overlong line."
],
"text" : "Bratwurst",
"attributes" : [
{
......@@ -7,15 +27,170 @@
"value" : "italic"
}
],
"font" : "Sans Bold 32",
"tabs" : {
"positions-in-pixels" : true,
"positions" : [
0,
50,
100
"font" : "Cantarell Bold 32 @wght=604",
"width" : 87040,
"output" : {
"is-wrapped" : false,
"is-ellipsized" : false,
"width" : 197632,
"height" : 53248,
"log-attrs" : [
{
"char-break" : true,
"cursor-position" : true,
"word-start" : true,
"sentence-boundary" : true,
"sentence-start" : true,
"backspace-deletes-character" : true,
"word-boundary" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"line-break" : true,
"mandatory-break" : true,
"char-break" : true,
"white" : true,
"cursor-position" : true,
"word-end" : true,
"sentence-boundary" : true,
"sentence-end" : true,
"word-boundary" : true
}
],
"lines" : [
{
"start-index" : 0,
"length" : 9,
"paragraph-start" : true,
"direction" : "ltr",
"runs" : [
{
"offset" : 0,
"length" : 4,
"text" : "Brat",
"bidi-level" : 0,
"gravity" : "south",
"language" : "en-us",
"script" : "latin",
"font" : "Cantarell Bold 32 @wght=604",
"flags" : 0,
"y-offset" : 0,
"start-x-offset" : 0,
"end-x-offset" : 0,
"glyphs" : [
{
"glyph" : 29,
"width" : 27648,
"is-cluster-start" : true,
"log-cluster" : 0
},
{
"glyph" : 409,
"width" : 17408,
"is-cluster-start" : true,
"log-cluster" : 1
},
{
"glyph" : 244,
"width" : 22528,
"is-cluster-start" : true,
"log-cluster" : 2
},
{
"glyph" : 430,
"width" : 16384,
"is-cluster-start" : true,
"log-cluster" : 3
}
]
},
{
"offset" : 4,
"length" : 5,
"text" : "wurst",
"bidi-level" : 0,
"gravity" : "south",
"language" : "en-us",
"script" : "latin",
"font" : "Cantarell Bold Oblique 32 @wght=604",
"flags" : 0,
"y-offset" : 0,
"start-x-offset" : 0,
"end-x-offset" : 0,
"glyphs" : [
{
"glyph" : 467,
"width" : 34816,
"is-cluster-start" : true,
"log-cluster" : 0
},
{
"glyph" : 438,
"width" : 24576,
"is-cluster-start" : true,
"log-cluster" : 1
},
{
"glyph" : 409,
"width" : 17408,
"is-cluster-start" : true,
"log-cluster" : 2
},
{
"glyph" : 417,
"width" : 20480,
"is-cluster-start" : true,
"log-cluster" : 3
},
{
"glyph" : 430,
"width" : 16384,
"is-cluster-start" : true,
"log-cluster" : 4
}
]
}
]
}
]
},
"width" : 102400,
"line-spacing" : 1.2999999523162842
}
}
\ No newline at end of file
{
"context" : {
"font" : "serif 12",
"language" : "en-us",
"base-gravity" : "south",
"gravity-hint" : "natural",
"base-dir" : "weak-ltr",
"round-glyph-positions" : true,
"transform" : [
1.0,
0.0,
0.0,
1.0,
0.0,
0.0
]
},
"text" : "This is a test of the automatic emergency brake!\n",
"attributes" : [
{
......@@ -16,5 +32,617 @@
],
"font" : "Cantarell 11",
"ellipsize" : "end",
"width" : 225280
}
"width" : 225280,
"output" : {
"is-wrapped" : false,
"is-ellipsized" : true,
"width" : 225280,
"height" : 37888,
"log-attrs" : [
{
"char-break" : true,
"cursor-position" : true,
"word-start" : true,
"sentence-boundary" : true,
"sentence-start" : true,
"backspace-deletes-character" : true,
"word-boundary" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"white" : true,
"cursor-position" : true,
"word-end" : true,
"expandable-space" : true,
"word-boundary" : true
},
{
"line-break" : true,
"char-break" : true,
"cursor-position" : true,
"word-start" : true,
"word-boundary" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"white" : true,
"cursor-position" : true,
"word-end" : true,
"expandable-space" : true,
"word-boundary" : true
},
{
"line-break" : true,
"char-break" : true,
"cursor-position" : true,
"word-start" : true,
"word-boundary" : true
},
{
"char-break" : true,
"white" : true,
"cursor-position" : true,
"word-end" : true,
"expandable-space" : true,
"word-boundary" : true
},
{
"line-break" : true,
"char-break" : true,
"cursor-position" : true,
"word-start" : true,
"word-boundary" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"white" : true,
"cursor-position" : true,
"word-end" : true,
"expandable-space" : true,
"word-boundary" : true
},
{
"line-break" : true,
"char-break" : true,
"cursor-position" : true,
"word-start" : true,
"word-boundary" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"white" : true,
"cursor-position" : true,
"word-end" : true,
"expandable-space" : true,
"word-boundary" : true
},
{
"line-break" : true,
"char-break" : true,
"cursor-position" : true,
"word-start" : true,
"word-boundary" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"white" : true,
"cursor-position" : true,
"word-end" : true,
"expandable-space" : true,
"word-boundary" : true
},
{
"line-break" : true,
"char-break" : true,
"cursor-position" : true,
"word-start" : true,
"word-boundary" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"white" : true,
"cursor-position" : true,
"word-end" : true,
"expandable-space" : true,
"word-boundary" : true
},
{
"line-break" : true,
"char-break" : true,
"cursor-position" : true,
"word-start" : true,
"word-boundary" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"white" : true,
"cursor-position" : true,
"word-end" : true,
"expandable-space" : true,
"word-boundary" : true
},
{
"line-break" : true,
"char-break" : true,
"cursor-position" : true,
"word-start" : true,
"word-boundary" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"break-inserts-hyphen" : true
},
{
"char-break" : true,
"cursor-position" : true,
"word-end" : true,
"word-boundary" : true
},
{
"char-break" : true,
"white" : true,
"cursor-position" : true,
"sentence-end" : true,
"word-boundary" : true
},
{
"line-break" : true,
"mandatory-break" : true,
"char-break" : true,
"white" : true,
"cursor-position" : true,
"sentence-boundary" : true,
"backspace-deletes-character" : true,
"word-boundary" : true
}
],
"lines" : [
{
"start-index" : 0,
"length" : 48,
"paragraph-start" : true,
"direction" : "ltr",
"runs" : [
{
"offset" : 0,
"length" : 22,
"text" : "This is a test of the ",
"bidi-level" : 0,
"gravity" : "south",
"language" : "en-us",
"script" : "latin",
"font" : "Cantarell 11",
"flags" : 0,
"y-offset" : 0,
"start-x-offset" : 0,
"end-x-offset" : 0,
"glyphs" : [
{
"glyph" : 187,
"width" : 8192,
"is-cluster-start" : true,
"log-cluster" : 0
},
{
"glyph" : 319,
"width" : 8192,
"is-cluster-start" : true,
"log-cluster" : 1
},
{
"glyph" : 324,
"width" : 4096,
"is-cluster-start" : true,
"log-cluster" : 2
},
{
"glyph" : 417,
"width" : 7168,
"is-cluster-start" : true,
"log-cluster" : 3
},
{
"glyph" : 1109,
"width" : 3072,
"is-cluster-start" : true,
"log-cluster" : 4
},
{
"glyph" : 324,
"width" : 4096,
"is-cluster-start" : true,
"log-cluster" : 5
},
{
"glyph" : 417,
"width" : 7168,
"is-cluster-start" : true,
"log-cluster" : 6
},
{
"glyph" : 1109,
"width" : 3072,
"is-cluster-start" : true,
"log-cluster" : 7
},
{
"glyph" : 244,
"width" : 8192,
"is-cluster-start" : true,
"log-cluster" : 8
},
{