From b870db9f6e30d901d3aee75ad06f63c30ff79d45 Mon Sep 17 00:00:00 2001 From: Florian Kissling <21834+fk@users.noreply.github.com> Date: Thu, 20 Feb 2020 15:06:44 +0100 Subject: [PATCH] feat(gatsby-design-tokens): Add "Inter" font stack (#21598) Available via `fonts.sans` and `fonts.inter`. BREAKING CHANGE: `fonts.sans` now delivers the "Inter" font stack, not the `system` font stack anymore fix: `fonts.sans` and `.brand` aliases --- packages/gatsby-design-tokens/src/fonts.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/gatsby-design-tokens/src/fonts.js b/packages/gatsby-design-tokens/src/fonts.js index 57976c63cf8a7..d8ff62f5cc793 100644 --- a/packages/gatsby-design-tokens/src/fonts.js +++ b/packages/gatsby-design-tokens/src/fonts.js @@ -2,7 +2,7 @@ import preval from "preval.macro" // TODO re:system-ui, keep an eye on https://github.com/primer/css/issues/838 const f = preval` - const system = sans = body = [ + const system = body = [ "-apple-system", "BlinkMacSystemFont", "Segoe UI", @@ -17,6 +17,8 @@ const f = preval` "Noto Color Emoji", ] + const sans = inter = ["Inter", ...system] + const heading = brand = ["Futura PT", ...system] const monospace = [ @@ -31,7 +33,7 @@ const f = preval` const serif = ["Georgia", "Times New Roman", "Times", "serif"] - const fonts = { body, system, heading, monospace, serif } + const fonts = { body, system, sans, heading, brand, monospace, serif } let fontsStrings = {} for (const fontFamily in fonts) {