Commit becb4a94 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Add more tests

These were produced with the help of
http://gitlab.gnome.org/matthiasc/layout-editor
parent 2b013d41
......@@ -27,12 +27,12 @@
"value" : "italic"
}
],
"font" : "Cantarell Bold 32 @wght=604",
"font" : "Cantarell Bold 32",
"width" : 87040,
"output" : {
"is-wrapped" : false,
"is-ellipsized" : false,
"width" : 197632,
"width" : 202752,
"height" : 53248,
"log-attrs" : [
{
......@@ -111,7 +111,7 @@
"gravity" : "south",
"language" : "en-us",
"script" : "latin",
"font" : "Cantarell Bold 32 @wght=604",
"font" : "Cantarell Bold 32",
"flags" : 0,
"y-offset" : 0,
"start-x-offset" : 0,
......@@ -119,19 +119,19 @@
"glyphs" : [
{
"glyph" : 29,
"width" : 27648,
"width" : 28672,
"is-cluster-start" : true,
"log-cluster" : 0
},
{
"glyph" : 409,
"width" : 17408,
"width" : 18432,
"is-cluster-start" : true,
"log-cluster" : 1
},
{
"glyph" : 244,
"width" : 22528,
"width" : 23552,
"is-cluster-start" : true,
"log-cluster" : 2
},
......@@ -151,7 +151,7 @@
"gravity" : "south",
"language" : "en-us",
"script" : "latin",
"font" : "Cantarell Bold Oblique 32 @wght=604",
"font" : "Cantarell Bold Oblique 32",
"flags" : 0,
"y-offset" : 0,
"start-x-offset" : 0,
......@@ -159,7 +159,7 @@
"glyphs" : [
{
"glyph" : 467,
"width" : 34816,
"width" : 35840,
"is-cluster-start" : true,
"log-cluster" : 0
},
......@@ -171,7 +171,7 @@
},
{
"glyph" : 409,
"width" : 17408,
"width" : 18432,
"is-cluster-start" : true,
"log-cluster" : 2
},
......
{
"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 single word, expected to produce a single",
"overlong line."
],
"text" : "Bratwurst",
"font" : "Cantarell Bold 32",
"width" : 87040,
"output" : {
"is-wrapped" : false,
"is-ellipsized" : false,
"width" : 202752,
"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" : 9,
"text" : "Bratwurst",
"bidi-level" : 0,
"gravity" : "south",
"language" : "en-us",
"script" : "latin",
"font" : "Cantarell Bold 32",
"flags" : 0,
"y-offset" : 0,
"start-x-offset" : 0,
"end-x-offset" : 0,
"glyphs" : [
{
"glyph" : 29,
"width" : 28672,
"is-cluster-start" : true,
"log-cluster" : 0
},
{
"glyph" : 409,
"width" : 18432,
"is-cluster-start" : true,
"log-cluster" : 1
},
{
"glyph" : 244,
"width" : 23552,
"is-cluster-start" : true,
"log-cluster" : 2
},
{
"glyph" : 430,
"width" : 16384,
"is-cluster-start" : true,
"log-cluster" : 3
},
{
"glyph" : 467,
"width" : 35840,
"is-cluster-start" : true,
"log-cluster" : 4
},
{
"glyph" : 438,
"width" : 24576,
"is-cluster-start" : true,
"log-cluster" : 5
},
{
"glyph" : 409,
"width" : 18432,
"is-cluster-start" : true,
"log-cluster" : 6
},
{
"glyph" : 417,
"width" : 20480,
"is-cluster-start" : true,
"log-cluster" : 7
},
{
"glyph" : 430,
"width" : 16384,
"is-cluster-start" : true,
"log-cluster" : 8
}
]
}
]
}
]
}
}
\ 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
]
},
"comment" : [
"A single word with word-char wrapping,",
"expected to be broken to fit the line width."
],
"text" : "Bratwurst",
"font" : "Cantarell Bold 32",
"wrap" : "word-char",
"width" : 87040,
"output" : {
"is-wrapped" : true,
"is-ellipsized" : false,
"width" : 78848,
"height" : 212992,
"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" : 2,
"paragraph-start" : true,
"direction" : "ltr",
"runs" : [
{
"offset" : 0,
"length" : 2,
"text" : "Br",
"bidi-level" : 0,
"gravity" : "south",
"language" : "en-us",
"script" : "latin",
"font" : "Cantarell Bold 32",
"flags" : 4,
"y-offset" : 0,
"start-x-offset" : 0,
"end-x-offset" : 0,
"glyphs" : [
{
"glyph" : 29,
"width" : 28672,
"is-cluster-start" : true,
"log-cluster" : 0
},
{
"glyph" : 409,
"width" : 18432,
"is-cluster-start" : true,
"log-cluster" : 1
},
{
"glyph" : 1081,
"width" : 18432,
"log-cluster" : 1
}
]
}
]
},
{
"start-index" : 2,
"length" : 2,
"paragraph-start" : false,
"direction" : "ltr",
"runs" : [
{
"offset" : 2,
"length" : 2,
"text" : "at",
"bidi-level" : 0,
"gravity" : "south",
"language" : "en-us",
"script" : "latin",
"font" : "Cantarell Bold 32",
"flags" : 4,
"y-offset" : 0,
"start-x-offset" : 0,
"end-x-offset" : 0,
"glyphs" : [
{
"glyph" : 244,
"width" : 23552,
"is-cluster-start" : true,
"log-cluster" : 0
},
{
"glyph" : 430,
"width" : 16384,
"is-cluster-start" : true,
"log-cluster" : 1
},
{
"glyph" : 1081,
"width" : 18432,
"log-cluster" : 1
}
]
}
]
},
{
"start-index" : 4,
"length" : 2,
"paragraph-start" : false,
"direction" : "ltr",
"runs" : [
{
"offset" : 4,
"length" : 2,
"text" : "wu",
"bidi-level" : 0,
"gravity" : "south",
"language" : "en-us",
"script" : "latin",
"font" : "Cantarell Bold 32",
"flags" : 4,
"y-offset" : 0,
"start-x-offset" : 0,
"end-x-offset" : 0,
"glyphs" : [
{
"glyph" : 467,
"width" : 35840,
"is-cluster-start" : true,
"log-cluster" : 0
},
{
"glyph" : 438,
"width" : 24576,
"is-cluster-start" : true,
"log-cluster" : 1
},
{
"glyph" : 1081,
"width" : 18432,
"log-cluster" : 1
}
]
}
]
},
{
"start-index" : 6,
"length" : 3,
"paragraph-start" : false,
"direction" : "ltr",
"runs" : [
{
"offset" : 6,
"length" : 3,
"text" : "rst",
"bidi-level" : 0,
"gravity" : "south",
"language" : "en-us",
"script" : "latin",
"font" : "Cantarell Bold 32",
"flags" : 0,
"y-offset" : 0,
"start-x-offset" : 0,
"end-x-offset" : 0,
"glyphs" : [
{
"glyph" : 409,
"width" : 18432,
"is-cluster-start" : true,
"log-cluster" : 0
},
{
"glyph" : 417,
"width" : 20480,
"is-cluster-start" : true,
"log-cluster" : 1
},
{
"glyph" : 430,
"width" : 16384,
"is-cluster-start" : true,
"log-cluster" : 2
}
]
}
]
}
]
}
}
\ 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
]
},
"comment" : [
"A single word with a soft hyphen,",
"expected to be broken at the soft",
"hyphen and still produce overlong",
"lines."
],
"text" : "Brat­wurst",
"font" : "Cantarell Bold 32",
"width" : 87040,
"output" : {
"is-wrapped" : true,
"is-ellipsized" : false,
"width" : 115712,
"height" : 106496,
"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
},
{
"line-break" : 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" : 6,
"paragraph-start" : true,
"direction" : "ltr",
"runs" : [
{
"offset" : 0,
"length" : 6,
"text" : "Brat­",
"bidi-level" : 0,
"gravity" : "south",
"language" : "en-us",
"script" : "latin",
"font" : "Cantarell Bold 32",
"flags" : 4,
"y-offset" : 0,
"start-x-offset" : 0,
"end-x-offset" : 0,
"glyphs" : [
{
"glyph" : 29,
"width" : 28672,
"is-cluster-start" : true,
"log-cluster" : 0
},
{
"glyph" : 409,
"width" : 18432,
"is-cluster-start" : true,
"log-cluster" : 1
},
{
"glyph" : 244,
"width" : 23552,
"is-cluster-start" : true,
"log-cluster" : 2
},
{
"glyph" : 430,
"width" : 16384,
"is-cluster-start" : true,
"log-cluster" : 3
},
{
"glyph" : 268435455,