@spense-as/fonts
v2.2.1
Published
Local fonts for Spense projects
Downloads
27
Readme
This is a repo for importing correct fonts locally. It requires Next.js to work.
Usage
You use it like this in your project
import { FontHandling } from "@spense-as/fonts"
<FontHandling font="Roboto" />
It then imports your specified font locally.
Adding a new font
- Create a new component for the font in this repo. See how others have implemented it.
- Add the component to index.ts
- Add the new font to the list below in readme.md
- Publish the package. This can be done by conventional commits. (ie:
fix|feat: [your text]
in your commit) - Bump the import in your project to the latest version. (Run
npm install @spense-as/fonts
in your project) - Add your font-files to the public/fonts-folder in spense web
- Get someone to release the latest version of spense web to spense.no.
Supported fonts
These fonts are supported:
- Bilia Hellix SemiBold
- Cupra
- Hellix SemiBold
- HellixRegular
- Lato
- Lora
- Merriweather
- Merriweather Sans
- Noto Sans
- Noto Serif
- Nunito
- Nunito Sans
- Open Sans
- Oswald
- Poppins
- Porsche Next TT
- PT Mono
- PT Sans
- PT Sans Narrow
- PT Serif
- Raleway
- Roboto
- Roboto Condensed
- Roboto Mono
- Rubik
- Skoda Next
- Source Code Pro
- Source Sans Pro
- Source Serif Pro
- Ubuntu
- Ubuntu Condensed