summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-01-02 13:48:29 -0500
committerMatthias Clasen <mclasen@redhat.com>2022-01-02 13:48:29 -0500
commitfae313ac8729866b198aae0dd2510598da06793d (patch)
tree10544feb16090c743d37808c51068a93bafda0ae
parentfc46f12754e9035c71da2747be55361ddfcf7635 (diff)
downloadpango-fae313ac8729866b198aae0dd2510598da06793d.tar.gz
Add a test for letterspacing
This tests that we turn off ligatures when letterspacing is enabled.
-rw-r--r--tests/layouts/letterspacing.layout135
-rw-r--r--tests/meson.build1
2 files changed, 136 insertions, 0 deletions
diff --git a/tests/layouts/letterspacing.layout b/tests/layouts/letterspacing.layout
new file mode 100644
index 00000000..f1eb5fa5
--- /dev/null
+++ b/tests/layouts/letterspacing.layout
@@ -0,0 +1,135 @@
+{
+ "context" : {
+ "font" : "serif 12",
+ "base-gravity" : "south",
+ "gravity-hint" : "natural",
+ "base-dir" : "weak-ltr",
+ "round-glyph-positions" : true,
+ "transform" : [
+ 1,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0
+ ]
+ },
+ "text" : "ffi",
+ "attributes" : [
+ {
+ "type" : "letter-spacing",
+ "value" : 10240
+ },
+ {
+ "type" : "font-features",
+ "value" : "liga=1"
+ }
+ ],
+ "font" : "DejaVu Sans 32",
+ "output" : {
+ "is-wrapped" : false,
+ "is-ellipsized" : false,
+ "unknown-glyphs" : 0,
+ "width" : 63488,
+ "height" : 52224,
+ "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,
+ "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" : 3,
+ "paragraph-start" : true,
+ "direction" : "ltr",
+ "runs" : [
+ {
+ "offset" : 0,
+ "length" : 3,
+ "text" : "ffi",
+ "bidi-level" : 0,
+ "gravity" : "south",
+ "language" : "en-us",
+ "script" : "latin",
+ "font" : {
+ "description" : "DejaVu Sans 32",
+ "checksum" : "69ccd07023a72ceb27a5e5c22f728627353b60a198170f5e58dd7014221abf01",
+ "matrix" : [
+ 1,
+ -0,
+ -0,
+ 1,
+ 0,
+ 0
+ ]
+ },
+ "flags" : 0,
+ "extra-attributes" : [
+ {
+ "type" : "letter-spacing",
+ "value" : 10240
+ },
+ {
+ "type" : "font-features",
+ "value" : "liga=1"
+ }
+ ],
+ "y-offset" : 0,
+ "start-x-offset" : 0,
+ "end-x-offset" : 0,
+ "glyphs" : [
+ {
+ "glyph" : 73,
+ "width" : 20480,
+ "is-cluster-start" : true,
+ "log-cluster" : 0
+ },
+ {
+ "glyph" : 73,
+ "width" : 25600,
+ "x-offset" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 1
+ },
+ {
+ "glyph" : 76,
+ "width" : 17408,
+ "x-offset" : 5120,
+ "is-cluster-start" : true,
+ "log-cluster" : 2
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/tests/meson.build b/tests/meson.build
index b885f999..83732b5a 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -124,6 +124,7 @@ installed_test_layouts_data = [
'layouts/arabic-format.layout',
'layouts/no-space.layout',
'layouts/aaa.layout',
+ 'layouts/letterspacing.layout',
]
installed_test_fonts_data = [