diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-11-22 23:01:25 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-11-24 19:57:58 -0500 |
commit | 9a63774e6f6bdc262da09088aa9075330798f18a (patch) | |
tree | 757ac7d55526ce8ebaff02145feae8a5d8c52e57 /tests/layouts | |
parent | 3f6f2887f02ee6cf98d115085b0dcff681696e0e (diff) | |
download | pango-9a63774e6f6bdc262da09088aa9075330798f18a.tar.gz |
Update test-layout
Use the new output serialization in test-layout
to store both the input and output in the same
file.
Diffstat (limited to 'tests/layouts')
-rw-r--r-- | tests/layouts/bratwurst.expected | 32 | ||||
-rw-r--r-- | tests/layouts/bratwurst.layout | 195 | ||||
-rw-r--r-- | tests/layouts/valid-1.layout | 632 | ||||
-rw-r--r-- | tests/layouts/valid-10.layout | 347 | ||||
-rw-r--r-- | tests/layouts/valid-11.layout | 373 | ||||
-rw-r--r-- | tests/layouts/valid-12.layout | 734 | ||||
-rw-r--r-- | tests/layouts/valid-13.layout | 745 | ||||
-rw-r--r-- | tests/layouts/valid-14.layout | 450 | ||||
-rw-r--r-- | tests/layouts/valid-15.layout | 988 | ||||
-rw-r--r-- | tests/layouts/valid-16.layout | 995 | ||||
-rw-r--r-- | tests/layouts/valid-17.layout | 305 | ||||
-rw-r--r-- | tests/layouts/valid-18.layout | 713 | ||||
-rw-r--r-- | tests/layouts/valid-19.layout | 585 | ||||
-rw-r--r-- | tests/layouts/valid-2.layout | 532 | ||||
-rw-r--r-- | tests/layouts/valid-20.layout | 191 | ||||
-rw-r--r-- | tests/layouts/valid-22.layout | 528 | ||||
-rw-r--r-- | tests/layouts/valid-3.layout | 182 | ||||
-rw-r--r-- | tests/layouts/valid-4.layout | 1889 | ||||
-rw-r--r-- | tests/layouts/valid-5.layout | 1694 | ||||
-rw-r--r-- | tests/layouts/valid-6.layout | 370 | ||||
-rw-r--r-- | tests/layouts/valid-7.layout | 570 | ||||
-rw-r--r-- | tests/layouts/valid-8.layout | 360 | ||||
-rw-r--r-- | tests/layouts/valid-9.layout | 449 |
23 files changed, 13764 insertions, 95 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 miscellaneous ignorables\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 miscellaneous ignorables", + "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 actually have multiple lines, unlike all the other wannabe äöü paragraph 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 actual", + "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" : "ragraph 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 |