From a11ce3c81b66e87d535b99728fa5ee22afa42b11 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 16 Dec 2021 14:34:26 -0500 Subject: Add a test for 0x6dd This tests the fix in the previous commit. --- tests/fonts/README | 2 + tests/fonts/amiri-06dd.ttf | Bin 0 -> 1872 bytes tests/layouts/arabic-format.layout | 89 +++++++++++++++++++++++++++++++++++++ tests/meson.build | 1 + 4 files changed, 92 insertions(+) create mode 100644 tests/fonts/amiri-06dd.ttf create mode 100644 tests/layouts/arabic-format.layout diff --git a/tests/fonts/README b/tests/fonts/README index fb33f8f2..9cc88ca7 100644 --- a/tests/fonts/README +++ b/tests/fonts/README @@ -3,5 +3,7 @@ test-layout tests. Cantarell-VF.otf: Cantarell DejaVSans.ttf: DejaVu Sans +DejaVSansMono.ttf: DejaVu Sans Mono emoji-subset.ttf: subset of Noto Color Emoji droid-sans-subset.ttf: subset of Droid Sans Japanese +amiri-06dd.ttf: subset of Amiri containing U+06dd diff --git a/tests/fonts/amiri-06dd.ttf b/tests/fonts/amiri-06dd.ttf new file mode 100644 index 00000000..e60637d1 Binary files /dev/null and b/tests/fonts/amiri-06dd.ttf differ diff --git a/tests/layouts/arabic-format.layout b/tests/layouts/arabic-format.layout new file mode 100644 index 00000000..630a0f03 --- /dev/null +++ b/tests/layouts/arabic-format.layout @@ -0,0 +1,89 @@ +{ + "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 + ] + }, + "comment" : "Test that font fallback works\nfor visible format characters\nin the Arabic block.", + "text" : "۝", + "font" : "Sans 32", + "output" : { + "is-wrapped" : false, + "is-ellipsized" : false, + "unknown-glyphs" : 0, + "width" : 56320, + "height" : 56320, + "log-attrs" : [ + { + "char-break" : true, + "cursor-position" : true, + "sentence-boundary" : true, + "backspace-deletes-character" : 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" : 2, + "paragraph-start" : true, + "direction" : "ltr", + "runs" : [ + { + "offset" : 0, + "length" : 2, + "text" : "۝", + "bidi-level" : 2, + "gravity" : "south", + "language" : "en-us", + "script" : "common", + "font" : { + "description" : "Amiri 32", + "checksum" : "d5e6374130d6df09e66f80f0bbcb7262112584ebadb861f0a412a21cc742a5dd", + "matrix" : [ + 1, + -0, + -0, + 1, + 0, + 0 + ] + }, + "flags" : 0, + "y-offset" : 0, + "start-x-offset" : 0, + "end-x-offset" : 0, + "glyphs" : [ + { + "glyph" : 1, + "width" : 56320, + "is-cluster-start" : true, + "log-cluster" : 0 + } + ] + } + ] + } + ] + } +} diff --git a/tests/meson.build b/tests/meson.build index 54592668..79510fb6 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -121,6 +121,7 @@ installed_test_layouts_data = [ 'layouts/valid-22.layout', 'layouts/tab-crash.layout', 'layouts/tab-assert.layout', + 'layouts/arabic-format.layout', ] test_markups_data = [ -- cgit v1.2.1