mirror of
https://github.com/penpot/penpot.git
synced 2026-08-01 19:06:18 +00:00
✨ Normalize font variant naming for google fonts (#7083)
This commit is contained in:
parent
9562d2f1f0
commit
8f5f88743b
@ -22,6 +22,7 @@
|
|||||||
- Fix issue where multiple dropdown menus could be opened simultaneously on the dashboard page [Taiga #11500](https://tree.taiga.io/project/penpot/issue/11500)
|
- Fix issue where multiple dropdown menus could be opened simultaneously on the dashboard page [Taiga #11500](https://tree.taiga.io/project/penpot/issue/11500)
|
||||||
- Fix font size/variant not updated when editing a text [Taiga #11552](https://tree.taiga.io/project/penpot/issue/11552)
|
- Fix font size/variant not updated when editing a text [Taiga #11552](https://tree.taiga.io/project/penpot/issue/11552)
|
||||||
- Fix issue where Alt + arrow keys shortcut interferes with letter-spacing when moving text layers [Taiga #11552](https://tree.taiga.io/project/penpot/issue/11771)
|
- Fix issue where Alt + arrow keys shortcut interferes with letter-spacing when moving text layers [Taiga #11552](https://tree.taiga.io/project/penpot/issue/11771)
|
||||||
|
- Fix consistency issues on how font variants are visualized [Taiga #11499](https://tree.taiga.io/project/penpot/us/11499)
|
||||||
|
|
||||||
## 2.9.0 (Unreleased)
|
## 2.9.0 (Unreleased)
|
||||||
|
|
||||||
|
|||||||
@ -16,15 +16,15 @@
|
|||||||
[variant files]
|
[variant files]
|
||||||
(cond
|
(cond
|
||||||
(= "regular" variant)
|
(= "regular" variant)
|
||||||
{:id "regular" :name "regular" :weight "400" :style "normal" :ttf-url (get files "regular")}
|
{:id "regular" :name "400" :weight "400" :style "normal" :ttf-url (get files "regular")}
|
||||||
|
|
||||||
(= "italic" variant)
|
(= "italic" variant)
|
||||||
{:id "italic" :name "italic" :weight "400" :style "italic" :ttf-url (get files "italic")}
|
{:id "italic" :name "400 Italic" :weight "400" :style "italic" :ttf-url (get files "italic")}
|
||||||
|
|
||||||
:else
|
:else
|
||||||
(when-let [[id weight style] (re-find #"^(\d+)(.*)$" variant)]
|
(when-let [[id weight style] (re-find #"^(\d+)(.*)$" variant)]
|
||||||
{:id id
|
{:id id
|
||||||
:name variant
|
:name (str/trim (str weight " " (str/capital style)))
|
||||||
:weight weight
|
:weight weight
|
||||||
:style (if (str/empty? style) "normal" style)
|
:style (if (str/empty? style) "normal" style)
|
||||||
:ttf-url (get files id)})))
|
:ttf-url (get files id)})))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user