mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🐛 Fix downloading wrong font variant
This commit is contained in:
@@ -66,9 +66,10 @@
|
|||||||
:custom
|
:custom
|
||||||
(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)
|
(let [variant-id (or (:font-variant-id font) (dm/str (:font-style font) "-" (:font-weight font)))]
|
||||||
(or (nil? (:font-variant-id font))
|
(and (= (:font-id font) font-uuid)
|
||||||
(= (:font-variant-id font) font-variant-id))))
|
(or (nil? font-variant-id)
|
||||||
|
(= variant-id 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))))
|
||||||
|
|||||||
Reference in New Issue
Block a user