diff --git a/CHANGES.md b/CHANGES.md index 072d37e4a..9232b12a4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -35,6 +35,7 @@ - Fix errors on onboarding file [Taiga #1287](https://tree.taiga.io/project/penpot/issue/1287) - Fix infinite recursion on logout. - Fix issues with frame selection [Taiga #1300](https://tree.taiga.io/project/penpot/issue/1300), [Taiga #1255](https://tree.taiga.io/project/penpot/issue/1255) +- Fix local fonts error [#691](https://github.com/penpot/penpot/issues/691) - Fix problem width handoff code generation [Taiga #1204](https://tree.taiga.io/project/penpot/issue/1204) - Fix problem with indices refreshing on page changes [#646](https://github.com/penpot/penpot/issues/646) - Have language change notification written in the new language [Taiga #1205](https://tree.taiga.io/project/penpot/issue/1205) diff --git a/frontend/resources/locales.json b/frontend/resources/locales.json index f9a951ae8..c73c7388b 100644 --- a/frontend/resources/locales.json +++ b/frontend/resources/locales.json @@ -4244,6 +4244,13 @@ }, "unused" : true }, + "workspace.options.text-options.google" : { + "translations" : { + "en" : "Google", + "es" : "Google" + }, + "used-in" : [ "src/app/main/ui/workspace/sidebar/options/typography.cljs" ] + }, "workspace.options.text-options.grow-auto-height" : { "translations" : { "en" : "Auto height", @@ -4304,6 +4311,13 @@ }, "used-in" : [ "src/app/main/ui/workspace/sidebar/options/text.cljs", "src/app/main/ui/workspace/sidebar/options/typography.cljs" ] }, + "workspace.options.text-options.preset" : { + "translations" : { + "en" : "Preset", + "es" : "Predefinidos" + }, + "used-in" : [ "src/app/main/ui/workspace/sidebar/options/typography.cljs" ] + }, "workspace.options.text-options.strikethrough" : { "translations" : { "en" : "Strikethrough", diff --git a/frontend/src/app/main/fonts.cljs b/frontend/src/app/main/fonts.cljs index 61e704537..209350233 100644 --- a/frontend/src/app/main/fonts.cljs +++ b/frontend/src/app/main/fonts.cljs @@ -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 {})) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/typography.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/typography.cljs index a9ec6087f..6f4632aac 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/typography.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/typography.cljs @@ -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]