@spense-as/fonts
TypeScript icon, indicating that this package has built-in type declarations

2.2.1 • Public • Published

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

  1. Create a new component for the font in this repo. See how others have implemented it.
  2. Add the component to index.ts
  3. Add the new font to the list below in readme.md
  4. Publish the package. This can be done by conventional commits. (ie: fix|feat: [your text] in your commit)
  5. Bump the import in your project to the latest version. (Run npm install @spense-as/fonts in your project)
  6. Add your font-files to the public/fonts-folder in spense web
  7. 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

Readme

Keywords

none

Package Sidebar

Install

npm i @spense-as/fonts

Weekly Downloads

8

Version

2.2.1

License

MIT

Unpacked Size

60.5 MB

Total Files

2525

Last publish

Collaborators

  • slem
  • mhauken