From 9a63774e6f6bdc262da09088aa9075330798f18a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 22 Nov 2021 23:01:25 -0500 Subject: Update test-layout Use the new output serialization in test-layout to store both the input and output in the same file. --- tests/layouts/valid-7.layout | 570 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 568 insertions(+), 2 deletions(-) (limited to 'tests/layouts/valid-7.layout') 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 -- cgit v1.2.1 From cddd173f713335318802a98f008d44b66ac4db46 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 24 Nov 2021 17:46:55 -0500 Subject: Make test-layout use included fonts Add Cantarell, DejaVu Sans and a subset of Noto Color Emoji to git, and make test-layout use just those fonts. This should help with keeping the ci from breaking due to different system fonts. Update tests. --- tests/layouts/valid-7.layout | 65 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 4 deletions(-) (limited to 'tests/layouts/valid-7.layout') diff --git a/tests/layouts/valid-7.layout b/tests/layouts/valid-7.layout index 882e67c8..5a1fed32 100644 --- a/tests/layouts/valid-7.layout +++ b/tests/layouts/valid-7.layout @@ -37,6 +37,7 @@ "output" : { "is-wrapped" : false, "is-ellipsized" : true, + "unknown-glyphs" : 0, "width" : 153600, "height" : 37888, "log-attrs" : [ @@ -358,7 +359,21 @@ "gravity" : "south", "language" : "en-us", "script" : "latin", - "font" : "Cantarell 11", + "font" : { + "description" : "Cantarell 11", + "checksum" : "5bcb6ee14ee9d210b2e91d643de1fe456e9d1aea770983fdb05951545efebbe2", + "variations" : { + "wght" : 0 + }, + "matrix" : [ + 1.0, + -0.0, + -0.0, + 1.0, + 0.0, + 0.0 + ] + }, "flags" : 0, "y-offset" : 0, "start-x-offset" : 0, @@ -446,7 +461,21 @@ "gravity" : "south", "language" : "en-us", "script" : "common", - "font" : "Cantarell 11", + "font" : { + "description" : "Cantarell 11", + "checksum" : "5bcb6ee14ee9d210b2e91d643de1fe456e9d1aea770983fdb05951545efebbe2", + "variations" : { + "wght" : 0 + }, + "matrix" : [ + 1.0, + -0.0, + -0.0, + 1.0, + 0.0, + 0.0 + ] + }, "flags" : 2, "extra-attributes" : [ { @@ -475,7 +504,21 @@ "gravity" : "south", "language" : "en-us", "script" : "latin", - "font" : "Cantarell 11", + "font" : { + "description" : "Cantarell 11", + "checksum" : "5bcb6ee14ee9d210b2e91d643de1fe456e9d1aea770983fdb05951545efebbe2", + "variations" : { + "wght" : 0 + }, + "matrix" : [ + 1.0, + -0.0, + -0.0, + 1.0, + 0.0, + 0.0 + ] + }, "flags" : 0, "extra-attributes" : [ { @@ -523,7 +566,21 @@ "gravity" : "south", "language" : "en-us", "script" : "latin", - "font" : "Cantarell 11", + "font" : { + "description" : "Cantarell 11", + "checksum" : "5bcb6ee14ee9d210b2e91d643de1fe456e9d1aea770983fdb05951545efebbe2", + "variations" : { + "wght" : 0 + }, + "matrix" : [ + 1.0, + -0.0, + -0.0, + 1.0, + 0.0, + 0.0 + ] + }, "flags" : 0, "y-offset" : 0, "start-x-offset" : 0, -- cgit v1.2.1 From 05be686a512299fc03e987399819ff13b7935b81 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 24 Nov 2021 19:54:39 -0500 Subject: Add a newline to serialization results Otherwise editing the output in an editor is likely to make the data not match anymore, since most editors will add a final newline. Update all tests --- tests/layouts/valid-7.layout | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/layouts/valid-7.layout') diff --git a/tests/layouts/valid-7.layout b/tests/layouts/valid-7.layout index 5a1fed32..705713ec 100644 --- a/tests/layouts/valid-7.layout +++ b/tests/layouts/valid-7.layout @@ -641,4 +641,4 @@ } ] } -} \ No newline at end of file +} -- cgit v1.2.1