🐛 Remove unused local fonts

This commit is contained in:
Andrés Moya 2021-02-24 15:16:16 +01:00 committed by Andrey Antukh
parent 62784d0708
commit 85781c5b7f
4 changed files with 19 additions and 34 deletions

View file

@ -41,36 +41,6 @@
{:id "bold" :name "bold" :weight "bold" :style "normal"}
{:id "bolditalic" :name "bold (italic)" :weight "bold" :style "italic"}
{:id "black" :name "black" :weight "900" :style "normal"}
{:id "blackitalic" :name "black (italic)" :weight "900" :style "italic"}]}
{:id "roboto"
:family "roboto"
:name "Roboto"
:variants [{:id "100" :name "100" :weight "100" :style "normal"}
{:id "100italic" :name "100 (italic)" :weight "100" :style "italic"}
{:id "200" :name "200" :weight "200" :style "normal"}
{:id "200italic" :name "200 (italic)" :weight "200" :style "italic"}
{:id "regular" :name "regular" :weight "400" :style "normal"}
{:id "italic" :name "italic" :weight "400" :style "italic"}
{:id "500" :name "500" :weight "500" :style "normal"}
{:id "500italic" :name "500 (italic)" :weight "500" :style "italic"}
{:id "bold" :name "bold" :weight "bold" :style "normal"}
{:id "bolditalic" :name "bold (italic)" :weight "bold" :style "italic"}
{:id "black" :name "black" :weight "900" :style "normal"}
{:id "blackitalic" :name "black (italic)" :weight "900" :style "italic"}]}
{:id "robotocondensed"
:family "robotocondensed"
:name "Roboto Condensed"
:variants [{:id "100" :name "100" :weight "100" :style "normal"}
{:id "100italic" :name "100 (italic)" :weight "100" :style "italic"}
{:id "200" :name "200" :weight "200" :style "normal"}
{:id "200italic" :name "200 (italic)" :weight "200" :style "italic"}
{:id "regular" :name "regular" :weight "400" :style "normal"}
{:id "italic" :name "italic" :weight "400" :style "italic"}
{:id "500" :name "500" :weight "500" :style "normal"}
{:id "500italic" :name "500 (italic)" :weight "500" :style "italic"}
{:id "bold" :name "bold" :weight "bold" :style "normal"}
{:id "bolditalic" :name "bold (italic)" :weight "bold" :style "italic"}
{:id "black" :name "black" :weight "900" :style "normal"}
{:id "blackitalic" :name "black (italic)" :weight "900" :style "italic"}]}])
(defonce fontsdb (l/atom {}))

View file

@ -32,14 +32,14 @@
(mf/defc font-select-optgroups
{::mf/wrap [mf/memo]}
[]
[{:keys [locale] :as props}]
[:*
[:optgroup {:label "Local"}
[:optgroup {:label (t locale "workspace.options.text-options.preset")}
(for [font fonts/local-fonts]
[:option {:value (:id font)
:key (:id font)}
(:name font)])]
[:optgroup {:label "Google"}
[:optgroup {:label (t locale "workspace.options.text-options.google")}
(for [font (fonts/resolve-fonts :google)]
[:option {:value (:id font)
:key (:id font)}
@ -97,7 +97,7 @@
:on-change on-font-family-change}
(when (= font-id :multiple)
[:option {:value ""} (t locale "settings.multiple")])
[:& font-select-optgroups]]]
[:& font-select-optgroups {:locale locale}]]]
[:div.row-flex
(let [size-options [8 9 10 11 12 14 18 24 36 48 72]