mirror of
https://github.com/penpot/penpot.git
synced 2025-03-11 23:31:21 -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]
|
||||
(cond
|
||||
(= "regular" variant)
|
||||
{:name "regular" :weight "400" :style "normal"}
|
||||
{:id "regular" :name "regular" :weight "400" :style "normal"}
|
||||
|
||||
(= "italic" variant)
|
||||
{:name "italic" :weight "400" :style "italic"}
|
||||
{:id "italic" :name "italic" :weight "400" :style "italic"}
|
||||
|
||||
:else
|
||||
(when-let [[a b c] (re-find #"^(\d+)(.*)$" variant)]
|
||||
|
|
|
@ -103,6 +103,7 @@
|
|||
|
||||
(when (and (string? font-id)
|
||||
(pos? (alength font-id)))
|
||||
(fonts/ensure-loaded! font-id)
|
||||
(let [font (get fontsdb font-id)]
|
||||
(let [font-family (or (:family font)
|
||||
(obj/get data "fontFamily"))
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
[app.util.object :as obj]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.store :as st]
|
||||
[app.main.fonts :as fonts]
|
||||
[app.main.data.workspace :as dw]
|
||||
[app.main.data.workspace.common :as dwc]
|
||||
[app.main.data.workspace.texts :as dwt]
|
||||
|
@ -143,7 +142,7 @@
|
|||
[props ref]
|
||||
(let [shape (unchecked-get props "shape")
|
||||
node-ref (unchecked-get props "node-ref")
|
||||
|
||||
|
||||
{:keys [id x y width height content grow-type]} shape
|
||||
zoom (mf/deref refs/selected-zoom)
|
||||
state (mf/use-state #(parse-content content))
|
||||
|
|
Loading…
Add table
Reference in a new issue