From 625537a6dfc1990deeeaf85b4a6725763c680702 Mon Sep 17 00:00:00 2001 From: Obeida Shamoun <2135622+oshmoun@users.noreply.github.com> Date: Sat, 29 Jul 2023 13:26:09 +0200 Subject: [PATCH] add tests for svg textLength and lengthAdjust --- tests/draw/svg/test_text.py | 69 +++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/tests/draw/svg/test_text.py b/tests/draw/svg/test_text.py index 90c20969e9..dfd0439005 100644 --- a/tests/draw/svg/test_text.py +++ b/tests/draw/svg/test_text.py @@ -301,3 +301,72 @@ def test_text_rotate(assert_pixels): rotate="180" letter-spacing="2">abc ''') + +@assert_no_logs +def test_text_text_length(assert_pixels): + assert_pixels(''' + __RRRRRR____________ + __RRRRRR____________ + __BB__BB__BB________ + __BB__BB__BB________ + ''', ''' + + + + abc + + abc + + ''') + + +@assert_no_logs +def test_text_length_adjust_glyphs_only(assert_pixels): + assert_pixels(''' + __RRRRRR____________ + __RRRRRR____________ + __BBBBBBBBBBBB______ + __BBBBBBBBBBBB______ + ''', ''' + + + + abc + + abc + + ''') + + +@assert_no_logs +def test_text_length_adjust_spacing_and_glyphs(assert_pixels): + assert_pixels(''' + __RR_RR_RR__________ + __RR_RR_RR__________ + __BBBB__BBBB__BBBB__ + __BBBB__BBBB__BBBB__ + ''', ''' + + + abc + + abc + + + ''') \ No newline at end of file