diff --git a/CHANGES.md b/CHANGES.md index a04a4187c..d84fb4708 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -60,6 +60,7 @@ - Fix copied & pasted layer is not visible [Taiga #4283](https://tree.taiga.io/project/penpot/issue/4283) - Fix notification to newsletter is shown in all cases [Taiga #4367](https://tree.taiga.io/project/penpot/issue/4367) - Fix comments section is not scrolling by mouse wheel [Taiga #4305](https://tree.taiga.io/project/penpot/issue/4305) +- Fix justify alignes text left [Taiga #4322](https://tree.taiga.io/project/penpot/issue/4322) ## 1.15.4-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 3440a1104..f4b27f0b1 100644 --- a/frontend/src/app/main/ui/shapes/text/svg_text.cljs +++ b/frontend/src/app/main/ui/shapes/text/svg_text.cljs @@ -94,6 +94,8 @@ props (-> #js {:key (dm/str "text-" (:id shape) "-" index) :x (if rtl? (+ (:x data) (:width data)) (:x data)) :y (- (:y data) (:height data)) + :textLength (:width data) + :lengthAdjust "spacingAndGlyphs" :transform (position-data-transform shape data) :alignmentBaseline alignment-bl :dominantBaseline dominant-bl @@ -104,8 +106,7 @@ :textDecoration (:text-decoration data) :letterSpacing (:letter-spacing data) :fontStyle (:font-style data) - :direction (:direction data) - :whiteSpace "pre"} + :direction (:direction data)} (obj/set! "fill" (str "url(#fill-" index "-" render-id ")")))}) shape (assoc shape :fills (:fills data))] diff --git a/frontend/src/debug.cljs b/frontend/src/debug.cljs index fd693882c..99c415f33 100644 --- a/frontend/src/debug.cljs +++ b/frontend/src/debug.cljs @@ -74,7 +74,7 @@ #{:app.main.data.workspace.notifications/handle-pointer-update :app.main.data.workspace.selection/change-hover-state}) -(defonce ^:dynamic *debug* (atom #{#_:events})) +(defonce ^:dynamic *debug* (atom #{#_:events #_:text-outline})) (defn debug-all! [] (reset! *debug* debug-options)) (defn debug-none! [] (reset! *debug* #{}))