summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/layouts/bratwurst.expected32
-rw-r--r--tests/layouts/bratwurst.layout195
-rw-r--r--tests/layouts/valid-1.layout632
-rw-r--r--tests/layouts/valid-10.layout347
-rw-r--r--tests/layouts/valid-11.layout373
-rw-r--r--tests/layouts/valid-12.layout734
-rw-r--r--tests/layouts/valid-13.layout745
-rw-r--r--tests/layouts/valid-14.layout450
-rw-r--r--tests/layouts/valid-15.layout988
-rw-r--r--tests/layouts/valid-16.layout995
-rw-r--r--tests/layouts/valid-17.layout305
-rw-r--r--tests/layouts/valid-18.layout713
-rw-r--r--tests/layouts/valid-19.layout585
-rw-r--r--tests/layouts/valid-2.layout532
-rw-r--r--tests/layouts/valid-20.layout191
-rw-r--r--tests/layouts/valid-22.layout528
-rw-r--r--tests/layouts/valid-3.layout182
-rw-r--r--tests/layouts/valid-4.layout1889
-rw-r--r--tests/layouts/valid-5.layout1694
-rw-r--r--tests/layouts/valid-6.layout370
-rw-r--r--tests/layouts/valid-7.layout570
-rw-r--r--tests/layouts/valid-8.layout360
-rw-r--r--tests/layouts/valid-9.layout449
-rw-r--r--tests/test-common.c64
-rw-r--r--tests/test-common.h4
-rw-r--r--tests/test-layout.c286
26 files changed, 13864 insertions, 349 deletions
diff --git a/tests/layouts/bratwurst.expected b/tests/layouts/bratwurst.expected
deleted file mode 100644
index f81dbaeb..00000000
--- a/tests/layouts/bratwurst.expected
+++ /dev/null
@@ -1,32 +0,0 @@
-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
diff --git a/tests/layouts/bratwurst.layout b/tests/layouts/bratwurst.layout
index 65104276..641cc37a 100644
--- a/tests/layouts/bratwurst.layout
+++ b/tests/layouts/bratwurst.layout
@@ -1,4 +1,24 @@
{
+ "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
diff --git a/tests/layouts/valid-1.layout b/tests/layouts/valid-1.layout
index 9289830b..0a966d4f 100644
--- a/tests/layouts/valid-1.layout
+++ b/tests/layouts/valid-1.layout
@@ -1,4 +1,20 @@
{
+ "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
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 311,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 21
+ }
+ ]
+ },
+ {
+ "offset" : 22,
+ "length" : 11,
+ "text" : "automatic e",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "start" : 22,
+ "end" : 41,
+ "type" : "foreground",
+ "value" : "#00000000ffff"
+ },
+ {
+ "start" : 22,
+ "end" : 41,
+ "type" : "underline",
+ "value" : "single"
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 438,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 358,
+ "width" : 13312,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 273,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ }
+ ]
+ },
+ {
+ "offset" : 33,
+ "length" : 15,
+ "text" : "mergency brake!",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "common",
+ "font" : "Cantarell 11",
+ "flags" : 2,
+ "extra-attributes" : [
+ {
+ "end" : 2147483647,
+ "type" : "fallback",
+ "value" : false
+ },
+ {
+ "start" : 22,
+ "end" : 41,
+ "type" : "foreground",
+ "value" : "#00000000ffff"
+ },
+ {
+ "start" : 22,
+ "end" : 41,
+ "type" : "underline",
+ "value" : "single"
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 1062,
+ "width" : 20480,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 49,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-10.layout b/tests/layouts/valid-10.layout
index 0d36a38d..51dc9ad0 100644
--- a/tests/layouts/valid-10.layout
+++ b/tests/layouts/valid-10.layout
@@ -1,8 +1,349 @@
{
+ "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" : "Hello שלום Γειά σας\n",
- "attributes" : [],
"font" : "Cantarell 11",
"justify" : true,
"ellipsize" : "end",
- "width" : 102400
-}
+ "width" : 102400,
+ "output" : {
+ "is-wrapped" : false,
+ "is-ellipsized" : true,
+ "width" : 102400,
+ "height" : 38912,
+ "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,
+ "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,
+ "backspace-deletes-character" : true,
+ "break-inserts-hyphen" : true
+ },
+ {
+ "char-break" : true,
+ "cursor-position" : true,
+ "backspace-deletes-character" : true,
+ "break-inserts-hyphen" : true
+ },
+ {
+ "char-break" : true,
+ "cursor-position" : true,
+ "backspace-deletes-character" : true,
+ "break-inserts-hyphen" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : true,
+ "backspace-deletes-character" : 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,
+ "cursor-position" : true,
+ "break-inserts-hyphen" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : 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" : 30,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 6,
+ "text" : "Hello ",
+ "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" : 76,
+ "width" : 11264,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ }
+ ]
+ },
+ {
+ "offset" : 6,
+ "length" : 8,
+ "text" : "שלום",
+ "bidi-level" : 1,
+ "gravity" : "south",
+ "language" : "he",
+ "script" : "hebrew",
+ "font" : "DejaVu Sans 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 1332,
+ "width" : 10240,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 1324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 1331,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 1344,
+ "width" : 10240,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 14,
+ "length" : 1,
+ "text" : " ",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "he",
+ "script" : "hebrew",
+ "font" : "DejaVu Sans 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 3,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 15,
+ "length" : 2,
+ "text" : "Γ",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "el",
+ "script" : "greek",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 677,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 17,
+ "length" : 13,
+ "text" : "ειά σας",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "common",
+ "font" : "Cantarell 11",
+ "flags" : 2,
+ "extra-attributes" : [
+ {
+ "end" : 2147483647,
+ "type" : "fallback",
+ "value" : false
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 1062,
+ "width" : 17408,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 31,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-11.layout b/tests/layouts/valid-11.layout
index a044cc53..683cf696 100644
--- a/tests/layouts/valid-11.layout
+++ b/tests/layouts/valid-11.layout
@@ -1,4 +1,20 @@
{
+ "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" : "double low error\n",
"attributes" : [
{
@@ -38,5 +54,358 @@
],
"font" : "Cantarell 11",
"wrap" : "char",
- "width" : 225280
-}
+ "width" : 225280,
+ "output" : {
+ "is-wrapped" : false,
+ "is-ellipsized" : false,
+ "width" : 109568,
+ "height" : 38912,
+ "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,
+ "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,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : 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" : 16,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 6,
+ "text" : "double",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "end" : 6,
+ "type" : "underline",
+ "value" : "double"
+ },
+ {
+ "end" : 6,
+ "type" : "overline",
+ "value" : "single"
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 280,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 438,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 272,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ }
+ ]
+ },
+ {
+ "offset" : 6,
+ "length" : 1,
+ "text" : " ",
+ "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" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 7,
+ "length" : 3,
+ "text" : "low",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "start" : 7,
+ "end" : 10,
+ "type" : "underline",
+ "value" : "low"
+ },
+ {
+ "start" : 7,
+ "end" : 10,
+ "type" : "strikethrough",
+ "value" : true
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 467,
+ "width" : 11264,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ }
+ ]
+ },
+ {
+ "offset" : 10,
+ "length" : 1,
+ "text" : " ",
+ "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" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 11,
+ "length" : 5,
+ "text" : "error",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "start" : 11,
+ "end" : 16,
+ "type" : "rise",
+ "value" : 1024
+ },
+ {
+ "start" : 11,
+ "end" : 16,
+ "type" : "underline",
+ "value" : "error"
+ }
+ ],
+ "y-offset" : 1024,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 17,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-12.layout b/tests/layouts/valid-12.layout
index 1c9fa227..96362eb3 100644
--- a/tests/layouts/valid-12.layout
+++ b/tests/layouts/valid-12.layout
@@ -1,6 +1,21 @@
{
+ "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" : "a b c d
e f g h\n",
- "attributes" : [],
"font" : "Cantarell 11",
"tabs" : {
"positions-in-pixels" : true,
@@ -11,5 +26,720 @@
150,
200
]
+ },
+ "output" : {
+ "is-wrapped" : true,
+ "is-ellipsized" : false,
+ "width" : 113664,
+ "height" : 59392,
+ "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,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : true,
+ "expandable-space" : true,
+ "word-boundary" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : 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
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : 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
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : 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,
+ "sentence-end" : true,
+ "word-boundary" : true
+ },
+ {
+ "line-break" : true,
+ "mandatory-break" : true,
+ "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,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : true,
+ "expandable-space" : true,
+ "word-boundary" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : 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
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : 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
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : 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,
+ "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" : 28,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 25,
+ "text" : "a b c d",
+ "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" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 272,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 273,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 21
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 22
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 23
+ },
+ {
+ "glyph" : 280,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 24
+ }
+ ]
+ },
+ {
+ "offset" : 25,
+ "length" : 3,
+ "text" : "
",
+ "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" : 268443688,
+ "width" : 17408,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 28,
+ "length" : 23,
+ "paragraph-start" : false,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 28,
+ "length" : 23,
+ "text" : "e f g h",
+ "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" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 311,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 312,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 21
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 22
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 52,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
}
-}
+} \ No newline at end of file
diff --git a/tests/layouts/valid-13.layout b/tests/layouts/valid-13.layout
index a9f10f86..3bb98ce7 100644
--- a/tests/layouts/valid-13.layout
+++ b/tests/layouts/valid-13.layout
@@ -1,6 +1,21 @@
{
+ "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" : "a b c d
e f g h\n",
- "attributes" : [],
"font" : "Cantarell 11",
"tabs" : {
"positions-in-pixels" : true,
@@ -12,5 +27,729 @@
200
]
},
- "single-paragraph" : true
-}
+ "single-paragraph" : true,
+ "output" : {
+ "is-wrapped" : false,
+ "is-ellipsized" : false,
+ "width" : 219136,
+ "height" : 21504,
+ "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,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : true,
+ "expandable-space" : true,
+ "word-boundary" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : 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
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : 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
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : 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,
+ "sentence-end" : true,
+ "word-boundary" : true
+ },
+ {
+ "line-break" : true,
+ "mandatory-break" : true,
+ "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,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : true,
+ "expandable-space" : true,
+ "word-boundary" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : 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
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : 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
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : 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,
+ "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" : 52,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 25,
+ "text" : "a b c d",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "type" : "show",
+ "value" : 2
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 272,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 273,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 21
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 22
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 23
+ },
+ {
+ "glyph" : 280,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 24
+ }
+ ]
+ },
+ {
+ "offset" : 25,
+ "length" : 3,
+ "text" : "
",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "type" : "show",
+ "value" : 2
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 268443688,
+ "width" : 17408,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 28,
+ "length" : 24,
+ "text" : "e f g h\n",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "type" : "show",
+ "value" : 2
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 311,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 312,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 21
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 22
+ },
+ {
+ "glyph" : 268435466,
+ "width" : 17408,
+ "is-cluster-start" : true,
+ "log-cluster" : 23
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-14.layout b/tests/layouts/valid-14.layout
index 116cc94f..255f51da 100644
--- a/tests/layouts/valid-14.layout
+++ b/tests/layouts/valid-14.layout
@@ -1,8 +1,452 @@
{
+ "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" : "你好 Hello שלום Γειά σας\n",
- "attributes" : [],
"font" : "Cantarell 11",
"ellipsize" : "start",
"width" : 161792,
- "line-spacing" : 1.5
-}
+ "line-spacing" : 1.5,
+ "output" : {
+ "is-wrapped" : false,
+ "is-ellipsized" : true,
+ "width" : 161792,
+ "height" : 48128,
+ "log-attrs" : [
+ {
+ "char-break" : true,
+ "cursor-position" : true,
+ "word-start" : true,
+ "sentence-boundary" : true,
+ "sentence-start" : true,
+ "backspace-deletes-character" : true,
+ "word-boundary" : true
+ },
+ {
+ "line-break" : true,
+ "char-break" : true,
+ "cursor-position" : true,
+ "backspace-deletes-character" : true,
+ "word-boundary" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : true,
+ "backspace-deletes-character" : 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,
+ "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,
+ "backspace-deletes-character" : true,
+ "break-inserts-hyphen" : true
+ },
+ {
+ "char-break" : true,
+ "cursor-position" : true,
+ "backspace-deletes-character" : true,
+ "break-inserts-hyphen" : true
+ },
+ {
+ "char-break" : true,
+ "cursor-position" : true,
+ "backspace-deletes-character" : true,
+ "break-inserts-hyphen" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : true,
+ "backspace-deletes-character" : 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,
+ "cursor-position" : true,
+ "break-inserts-hyphen" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : 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" : 37,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 3,
+ "text" : "你",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "common",
+ "font" : "Cantarell 11",
+ "flags" : 2,
+ "extra-attributes" : [
+ {
+ "end" : 2147483647,
+ "type" : "fallback",
+ "value" : true
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 1058,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 1058,
+ "width" : 4096,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 1058,
+ "width" : 4096,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 3,
+ "length" : 4,
+ "text" : "好 ",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "xx",
+ "script" : "han",
+ "font" : "Droid Sans 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 1300,
+ "width" : 15360,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 268435488,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ }
+ ]
+ },
+ {
+ "offset" : 7,
+ "length" : 6,
+ "text" : "Hello ",
+ "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" : 76,
+ "width" : 11264,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ }
+ ]
+ },
+ {
+ "offset" : 13,
+ "length" : 8,
+ "text" : "שלום",
+ "bidi-level" : 1,
+ "gravity" : "south",
+ "language" : "he",
+ "script" : "hebrew",
+ "font" : "DejaVu Sans 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 1332,
+ "width" : 10240,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 1324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 1331,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 1344,
+ "width" : 10240,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 21,
+ "length" : 1,
+ "text" : " ",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "he",
+ "script" : "hebrew",
+ "font" : "DejaVu Sans 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 3,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 22,
+ "length" : 15,
+ "text" : "Γειά σας",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "el",
+ "script" : "greek",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 677,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 808,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 812,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 837,
+ "width" : 9216,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 822,
+ "width" : 9216,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 804,
+ "width" : 9216,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 821,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 38,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-15.layout b/tests/layouts/valid-15.layout
index 9f584ba6..ac7ab3e9 100644
--- a/tests/layouts/valid-15.layout
+++ b/tests/layouts/valid-15.layout
@@ -1,8 +1,990 @@
{
+ "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" : "Lets see if this text is long enough to wrap due to height limitations. It might, or it might not.\n",
- "attributes" : [],
"font" : "Cantarell 11",
"ellipsize" : "end",
"width" : 153600,
- "height" : 40960
-}
+ "height" : 40960,
+ "output" : {
+ "is-wrapped" : true,
+ "is-ellipsized" : true,
+ "width" : 153600,
+ "height" : 36864,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "expandable-space" : true,
+ "word-boundary" : true
+ },
+ {
+ "line-break" : true,
+ "char-break" : true,
+ "cursor-position" : true,
+ "word-start" : true,
+ "sentence-boundary" : true,
+ "sentence-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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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" : 25,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 25,
+ "text" : "Lets see if this text is ",
+ "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" : 103,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "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" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 311,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 472,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 21
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 22
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 23
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 24
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 25,
+ "length" : 73,
+ "paragraph-start" : false,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 25,
+ "length" : 20,
+ "text" : "long enough to wrap ",
+ "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" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 312,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 438,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 312,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 467,
+ "width" : 11264,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 406,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ }
+ ]
+ },
+ {
+ "offset" : 45,
+ "length" : 53,
+ "text" : "due to height limitations. It might, or it might not.",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "common",
+ "font" : "Cantarell 11",
+ "flags" : 2,
+ "extra-attributes" : [
+ {
+ "end" : 2147483647,
+ "type" : "fallback",
+ "value" : false
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 1062,
+ "width" : 16384,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-16.layout b/tests/layouts/valid-16.layout
index e2a82d96..0f1b8698 100644
--- a/tests/layouts/valid-16.layout
+++ b/tests/layouts/valid-16.layout
@@ -1,9 +1,998 @@
{
+ "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" : "Lets see if this text is long enough to wrap due to height limitations. It might, or it might not.\n",
- "attributes" : [],
"font" : "Cantarell 11",
"wrap" : "word-char",
"ellipsize" : "end",
"width" : 153600,
- "height" : -2
-}
+ "height" : -2,
+ "output" : {
+ "is-wrapped" : true,
+ "is-ellipsized" : true,
+ "width" : 153600,
+ "height" : 56320,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "expandable-space" : true,
+ "word-boundary" : true
+ },
+ {
+ "line-break" : true,
+ "char-break" : true,
+ "cursor-position" : true,
+ "word-start" : true,
+ "sentence-boundary" : true,
+ "sentence-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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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" : 25,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 25,
+ "text" : "Lets see if this text is ",
+ "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" : 103,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "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" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 311,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 472,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 21
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 22
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 23
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 24
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 25,
+ "length" : 73,
+ "paragraph-start" : false,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 25,
+ "length" : 20,
+ "text" : "long enough to wrap ",
+ "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" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 312,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 438,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 312,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 467,
+ "width" : 11264,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 406,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ }
+ ]
+ },
+ {
+ "offset" : 45,
+ "length" : 53,
+ "text" : "due to height limitations. It might, or it might not.",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "common",
+ "font" : "Cantarell 11",
+ "flags" : 2,
+ "extra-attributes" : [
+ {
+ "end" : 2147483647,
+ "type" : "fallback",
+ "value" : false
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 1062,
+ "width" : 16384,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 99,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-17.layout b/tests/layouts/valid-17.layout
index 062cc241..8d0ff072 100644
--- a/tests/layouts/valid-17.layout
+++ b/tests/layouts/valid-17.layout
@@ -1,7 +1,306 @@
{
+ "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" : "some|bla|bla|bla\n",
- "attributes" : [],
"font" : "Cantarell 11",
"justify" : true,
- "width" : 102400
-}
+ "width" : 102400,
+ "output" : {
+ "is-wrapped" : true,
+ "is-ellipsized" : false,
+ "width" : 102400,
+ "height" : 56320,
+ "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,
+ "word-end" : 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,
+ "word-end" : 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,
+ "word-end" : 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,
+ "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" : 13,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 13,
+ "text" : "some|bla|bla|",
+ "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" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 370,
+ "width" : 9216,
+ "x-offset" : 1024,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 358,
+ "width" : 14336,
+ "x-offset" : 1024,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 287,
+ "width" : 9216,
+ "x-offset" : 1024,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 1188,
+ "width" : 5120,
+ "x-offset" : 1024,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 272,
+ "width" : 9216,
+ "x-offset" : 1024,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 349,
+ "width" : 5120,
+ "x-offset" : 1024,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 244,
+ "width" : 9216,
+ "x-offset" : 1024,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 1188,
+ "width" : 5120,
+ "x-offset" : 1024,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 272,
+ "width" : 9216,
+ "x-offset" : 1024,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 349,
+ "width" : 5120,
+ "x-offset" : 1024,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 244,
+ "width" : 9216,
+ "x-offset" : 1024,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 1188,
+ "width" : 5120,
+ "x-offset" : 1024,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 13,
+ "length" : 3,
+ "paragraph-start" : false,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 13,
+ "length" : 3,
+ "text" : "bla",
+ "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" : 272,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 17,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-18.layout b/tests/layouts/valid-18.layout
index 85e9a7d1..e02c185a 100644
--- a/tests/layouts/valid-18.layout
+++ b/tests/layouts/valid-18.layout
@@ -1,4 +1,20 @@
{
+ "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" : "some line breaks
and mis­ce­llaneous ignora‌bles\n",
"attributes" : [
{
@@ -7,5 +23,698 @@
"value" : 7
}
],
- "font" : "Cantarell 11"
-}
+ "font" : "Cantarell 11",
+ "output" : {
+ "is-wrapped" : true,
+ "is-ellipsized" : false,
+ "width" : 295936,
+ "height" : 62464,
+ "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,
+ "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,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : true,
+ "sentence-end" : true,
+ "word-boundary" : true
+ },
+ {
+ "line-break" : true,
+ "mandatory-break" : true,
+ "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,
+ "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
+ },
+ {
+ "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
+ },
+ {
+ "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
+ },
+ {
+ "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,
+ "backspace-deletes-character" : 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
+ },
+ {
+ "break-inserts-hyphen" : true
+ },
+ {
+ "char-break" : true,
+ "cursor-position" : true,
+ "backspace-deletes-character" : 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,
+ "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" : 19,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 16,
+ "text" : "some line breaks",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "end" : 57,
+ "type" : "show",
+ "value" : 7
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 358,
+ "width" : 13312,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 268444707,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 268444707,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 272,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 345,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ }
+ ]
+ },
+ {
+ "offset" : 16,
+ "length" : 3,
+ "text" : "
",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "end" : 57,
+ "type" : "show",
+ "value" : 7
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 268443688,
+ "width" : 17408,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 19,
+ "length" : 38,
+ "paragraph-start" : false,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 19,
+ "length" : 38,
+ "text" : "and mis­ce­llaneous ignora‌bles",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "end" : 57,
+ "type" : "show",
+ "value" : 7
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 280,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 268444707,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 358,
+ "width" : 13312,
+ "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" : 268435629,
+ "width" : 23552,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 273,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 268435629,
+ "width" : 23552,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 438,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ },
+ {
+ "glyph" : 268444707,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 21
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 22
+ },
+ {
+ "glyph" : 312,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 23
+ },
+ {
+ "glyph" : 268500735,
+ "width" : 23552,
+ "is-cluster-start" : true,
+ "log-cluster" : 24
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 27
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 28
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 29
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 30
+ },
+ {
+ "glyph" : 268443660,
+ "width" : 17408,
+ "is-cluster-start" : true,
+ "log-cluster" : 31
+ },
+ {
+ "glyph" : 272,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 34
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 35
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 36
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 37
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 58,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-19.layout b/tests/layouts/valid-19.layout
index 32ad1283..02b07bf4 100644
--- a/tests/layouts/valid-19.layout
+++ b/tests/layouts/valid-19.layout
@@ -1,5 +1,584 @@
{
+ "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" : " a⃠ 😊︎ 😊️ 🇩🇪 ✊ ✋🏾 0 # 🏴󠁵󠁳󠁣󠁡󠁿 ©\n",
- "attributes" : [],
- "font" : "Cantarell 11"
-}
+ "font" : "Cantarell 11",
+ "output" : {
+ "is-wrapped" : false,
+ "is-ellipsized" : false,
+ "width" : 250880,
+ "height" : 43008,
+ "log-attrs" : [
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "sentence-boundary" : true,
+ "backspace-deletes-character" : true,
+ "expandable-space" : true,
+ "word-boundary" : true
+ },
+ {
+ "line-break" : true,
+ "char-break" : true,
+ "cursor-position" : true,
+ "word-start" : true,
+ "sentence-start" : true,
+ "word-boundary" : 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-boundary" : true
+ },
+ { },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true,
+ "word-boundary" : true
+ },
+ {
+ "line-break" : true,
+ "char-break" : true,
+ "cursor-position" : true,
+ "word-boundary" : true
+ },
+ { },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true,
+ "word-boundary" : true
+ },
+ {
+ "line-break" : true,
+ "char-break" : true,
+ "cursor-position" : true,
+ "word-boundary" : true
+ },
+ { },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true,
+ "word-boundary" : true
+ },
+ {
+ "line-break" : true,
+ "char-break" : true,
+ "cursor-position" : true,
+ "word-boundary" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true,
+ "word-boundary" : true
+ },
+ {
+ "line-break" : true,
+ "char-break" : true,
+ "cursor-position" : true,
+ "word-boundary" : true
+ },
+ { },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : 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-boundary" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "expandable-space" : true,
+ "word-boundary" : true
+ },
+ {
+ "line-break" : true,
+ "char-break" : true,
+ "cursor-position" : true,
+ "word-boundary" : true
+ },
+ { },
+ { },
+ { },
+ { },
+ { },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "backspace-deletes-character" : true,
+ "expandable-space" : true,
+ "word-boundary" : true
+ },
+ {
+ "line-break" : true,
+ "char-break" : true,
+ "cursor-position" : 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" : 74,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 6,
+ "text" : " a⃠ ",
+ "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" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 268443872,
+ "width" : 17408,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ }
+ ]
+ },
+ {
+ "offset" : 6,
+ "length" : 8,
+ "text" : "😊︎ ",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "DejaVu Sans 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 5867,
+ "width" : 15360,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 3,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ }
+ ]
+ },
+ {
+ "offset" : 14,
+ "length" : 7,
+ "text" : "😊️",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "DejaVu Sans 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 5867,
+ "width" : 15360,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ }
+ ]
+ },
+ {
+ "offset" : 21,
+ "length" : 1,
+ "text" : " ",
+ "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" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 22,
+ "length" : 8,
+ "text" : "🇩🇪",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Raqq 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 268562921,
+ "width" : 23552,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 268562922,
+ "width" : 23552,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ }
+ ]
+ },
+ {
+ "offset" : 30,
+ "length" : 1,
+ "text" : " ",
+ "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" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 31,
+ "length" : 3,
+ "text" : "✊",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Raqq 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 268445450,
+ "width" : 17408,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 34,
+ "length" : 1,
+ "text" : " ",
+ "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" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 35,
+ "length" : 7,
+ "text" : "✋🏾",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Raqq 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 268445451,
+ "width" : 17408,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 268563454,
+ "width" : 23552,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ }
+ ]
+ },
+ {
+ "offset" : 42,
+ "length" : 5,
+ "text" : " 0 # ",
+ "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" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 964,
+ "width" : 9216,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 1070,
+ "width" : 10240,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ }
+ ]
+ },
+ {
+ "offset" : 47,
+ "length" : 24,
+ "text" : "🏴󠁵󠁳󠁣󠁡󠁿",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Raqq 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 268563444,
+ "width" : 23552,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ }
+ ]
+ },
+ {
+ "offset" : 71,
+ "length" : 3,
+ "text" : " ©",
+ "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" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 1182,
+ "width" : 13312,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 75,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-2.layout b/tests/layouts/valid-2.layout
index 303b2b67..30f062b0 100644
--- a/tests/layouts/valid-2.layout
+++ b/tests/layouts/valid-2.layout
@@ -1,4 +1,20 @@
{
+ "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" : "test the blue drink after dinner\n",
"attributes" : [
{
@@ -14,5 +30,517 @@
"value" : "single"
}
],
- "font" : "Cantarell 11"
-}
+ "font" : "Cantarell 11",
+ "output" : {
+ "is-wrapped" : false,
+ "is-ellipsized" : false,
+ "width" : 200704,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : 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" : 32,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 9,
+ "text" : "test 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" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ }
+ ]
+ },
+ {
+ "offset" : 9,
+ "length" : 4,
+ "text" : "blue",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell Oblique 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 272,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 438,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ }
+ ]
+ },
+ {
+ "offset" : 13,
+ "length" : 7,
+ "text" : " drink ",
+ "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" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 280,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 345,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ }
+ ]
+ },
+ {
+ "offset" : 20,
+ "length" : 5,
+ "text" : "after",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "start" : 20,
+ "end" : 25,
+ "type" : "underline",
+ "value" : "single"
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 311,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ }
+ ]
+ },
+ {
+ "offset" : 25,
+ "length" : 7,
+ "text" : " dinner",
+ "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" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 280,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 33,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-20.layout b/tests/layouts/valid-20.layout
index bde84b6f..4f799fd9 100644
--- a/tests/layouts/valid-20.layout
+++ b/tests/layouts/valid-20.layout
@@ -1,4 +1,20 @@
{
+ "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" : "abcdef\n",
"attributes" : [
{
@@ -18,5 +34,176 @@
"value" : "south"
}
],
- "font" : "Cantarell 11"
-}
+ "font" : "Cantarell 11",
+ "output" : {
+ "is-wrapped" : false,
+ "is-ellipsized" : false,
+ "width" : 76800,
+ "height" : 44032,
+ "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,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : 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" : 6,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 3,
+ "text" : "abc",
+ "bidi-level" : 0,
+ "gravity" : "east",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell Rotated-Left 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "end" : 3,
+ "type" : "gravity",
+ "value" : "east"
+ },
+ {
+ "end" : 3,
+ "type" : "gravity-hint",
+ "value" : "strong"
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 244,
+ "width" : 18432,
+ "x-offset" : 33196,
+ "y-offset" : 3844,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 272,
+ "width" : 18432,
+ "x-offset" : 33196,
+ "y-offset" : 4280,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 273,
+ "width" : 18432,
+ "x-offset" : 33196,
+ "y-offset" : 3506,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ }
+ ]
+ },
+ {
+ "offset" : 3,
+ "length" : 3,
+ "text" : "def",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "start" : 3,
+ "end" : 6,
+ "type" : "gravity",
+ "value" : "south"
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 280,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 311,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 7,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-22.layout b/tests/layouts/valid-22.layout
index be57d26a..e5e5970e 100644
--- a/tests/layouts/valid-22.layout
+++ b/tests/layouts/valid-22.layout
@@ -1,4 +1,20 @@
{
+ "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" : "e0 = ooo...\n",
"attributes" : [
{
@@ -80,5 +96,513 @@
"value" : "superscript"
}
],
- "font" : "Cantarell 11"
-}
+ "font" : "Cantarell 11",
+ "output" : {
+ "is-wrapped" : false,
+ "is-ellipsized" : false,
+ "width" : 49152,
+ "height" : 41090,
+ "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,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : true,
+ "expandable-space" : true,
+ "word-boundary" : true
+ },
+ {
+ "line-break" : true,
+ "char-break" : true,
+ "cursor-position" : true,
+ "word-boundary" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : 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,
+ "word-end" : true,
+ "word-boundary" : true
+ },
+ {
+ "char-break" : true,
+ "cursor-position" : true,
+ "word-boundary" : true
+ },
+ {
+ "char-break" : true,
+ "cursor-position" : 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" : 11,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 1,
+ "text" : "e",
+ "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" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 1,
+ "length" : 1,
+ "text" : "0",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell Oblique 7.1484375",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "start" : 1,
+ "end" : 2,
+ "type" : "font-scale",
+ "value" : "subscript"
+ },
+ {
+ "start" : 1,
+ "end" : 2,
+ "type" : "baseline-shift",
+ "value" : "subscript"
+ }
+ ],
+ "y-offset" : -3274,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 964,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 2,
+ "length" : 4,
+ "text" : " = o",
+ "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" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 1147,
+ "width" : 9216,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ }
+ ]
+ },
+ {
+ "offset" : 6,
+ "length" : 1,
+ "text" : "o",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 7.1484375",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "start" : 6,
+ "end" : 11,
+ "type" : "font-scale",
+ "value" : "superscript"
+ },
+ {
+ "start" : 6,
+ "end" : 11,
+ "type" : "baseline-shift",
+ "value" : "superscript"
+ }
+ ],
+ "y-offset" : 5542,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 370,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 7,
+ "length" : 1,
+ "text" : "o",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 4.646484375",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "start" : 6,
+ "end" : 11,
+ "type" : "font-scale",
+ "value" : "superscript"
+ },
+ {
+ "start" : 6,
+ "end" : 11,
+ "type" : "baseline-shift",
+ "value" : "superscript"
+ },
+ {
+ "start" : 7,
+ "end" : 11,
+ "type" : "font-scale",
+ "value" : "superscript"
+ },
+ {
+ "start" : 7,
+ "end" : 11,
+ "type" : "baseline-shift",
+ "value" : "superscript"
+ }
+ ],
+ "y-offset" : 9144,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 370,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 8,
+ "length" : 1,
+ "text" : ".",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 3.0205078125",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "start" : 6,
+ "end" : 11,
+ "type" : "font-scale",
+ "value" : "superscript"
+ },
+ {
+ "start" : 6,
+ "end" : 11,
+ "type" : "baseline-shift",
+ "value" : "superscript"
+ },
+ {
+ "start" : 7,
+ "end" : 11,
+ "type" : "font-scale",
+ "value" : "superscript"
+ },
+ {
+ "start" : 7,
+ "end" : 11,
+ "type" : "baseline-shift",
+ "value" : "superscript"
+ },
+ {
+ "start" : 8,
+ "end" : 11,
+ "type" : "font-scale",
+ "value" : "superscript"
+ },
+ {
+ "start" : 8,
+ "end" : 11,
+ "type" : "baseline-shift",
+ "value" : "superscript"
+ }
+ ],
+ "y-offset" : 11485,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 1058,
+ "width" : 1024,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 9,
+ "length" : 1,
+ "text" : ".",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 1.962890625",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "start" : 6,
+ "end" : 11,
+ "type" : "font-scale",
+ "value" : "superscript"
+ },
+ {
+ "start" : 6,
+ "end" : 11,
+ "type" : "baseline-shift",
+ "value" : "superscript"
+ },
+ {
+ "start" : 7,
+ "end" : 11,
+ "type" : "font-scale",
+ "value" : "superscript"
+ },
+ {
+ "start" : 7,
+ "end" : 11,
+ "type" : "baseline-shift",
+ "value" : "superscript"
+ },
+ {
+ "start" : 8,
+ "end" : 11,
+ "type" : "font-scale",
+ "value" : "superscript"
+ },
+ {
+ "start" : 8,
+ "end" : 11,
+ "type" : "baseline-shift",
+ "value" : "superscript"
+ },
+ {
+ "start" : 9,
+ "end" : 11,
+ "type" : "font-scale",
+ "value" : "superscript"
+ },
+ {
+ "start" : 9,
+ "end" : 11,
+ "type" : "baseline-shift",
+ "value" : "superscript"
+ }
+ ],
+ "y-offset" : 13007,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 1058,
+ "width" : 1024,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 10,
+ "length" : 1,
+ "text" : ".",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 1.2763671875",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "start" : 6,
+ "end" : 11,
+ "type" : "font-scale",
+ "value" : "superscript"
+ },
+ {
+ "start" : 6,
+ "end" : 11,
+ "type" : "baseline-shift",
+ "value" : "superscript"
+ },
+ {
+ "start" : 7,
+ "end" : 11,
+ "type" : "font-scale",
+ "value" : "superscript"
+ },
+ {
+ "start" : 7,
+ "end" : 11,
+ "type" : "baseline-shift",
+ "value" : "superscript"
+ },
+ {
+ "start" : 8,
+ "end" : 11,
+ "type" : "font-scale",
+ "value" : "superscript"
+ },
+ {
+ "start" : 8,
+ "end" : 11,
+ "type" : "baseline-shift",
+ "value" : "superscript"
+ },
+ {
+ "start" : 9,
+ "end" : 11,
+ "type" : "font-scale",
+ "value" : "superscript"
+ },
+ {
+ "start" : 9,
+ "end" : 11,
+ "type" : "baseline-shift",
+ "value" : "superscript"
+ },
+ {
+ "start" : 10,
+ "end" : 11,
+ "type" : "font-scale",
+ "value" : "superscript"
+ },
+ {
+ "start" : 10,
+ "end" : 11,
+ "type" : "baseline-shift",
+ "value" : "superscript"
+ }
+ ],
+ "y-offset" : 13996,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 1058,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 12,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-3.layout b/tests/layouts/valid-3.layout
index ef1b1917..a40e605e 100644
--- a/tests/layouts/valid-3.layout
+++ b/tests/layouts/valid-3.layout
@@ -1,5 +1,181 @@
{
+ "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" : "ABC😀️D\n",
- "attributes" : [],
- "font" : "Cantarell 11"
-}
+ "font" : "Cantarell 11",
+ "output" : {
+ "is-wrapped" : false,
+ "is-ellipsized" : false,
+ "width" : 53248,
+ "height" : 38912,
+ "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
+ },
+ {
+ "line-break" : true,
+ "char-break" : true,
+ "cursor-position" : true,
+ "word-end" : 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,
+ "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" : 11,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 3,
+ "text" : "ABC",
+ "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" : 1,
+ "width" : 9216,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 29,
+ "width" : 9216,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 30,
+ "width" : 9216,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ }
+ ]
+ },
+ {
+ "offset" : 3,
+ "length" : 7,
+ "text" : "😀️",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "DejaVu Sans 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 5857,
+ "width" : 15360,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ }
+ ]
+ },
+ {
+ "offset" : 10,
+ "length" : 1,
+ "text" : "D",
+ "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" : 37,
+ "width" : 10240,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 12,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-4.layout b/tests/layouts/valid-4.layout
index 5504107d..a57f6d63 100644
--- a/tests/layouts/valid-4.layout
+++ b/tests/layouts/valid-4.layout
@@ -1,6 +1,1889 @@
{
+ "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 paragraph should ac­tual­ly have multiple lines, unlike all the other wannabe äöü pa­ra­graph tests in this ugh test-case. Grow some lines!\n",
- "attributes" : [],
"font" : "Cantarell 11",
- "width" : 198656
-}
+ "width" : 198656,
+ "output" : {
+ "is-wrapped" : true,
+ "is-ellipsized" : false,
+ "width" : 197632,
+ "height" : 111616,
+ "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,
+ "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,
+ "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
+ },
+ {
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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
+ },
+ {
+ "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
+ },
+ {
+ "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
+ },
+ {
+ "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,
+ "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,
+ "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,
+ "word-end" : 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,
+ "word-end" : true,
+ "word-boundary" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "sentence-end" : true,
+ "expandable-space" : true,
+ "word-boundary" : true
+ },
+ {
+ "line-break" : true,
+ "char-break" : true,
+ "cursor-position" : true,
+ "word-start" : true,
+ "sentence-boundary" : true,
+ "sentence-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,
+ "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" : 32,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 32,
+ "text" : "This paragraph should ac­tual­",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 4,
+ "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" : 406,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 312,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 406,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 438,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ },
+ {
+ "glyph" : 280,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 21
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 22
+ },
+ {
+ "glyph" : 273,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 23
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 24
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 26
+ },
+ {
+ "glyph" : 438,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 27
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 28
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 29
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 30
+ },
+ {
+ "glyph" : 1081,
+ "width" : 6144,
+ "log-cluster" : 30
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 32,
+ "length" : 31,
+ "paragraph-start" : false,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 32,
+ "length" : 31,
+ "text" : "ly have multiple lines, unlike ",
+ "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" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 473,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 466,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 358,
+ "width" : 13312,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 438,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 406,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 21
+ },
+ {
+ "glyph" : 1059,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 22
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 23
+ },
+ {
+ "glyph" : 438,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 24
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 25
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 26
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 27
+ },
+ {
+ "glyph" : 345,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 28
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 29
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 30
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 63,
+ "length" : 33,
+ "paragraph-start" : false,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 63,
+ "length" : 33,
+ "text" : "all the other wannabe äöü pa­",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 4,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 467,
+ "width" : 11264,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 272,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 21
+ },
+ {
+ "glyph" : 260,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 22
+ },
+ {
+ "glyph" : 381,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 24
+ },
+ {
+ "glyph" : 444,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 26
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 28
+ },
+ {
+ "glyph" : 406,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 29
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 30
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 31
+ },
+ {
+ "glyph" : 1081,
+ "width" : 6144,
+ "log-cluster" : 31
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 96,
+ "length" : 33,
+ "paragraph-start" : false,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 96,
+ "length" : 33,
+ "text" : "ra­graph tests in this ugh test-",
+ "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" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 312,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 406,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 21
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 22
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 23
+ },
+ {
+ "glyph" : 438,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 24
+ },
+ {
+ "glyph" : 312,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 25
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 26
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 27
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 28
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 29
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 30
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 31
+ },
+ {
+ "glyph" : 1081,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 32
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 129,
+ "length" : 22,
+ "paragraph-start" : false,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 129,
+ "length" : 22,
+ "text" : "case. Grow some lines!",
+ "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" : 273,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 1058,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 69,
+ "width" : 10240,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 467,
+ "width" : 11264,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 358,
+ "width" : 13312,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ },
+ {
+ "glyph" : 1063,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 21
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 152,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-5.layout b/tests/layouts/valid-5.layout
index e5e96b9a..fa68f67c 100644
--- a/tests/layouts/valid-5.layout
+++ b/tests/layouts/valid-5.layout
@@ -1,4 +1,20 @@
{
+ "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" : "A test with multiple paragraphs and with no-break attributes, which might trigger a crash.\nIf it doesn't the fix has worked.\n",
"attributes" : [
{
@@ -9,5 +25,1679 @@
}
],
"font" : "Cantarell 11",
- "width" : 194560
-}
+ "width" : 194560,
+ "output" : {
+ "is-wrapped" : true,
+ "is-ellipsized" : false,
+ "width" : 194560,
+ "height" : 130048,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "word-end" : 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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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,
+ "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
+ },
+ {
+ "char-break" : true,
+ "cursor-position" : true,
+ "word-start" : 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,
+ "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,
+ "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" : 21,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 21,
+ "text" : "A test with multiple ",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "start" : 21,
+ "end" : 31,
+ "type" : "font-features",
+ "value" : "tnum=1"
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 1,
+ "width" : 9216,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 467,
+ "width" : 11264,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 358,
+ "width" : 13312,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 438,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 406,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 21,
+ "length" : 23,
+ "paragraph-start" : false,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 21,
+ "length" : 23,
+ "text" : "paragraphs and with no-",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "start" : 21,
+ "end" : 31,
+ "type" : "font-features",
+ "value" : "tnum=1"
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 406,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 312,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 406,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 280,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 467,
+ "width" : 11264,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 21
+ },
+ {
+ "glyph" : 1081,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 22
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 44,
+ "length" : 30,
+ "paragraph-start" : false,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 44,
+ "length" : 30,
+ "text" : "break attributes, which might ",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "start" : 21,
+ "end" : 31,
+ "type" : "font-features",
+ "value" : "tnum=1"
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 272,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 345,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 272,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 438,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 1059,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 467,
+ "width" : 11264,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 19
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ },
+ {
+ "glyph" : 273,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 21
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 22
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 23
+ },
+ {
+ "glyph" : 358,
+ "width" : 13312,
+ "is-cluster-start" : true,
+ "log-cluster" : 24
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 25
+ },
+ {
+ "glyph" : 312,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 26
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 27
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 28
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 29
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 74,
+ "length" : 16,
+ "paragraph-start" : false,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 74,
+ "length" : 16,
+ "text" : "trigger a crash.",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "start" : 21,
+ "end" : 31,
+ "type" : "font-features",
+ "value" : "tnum=1"
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 312,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 312,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "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
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 273,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 1058,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 91,
+ "length" : 26,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 91,
+ "length" : 26,
+ "text" : "If it doesn't the fix has ",
+ "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" : 81,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 311,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 280,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 1099,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ },
+ {
+ "glyph" : 489,
+ "width" : 9216,
+ "is-cluster-start" : true,
+ "log-cluster" : 18
+ },
+ {
+ "glyph" : 472,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 20
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 21
+ },
+ {
+ "glyph" : 319,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 22
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 23
+ },
+ {
+ "glyph" : 417,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 24
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 25
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 117,
+ "length" : 7,
+ "paragraph-start" : false,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 117,
+ "length" : 7,
+ "text" : "worked.",
+ "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" : 467,
+ "width" : 11264,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 345,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 280,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 1058,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 125,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-6.layout b/tests/layouts/valid-6.layout
index 4423d068..c0b31f13 100644
--- a/tests/layouts/valid-6.layout
+++ b/tests/layouts/valid-6.layout
@@ -1,5 +1,369 @@
{
+ "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" : " 0️⃣ Keycap Digit Zero\n",
- "attributes" : [],
- "font" : "Cantarell 11"
-}
+ "font" : "Cantarell 11",
+ "output" : {
+ "is-wrapped" : false,
+ "is-ellipsized" : false,
+ "width" : 150528,
+ "height" : 40960,
+ "log-attrs" : [
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "sentence-boundary" : true,
+ "backspace-deletes-character" : true,
+ "expandable-space" : true,
+ "word-boundary" : true
+ },
+ {
+ "line-break" : true,
+ "char-break" : true,
+ "cursor-position" : true,
+ "word-start" : true,
+ "sentence-start" : true,
+ "word-boundary" : 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,
+ "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,
+ "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,
+ "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" : 26,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 1,
+ "text" : " ",
+ "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" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 1,
+ "length" : 7,
+ "text" : "0️⃣",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "DejaVu Sans 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 19,
+ "width" : 9216,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 268443875,
+ "width" : 17408,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ }
+ ]
+ },
+ {
+ "offset" : 8,
+ "length" : 18,
+ "text" : " Keycap Digit Zero",
+ "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" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 100,
+ "width" : 9216,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 473,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 273,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 406,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 7
+ },
+ {
+ "glyph" : 37,
+ "width" : 10240,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 312,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 12
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ },
+ {
+ "glyph" : 239,
+ "width" : 9216,
+ "is-cluster-start" : true,
+ "log-cluster" : 14
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 15
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 16
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 17
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 27,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-7.layout b/tests/layouts/valid-7.layout
index b49484c6..882e67c8 100644
--- a/tests/layouts/valid-7.layout
+++ b/tests/layouts/valid-7.layout
@@ -1,4 +1,20 @@
{
+ "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" : [
{
@@ -17,5 +33,555 @@
"font" : "Cantarell 11",
"ellipsize" : "middle",
"width" : 204800,
- "indent" : 51200
-}
+ "indent" : 51200,
+ "output" : {
+ "is-wrapped" : false,
+ "is-ellipsized" : true,
+ "width" : 153600,
+ "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" : 12,
+ "text" : "This is a te",
+ "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
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 430,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 10
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ }
+ ]
+ },
+ {
+ "offset" : 12,
+ "length" : 26,
+ "text" : "st of the automatic emerge",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "common",
+ "font" : "Cantarell 11",
+ "flags" : 2,
+ "extra-attributes" : [
+ {
+ "end" : 2147483647,
+ "type" : "fallback",
+ "value" : false
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 1062,
+ "width" : 16384,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 38,
+ "length" : 3,
+ "text" : "ncy",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "start" : 22,
+ "end" : 41,
+ "type" : "foreground",
+ "value" : "#00000000ffff"
+ },
+ {
+ "start" : 22,
+ "end" : 41,
+ "type" : "underline",
+ "value" : "single"
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 360,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 273,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 473,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ }
+ ]
+ },
+ {
+ "offset" : 41,
+ "length" : 7,
+ "text" : " brake!",
+ "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" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 272,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 409,
+ "width" : 6144,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 244,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 345,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ },
+ {
+ "glyph" : 1063,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 49,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-8.layout b/tests/layouts/valid-8.layout
index 063ec370..ea42ae7a 100644
--- a/tests/layouts/valid-8.layout
+++ b/tests/layouts/valid-8.layout
@@ -1,8 +1,362 @@
{
+ "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" : "Hello שלום Γειά σας\n",
- "attributes" : [],
"font" : "Cantarell 11",
"auto-dir" : false,
"alignment" : "center",
- "spacing" : 51200
-}
+ "spacing" : 51200,
+ "output" : {
+ "is-wrapped" : false,
+ "is-ellipsized" : false,
+ "width" : 134144,
+ "height" : 90112,
+ "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,
+ "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,
+ "backspace-deletes-character" : true,
+ "break-inserts-hyphen" : true
+ },
+ {
+ "char-break" : true,
+ "cursor-position" : true,
+ "backspace-deletes-character" : true,
+ "break-inserts-hyphen" : true
+ },
+ {
+ "char-break" : true,
+ "cursor-position" : true,
+ "backspace-deletes-character" : true,
+ "break-inserts-hyphen" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : true,
+ "backspace-deletes-character" : 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,
+ "cursor-position" : true,
+ "break-inserts-hyphen" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : 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" : 30,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 6,
+ "text" : "Hello ",
+ "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" : 76,
+ "width" : 11264,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 287,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 349,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 370,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ }
+ ]
+ },
+ {
+ "offset" : 6,
+ "length" : 8,
+ "text" : "שלום",
+ "bidi-level" : 1,
+ "gravity" : "south",
+ "language" : "he",
+ "script" : "hebrew",
+ "font" : "DejaVu Sans 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 1332,
+ "width" : 10240,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 1324,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 1331,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 1344,
+ "width" : 10240,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 14,
+ "length" : 1,
+ "text" : " ",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "he",
+ "script" : "hebrew",
+ "font" : "DejaVu Sans 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 3,
+ "width" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 15,
+ "length" : 15,
+ "text" : "Γειά σας",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "el",
+ "script" : "greek",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 677,
+ "width" : 8192,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 808,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 812,
+ "width" : 4096,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 837,
+ "width" : 9216,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 1109,
+ "width" : 3072,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ },
+ {
+ "glyph" : 822,
+ "width" : 9216,
+ "is-cluster-start" : true,
+ "log-cluster" : 9
+ },
+ {
+ "glyph" : 804,
+ "width" : 9216,
+ "is-cluster-start" : true,
+ "log-cluster" : 11
+ },
+ {
+ "glyph" : 821,
+ "width" : 7168,
+ "is-cluster-start" : true,
+ "log-cluster" : 13
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 31,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/layouts/valid-9.layout b/tests/layouts/valid-9.layout
index e3dfa57b..e833808e 100644
--- a/tests/layouts/valid-9.layout
+++ b/tests/layouts/valid-9.layout
@@ -1,4 +1,20 @@
{
+ "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" : "Hello שלום Γειά σας\n",
"attributes" : [
{
@@ -8,5 +24,434 @@
}
],
"font" : "Cantarell 11",
- "width" : 102400
-}
+ "width" : 102400,
+ "output" : {
+ "is-wrapped" : true,
+ "is-ellipsized" : false,
+ "width" : 71392,
+ "height" : 93184,
+ "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,
+ "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,
+ "backspace-deletes-character" : true,
+ "break-inserts-hyphen" : true
+ },
+ {
+ "char-break" : true,
+ "cursor-position" : true,
+ "backspace-deletes-character" : true,
+ "break-inserts-hyphen" : true
+ },
+ {
+ "char-break" : true,
+ "cursor-position" : true,
+ "backspace-deletes-character" : true,
+ "break-inserts-hyphen" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : true,
+ "backspace-deletes-character" : 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,
+ "cursor-position" : true,
+ "break-inserts-hyphen" : true
+ },
+ {
+ "char-break" : true,
+ "white" : true,
+ "cursor-position" : true,
+ "word-end" : 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" : 6,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 6,
+ "text" : "Hello ",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "end" : 30,
+ "type" : "letter-spacing",
+ "value" : 8888
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 76,
+ "width" : 15708,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 287,
+ "width" : 17080,
+ "x-offset" : 4444,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 349,
+ "width" : 12984,
+ "x-offset" : 4444,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 349,
+ "width" : 12984,
+ "x-offset" : 4444,
+ "is-cluster-start" : true,
+ "log-cluster" : 3
+ },
+ {
+ "glyph" : 370,
+ "width" : 12636,
+ "x-offset" : 4444,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "x-offset" : 4444,
+ "is-cluster-start" : true,
+ "log-cluster" : 5
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 6,
+ "length" : 9,
+ "paragraph-start" : false,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 6,
+ "length" : 8,
+ "text" : "שלום",
+ "bidi-level" : 1,
+ "gravity" : "south",
+ "language" : "he",
+ "script" : "hebrew",
+ "font" : "DejaVu Sans 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "end" : 30,
+ "type" : "letter-spacing",
+ "value" : 8888
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 1332,
+ "width" : 14684,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 1324,
+ "width" : 12984,
+ "x-offset" : 4444,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 1331,
+ "width" : 17080,
+ "x-offset" : 4444,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 1344,
+ "width" : 19128,
+ "x-offset" : 4444,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ },
+ {
+ "offset" : 14,
+ "length" : 1,
+ "text" : " ",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "he",
+ "script" : "hebrew",
+ "font" : "DejaVu Sans 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "end" : 30,
+ "type" : "letter-spacing",
+ "value" : 8888
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "x-offset" : 4444,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 15,
+ "length" : 9,
+ "paragraph-start" : false,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 15,
+ "length" : 9,
+ "text" : "Γειά ",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "el",
+ "script" : "greek",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "end" : 30,
+ "type" : "letter-spacing",
+ "value" : 8888
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 677,
+ "width" : 12636,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 808,
+ "width" : 16056,
+ "x-offset" : 4444,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 812,
+ "width" : 12984,
+ "x-offset" : 4444,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ },
+ {
+ "glyph" : 837,
+ "width" : 13660,
+ "x-offset" : 4444,
+ "is-cluster-start" : true,
+ "log-cluster" : 6
+ },
+ {
+ "glyph" : 268435455,
+ "width" : 0,
+ "x-offset" : 4444,
+ "is-cluster-start" : true,
+ "log-cluster" : 8
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 24,
+ "length" : 6,
+ "paragraph-start" : false,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 24,
+ "length" : 6,
+ "text" : "σας",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "el",
+ "script" : "greek",
+ "font" : "Cantarell 11",
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "end" : 30,
+ "type" : "letter-spacing",
+ "value" : 8888
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 822,
+ "width" : 13660,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 804,
+ "width" : 18104,
+ "x-offset" : 4444,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ },
+ {
+ "glyph" : 821,
+ "width" : 11612,
+ "x-offset" : 4444,
+ "is-cluster-start" : true,
+ "log-cluster" : 4
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "start-index" : 31,
+ "length" : 0,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : []
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/test-common.c b/tests/test-common.c
index 3821a450..12b22cb4 100644
--- a/tests/test-common.c
+++ b/tests/test-common.c
@@ -82,6 +82,70 @@ done:
return diff;
}
+char *
+diff_bytes (GBytes *b1,
+ GBytes *b2,
+ GError **error)
+{
+ const char *command[] = { "diff", "-u", "-i", NULL, NULL, NULL };
+ char *diff, *tmpfile, *tmpfile2;
+ int fd;
+ const char *text;
+ gsize len;
+
+ /* write the text buffer to a temporary file */
+ fd = g_file_open_tmp (NULL, &tmpfile, error);
+ if (fd < 0)
+ return NULL;
+
+ text = (const char *) g_bytes_get_data (b1, &len);
+ if (write (fd, text, len) != (int) len)
+ {
+ close (fd);
+ g_set_error (error,
+ G_FILE_ERROR, G_FILE_ERROR_FAILED,
+ "Could not write data to temporary file '%s'", tmpfile);
+ goto done;
+ }
+ close (fd);
+
+ fd = g_file_open_tmp (NULL, &tmpfile2, error);
+ if (fd < 0)
+ return NULL;
+
+ text = (const char *) g_bytes_get_data (b2, &len);
+ if (write (fd, text, len) != (int) len)
+ {
+ close (fd);
+ g_set_error (error,
+ G_FILE_ERROR, G_FILE_ERROR_FAILED,
+ "Could not write data to temporary file '%s'", tmpfile2);
+ goto done;
+ }
+ close (fd);
+
+ command[3] = tmpfile;
+ command[4] = tmpfile2;
+
+ /* run diff command */
+ g_spawn_sync (NULL,
+ (char **) command,
+ NULL,
+ G_SPAWN_SEARCH_PATH,
+ NULL, NULL,
+ &diff,
+ NULL, NULL,
+ error);
+
+done:
+ unlink (tmpfile);
+ g_free (tmpfile);
+ unlink (tmpfile2);
+ g_free (tmpfile2);
+
+ return diff;
+}
+
gboolean
file_has_prefix (const char *filename,
const char *str,
diff --git a/tests/test-common.h b/tests/test-common.h
index 86320236..6fe96133 100644
--- a/tests/test-common.h
+++ b/tests/test-common.h
@@ -6,6 +6,10 @@ char * diff_with_file (const char *file,
gssize len,
GError **error);
+char * diff_bytes (GBytes *b1,
+ GBytes *b2,
+ GError **error);
+
gboolean file_has_prefix (const char *file,
const char *str,
GError **error);
diff --git a/tests/test-layout.c b/tests/test-layout.c
index f4b36c77..b664af5d 100644
--- a/tests/test-layout.c
+++ b/tests/test-layout.c
@@ -36,194 +36,9 @@ static PangoContext *context;
static gboolean opt_show_font;
-static const gchar *
-enum_value_nick (GType type, gint value)
+static GBytes *
+test_bytes (GBytes *orig)
{
- GEnumClass *eclass;
- GEnumValue *ev;
-
- eclass = g_type_class_ref (type);
- ev = g_enum_get_value (eclass, value);
- g_type_class_unref (eclass);
-
- if (ev)
- return ev->value_nick;
- else
- return "?";
-}
-
-static const gchar *
-direction_name (PangoDirection dir)
-{
- return enum_value_nick (PANGO_TYPE_DIRECTION, dir);
-}
-
-static const gchar *
-gravity_name (PangoGravity gravity)
-{
- return enum_value_nick (PANGO_TYPE_GRAVITY, gravity);
-}
-
-static const gchar *
-script_name (PangoScript script)
-{
- return enum_value_nick (PANGO_TYPE_SCRIPT, script);
-}
-
-static gchar *
-font_name (PangoFont *font)
-{
- PangoFontDescription *desc;
- gchar *name;
-
- desc = pango_font_describe (font);
- name = pango_font_description_to_string (desc);
- pango_font_description_free (desc);
-
- return name;
-}
-
-static void
-dump_lines (PangoLayout *layout, GString *string)
-{
- PangoLayoutIter *iter;
- const gchar *text;
- gint index, index2;
- gboolean has_more;
- gchar *char_str;
- gint i;
- PangoLayoutLine *line;
-
- text = pango_layout_get_text (layout);
- iter = pango_layout_get_iter (layout);
-
- has_more = TRUE;
- index = pango_layout_iter_get_index (iter);
- index2 = 0;
- i = 0;
- while (has_more)
- {
- line = pango_layout_iter_get_line (iter);
- has_more = pango_layout_iter_next_line (iter);
- i++;
-
- if (has_more)
- {
- index2 = pango_layout_iter_get_index (iter);
- char_str = g_strndup (text + index, index2 - index);
- }
- else
- {
- char_str = g_strdup (text + index);
- }
-
- g_string_append_printf (string, "i=%d, index=%d, paragraph-start=%d, dir=%s '%s'\n",
- i, index, line->is_paragraph_start, direction_name (line->resolved_dir),
- char_str);
- g_free (char_str);
-
- index = index2;
- }
- pango_layout_iter_free (iter);
-}
-
-#define ANALYSIS_FLAGS (PANGO_ANALYSIS_FLAG_CENTERED_BASELINE | \
- PANGO_ANALYSIS_FLAG_IS_ELLIPSIS | \
- PANGO_ANALYSIS_FLAG_NEED_HYPHEN)
-
-static void
-dump_runs (PangoLayout *layout, GString *string)
-{
- PangoLayoutIter *iter;
- PangoLayoutRun *run;
- PangoItem *item;
- const gchar *text;
- gint index;
- gboolean has_more;
- gchar *char_str;
- gint i;
- gchar *font = 0;
-
- text = pango_layout_get_text (layout);
- iter = pango_layout_get_iter (layout);
-
- has_more = TRUE;
- i = 0;
- while (has_more)
- {
- run = pango_layout_iter_get_run (iter);
- index = pango_layout_iter_get_index (iter);
- has_more = pango_layout_iter_next_run (iter);
- i++;
-
- if (run)
- {
- item = ((PangoGlyphItem*)run)->item;
- char_str = g_strndup (text + item->offset, item->length);
- font = font_name (item->analysis.font);
- g_string_append_printf (string, "i=%d, index=%d, chars=%d, level=%d, gravity=%s, flags=%d, font=%s, script=%s, language=%s, '%s'\n",
- i, index, item->num_chars, item->analysis.level,
- gravity_name (item->analysis.gravity),
- item->analysis.flags & ANALYSIS_FLAGS,
- opt_show_font ? font : "OMITTED", /* for some reason, this fails on build.gnome.org, so leave it out */
- script_name (item->analysis.script),
- pango_language_to_string (item->analysis.language),
- char_str);
- print_attributes (item->analysis.extra_attrs, string);
- g_free (font);
- g_free (char_str);
- }
- else
- {
- g_string_append_printf (string, "i=%d, index=%d, no run, line end\n",
- i, index);
- }
- }
- pango_layout_iter_free (iter);
-}
-
-static void
-dump_directions (PangoLayout *layout, GString *string)
-{
- const char *text, *p;
-
- text = pango_layout_get_text (layout);
- for (p = text; *p; p = g_utf8_next_char (p))
- {
- g_string_append_printf (string, "%d ", pango_layout_get_direction (layout, p - text));
- }
- g_string_append (string, "\n");
-}
-
-static void
-dump_cursor_positions (PangoLayout *layout, GString *string)
-{
- const char *text;
- int index, trailing;
-
- text = pango_layout_get_text (layout);
-
- index = 0;
- trailing = 0;
-
- while (index < G_MAXINT)
- {
- g_string_append_printf (string, "%d(%d) ", index, trailing);
-
- while (trailing--)
- index = g_utf8_next_char (text + index) - text;
-
- pango_layout_move_cursor_visually (layout, TRUE, index, 0, 1, &index, &trailing);
- }
-
- g_string_append (string, "\n");
-}
-
-static void
-test_file (const char *filename, GString *string)
-{
- char *contents;
- gsize length;
GBytes *bytes;
GError *error = NULL;
PangoLayout *layout;
@@ -231,76 +46,29 @@ test_file (const char *filename, GString *string)
if (context == NULL)
context = pango_font_map_create_context (pango_cairo_font_map_get_default ());
- g_file_get_contents (filename, &contents, &length, &error);
- g_assert_no_error (error);
-
- bytes = g_bytes_new_take (contents, length);
-
- layout = pango_layout_deserialize (context, bytes, PANGO_LAYOUT_DESERIALIZE_DEFAULT, &error);
+ layout = pango_layout_deserialize (context, orig, PANGO_LAYOUT_DESERIALIZE_CONTEXT, &error);
g_assert_no_error (error);
- g_bytes_unref (bytes);
-
- /* generate the dumps */
- g_string_append (string, pango_layout_get_text (layout));
-
- g_string_append (string, "\n--- parameters\n\n");
-
- g_string_append_printf (string, "wrapped: %d\n", pango_layout_is_wrapped (layout));
- g_string_append_printf (string, "ellipsized: %d\n", pango_layout_is_ellipsized (layout));
- g_string_append_printf (string, "lines: %d\n", pango_layout_get_line_count (layout));
- if (pango_layout_get_width (layout) > 0)
- g_string_append_printf (string, "width: %d\n", pango_layout_get_width (layout));
- if (pango_layout_get_height (layout) > 0)
- g_string_append_printf (string, "height: %d\n", pango_layout_get_height (layout));
- if (pango_layout_get_indent (layout) != 0)
- g_string_append_printf (string, "indent: %d\n", pango_layout_get_indent (layout));
-
- g_string_append (string, "\n--- attributes\n\n");
- print_attr_list (pango_layout_get_attributes (layout), string);
-
- g_string_append (string, "\n--- directions\n\n");
- dump_directions (layout, string);
-
- g_string_append (string, "\n--- cursor positions\n\n");
- dump_cursor_positions (layout, string);
-
- g_string_append (string, "\n--- lines\n\n");
- dump_lines (layout, string);
-
- g_string_append (string, "\n--- runs\n\n");
- dump_runs (layout, string);
+ bytes = pango_layout_serialize (layout, PANGO_LAYOUT_SERIALIZE_CONTEXT | PANGO_LAYOUT_SERIALIZE_OUTPUT);
g_object_unref (layout);
-}
-
-static gchar *
-get_expected_filename (const char *filename)
-{
- char *f, *p, *expected;
- f = g_strdup (filename);
- p = strstr (f, ".layout");
- if (p)
- *p = 0;
- expected = g_strconcat (f, ".expected", NULL);
-
- g_free (f);
-
- return expected;
+ return bytes;
}
static void
test_layout (gconstpointer d)
{
const char *filename = d;
- char *expected_file;
GError *error = NULL;
- GString *dump;
char *diff;
PangoFontFamily **families;
int n_families;
gboolean found_cantarell;
+ GBytes *bytes;
+ char *contents;
+ gsize length;
+ GBytes *orig;
char *old_locale = g_strdup (setlocale (LC_ALL, NULL));
setlocale (LC_ALL, "en_US.UTF-8");
@@ -330,22 +98,25 @@ test_layout (gconstpointer d)
if (!found_cantarell)
{
- char *msg = g_strdup_printf ("Cantarell font not available, skipping itemization %s", filename);
+ char *msg = g_strdup_printf ("Cantarell font not available, skipping layout %s", filename);
g_test_skip (msg);
g_free (msg);
g_free (old_locale);
return;
}
- expected_file = get_expected_filename (filename);
-
- dump = g_string_sized_new (0);
+ g_file_get_contents (filename, &contents, &length, &error);
+ g_assert_no_error (error);
+ orig = g_bytes_new_take (contents, length);
- test_file (filename, dump);
+ bytes = test_bytes (orig);
- diff = diff_with_file (expected_file, dump->str, dump->len, &error);
+ diff = diff_bytes (bytes, orig, &error);
g_assert_no_error (error);
+ g_bytes_unref (bytes);
+ g_bytes_unref (orig);
+
setlocale (LC_ALL, old_locale);
g_free (old_locale);
@@ -365,8 +136,6 @@ test_layout (gconstpointer d)
}
g_free (diff);
- g_string_free (dump, TRUE);
- g_free (expected_file);
}
int
@@ -400,12 +169,21 @@ main (int argc, char *argv[])
/* allow to easily generate expected output for new test cases */
if (argc > 1 && argv[1][0] != '-')
{
- GString *string;
+ char *contents;
+ gsize length;
+ GError *error = NULL;
+ GBytes *orig;
+ GBytes *bytes;
+
+ g_file_get_contents (argv[1], &contents, &length, &error);
+ g_assert_no_error (error);
+ orig = g_bytes_new_take (contents, length);
+ bytes = test_bytes (orig);
+
+ g_print ("%s", (const char *)g_bytes_get_data (bytes, NULL));
- string = g_string_sized_new (0);
- test_file (argv[1], string);
- g_print ("%s", string->str);
- g_string_free (string, TRUE);
+ g_bytes_unref (bytes);
+ g_bytes_unref (orig);
return 0;
}