mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 07:41:43 -05:00
🐛 Fix typografy preloading.
This commit is contained in:
parent
e73a8a2f7e
commit
39fb611160
3 changed files with 4 additions and 4 deletions
|
@ -18,10 +18,10 @@
|
||||||
[variant]
|
[variant]
|
||||||
(cond
|
(cond
|
||||||
(= "regular" variant)
|
(= "regular" variant)
|
||||||
{:name "regular" :weight "400" :style "normal"}
|
{:id "regular" :name "regular" :weight "400" :style "normal"}
|
||||||
|
|
||||||
(= "italic" variant)
|
(= "italic" variant)
|
||||||
{:name "italic" :weight "400" :style "italic"}
|
{:id "italic" :name "italic" :weight "400" :style "italic"}
|
||||||
|
|
||||||
:else
|
:else
|
||||||
(when-let [[a b c] (re-find #"^(\d+)(.*)$" variant)]
|
(when-let [[a b c] (re-find #"^(\d+)(.*)$" variant)]
|
||||||
|
|
|
@ -103,6 +103,7 @@
|
||||||
|
|
||||||
(when (and (string? font-id)
|
(when (and (string? font-id)
|
||||||
(pos? (alength font-id)))
|
(pos? (alength font-id)))
|
||||||
|
(fonts/ensure-loaded! font-id)
|
||||||
(let [font (get fontsdb font-id)]
|
(let [font (get fontsdb font-id)]
|
||||||
(let [font-family (or (:family font)
|
(let [font-family (or (:family font)
|
||||||
(obj/get data "fontFamily"))
|
(obj/get data "fontFamily"))
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
[app.util.object :as obj]
|
[app.util.object :as obj]
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
[app.main.fonts :as fonts]
|
|
||||||
[app.main.data.workspace :as dw]
|
[app.main.data.workspace :as dw]
|
||||||
[app.main.data.workspace.common :as dwc]
|
[app.main.data.workspace.common :as dwc]
|
||||||
[app.main.data.workspace.texts :as dwt]
|
[app.main.data.workspace.texts :as dwt]
|
||||||
|
@ -143,7 +142,7 @@
|
||||||
[props ref]
|
[props ref]
|
||||||
(let [shape (unchecked-get props "shape")
|
(let [shape (unchecked-get props "shape")
|
||||||
node-ref (unchecked-get props "node-ref")
|
node-ref (unchecked-get props "node-ref")
|
||||||
|
|
||||||
{:keys [id x y width height content grow-type]} shape
|
{:keys [id x y width height content grow-type]} shape
|
||||||
zoom (mf/deref refs/selected-zoom)
|
zoom (mf/deref refs/selected-zoom)
|
||||||
state (mf/use-state #(parse-content content))
|
state (mf/use-state #(parse-content content))
|
||||||
|
|
Loading…
Add table
Reference in a new issue