0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-10 17:18:21 -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 ### :arrow_up: Deps updates
### :heart: Community contributions by (Thank you!) ### :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 ## 1.13.2-beta
### :bug: Bugs fixed ### :bug: Bugs fixed

View file

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