From 490d295f3a42afa580ac0afd660a0c0449ace357 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Thu, 20 Oct 2022 06:49:02 +0200 Subject: [PATCH] :bug: Fix auto-width for texts can make text appear stretched --- CHANGES.md | 1 + frontend/src/app/main/ui/shapes/text/svg_text.cljs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index bb0ad1e42..a498157c7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,7 @@ - Fix firefox changing layer color type is not applied [Taiga #4292](https://tree.taiga.io/project/penpot/issue/4292) - Fix justify alignes text left [Taiga #4322](https://tree.taiga.io/project/penpot/issue/4322) - Fix text out of borders with "auto width" and center align [Taiga #4308](https://tree.taiga.io/project/penpot/issue/4308) +- Fix auto-width for texts can make text appear stretched [Github #2482](https://github.com/penpot/penpot/issues/2482) ## 1.16.0-beta diff --git a/frontend/src/app/main/ui/shapes/text/svg_text.cljs b/frontend/src/app/main/ui/shapes/text/svg_text.cljs index f4b27f0b1..81a64374a 100644 --- a/frontend/src/app/main/ui/shapes/text/svg_text.cljs +++ b/frontend/src/app/main/ui/shapes/text/svg_text.cljs @@ -106,7 +106,8 @@ :textDecoration (:text-decoration data) :letterSpacing (:letter-spacing data) :fontStyle (:font-style data) - :direction (:direction data)} + :direction (:direction data) + :whiteSpace "pre"} (obj/set! "fill" (str "url(#fill-" index "-" render-id ")")))}) shape (assoc shape :fills (:fills data))]