mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
Merge pull request #6701 from penpot/elenatorro-fix-custom-font-load
Some checks are pending
Commit Message Check / Check Commit Message (push) Waiting to run
Some checks are pending
Commit Message Check / Check Commit Message (push) Waiting to run
🐛 Fix storing custom fonts
This commit is contained in:
@@ -66,7 +66,8 @@
|
|||||||
(let [font-uuid (custom-font-id->uuid font-id)
|
(let [font-uuid (custom-font-id->uuid font-id)
|
||||||
matching-font (d/seek (fn [[_ font]]
|
matching-font (d/seek (fn [[_ font]]
|
||||||
(and (= (:font-id font) font-uuid)
|
(and (= (:font-id font) font-uuid)
|
||||||
(= (:font-variant-id font) font-variant-id)))
|
(or (nil? (:font-variant-id font))
|
||||||
|
(= (:font-variant-id font) font-variant-id))))
|
||||||
(seq @fonts))]
|
(seq @fonts))]
|
||||||
(when matching-font
|
(when matching-font
|
||||||
(:ttf-file-id (second matching-font))))
|
(:ttf-file-id (second matching-font))))
|
||||||
@@ -116,7 +117,7 @@
|
|||||||
:google
|
:google
|
||||||
(google-font-ttf-url font-id font-variant-id)
|
(google-font-ttf-url font-id font-variant-id)
|
||||||
:custom
|
:custom
|
||||||
(dm/str (u/join cf/public-uri "assets/by-id/" font-id))
|
(dm/str (u/join cf/public-uri "assets/by-id/" asset-id))
|
||||||
:builtin
|
:builtin
|
||||||
(dm/str (u/join cf/public-uri "fonts/" asset-id))))
|
(dm/str (u/join cf/public-uri "fonts/" asset-id))))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user