-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch from Aktiv Grotesk to Inter #2654
Conversation
🦋 Changeset detectedLatest commit: 94c2b6b The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #2654 +/- ##
==========================================
+ Coverage 86.60% 86.78% +0.18%
==========================================
Files 208 208
Lines 11882 12003 +121
Branches 1498 1495 -3
==========================================
+ Hits 10290 10417 +127
+ Misses 1540 1535 -5
+ Partials 52 51 -1
|
Size Change: -242 B (-0.04%) Total Size: 631 kB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job decoupling the font declarations from the theme, that gives plenty of flexibility.
'line-gap-override': '0%', | ||
'size-adjust': '107.06%', | ||
}, | ||
] satisfies FontFace[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typescript ✨ TIL satisfies
import { PreloadResources } from './preload-resources'; | ||
const inter = Inter({ | ||
subsets: ['latin'], | ||
// FIXME: Re-enable once https://github.com/vercel/next.js/issues/68395 has been resolved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this phrasing be for the template developer or the developer user? 🤔
Or maybe mention to the later, "You can uncomment this line it if you have Next.js > 14.x.y" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a note to myself (the template developer). The PR has already been merged; I'm just waiting for a new version to be released.
#### Next.js | ||
|
||
If you're using Next.js 13+, use the built-in [font optimization](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) feature with this recommended configuration instead: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 I like that you can leverage existing tools without restrictions
Addresses ticket DSYS-707. Relates to #2653.
Purpose
SumUp switched from Museo Sans to Aktiv Grotesk as its brand font six years ago. The recent switch to the black&white color scheme has shifted more responsibility on the typography to provide hierarchy and visual interest. However, only regular and bold font weights are loaded on the web (the mobile apps use native fonts). Loading additional font weights and font styles would significantly impact page load speeds and, in turn, conversion rates.
Variable fonts offer a modern solution by combining a continuous range of weights and other "axes" into a reasonably small file. A variable font version of Aktiv Grotesk exists; however, its commercial license is prohibitively expensive (DSYS-679).
We've identified Inter as a replacement. Inter is available as a variable font, freely usable in commercial projects and an almost perfect match to Aktiv Grotesk, especially with an adjusted negative letter spacing.
Approach and changes
fonts.css
file containing the font face declarations for Inter regular & italic. The file is exported from@sumup-oss/design-tokens
and the font files are hosted on static.sumup.comnext/font
to self-host the fontsDefinition of done