0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-10 09:08:31 -05:00

Merge remote-tracking branch 'origin/main' into develop

This commit is contained in:
alonso.torres 2022-06-01 10:42:59 +02:00
commit 5d20815776
2 changed files with 27 additions and 7 deletions

View file

@ -18,6 +18,18 @@
### :arrow_up: Deps updates
### :heart: Community contributions by (Thank you!)
## 1.13.3-beta
### :bug: Bugs fixed
- Fix docker dependencies
- Sets invitations expirations to 7 days
- Add safety measure for text positions
- Fix old texts with opacity and no fill
- Remove default font on team change
- Fix github auth without name
- Fix problems with font loading in Firefox 95
## 1.13.2-beta
### :bug: Bugs fixed

View file

@ -7,6 +7,7 @@
(ns app.util.text-svg-position
(:require
[app.common.data :as d]
[app.common.data.macros :as dm]
[app.common.geom.point :as gpt]
[app.common.transit :as transit]
[app.main.fonts :as fonts]
@ -43,13 +44,20 @@
[^js node]
(let [styles (js/getComputedStyle node)
font (.getPropertyValue styles "font")]
(if (dom/check-font? font)
(p/resolved font)
(let [font-id (.getPropertyValue styles "--font-id")]
(-> (fonts/ensure-loaded! font-id)
(p/then #(when (not (dom/check-font? font))
(load-font font))))))))
font (.getPropertyValue styles "font")
font (if (or (not font) (empty? font))
;; Firefox 95 won't return the font correctly.
;; We can get the font shorthand with the font-size + font-family
(dm/str (.getPropertyValue styles "font-size")
" "
(.getPropertyValue styles "font-family"))
font)
font-id (.getPropertyValue styles "--font-id")]
(-> (fonts/ensure-loaded! font-id)
(p/then #(when (not (dom/check-font? font))
(load-font font))))))
(defn calc-text-node-positions
[base-node viewport zoom]