Skip to content

self host inter font (regular and bold) on a server #497

Answered by rsms
orenmizr asked this question in Q&A
Discussion options

You must be logged in to vote
  1. no dart-sass, just regular node-sass, so no "use" usage

From https://rsms.me/inter/#usage:

<!-- HTML in your document's head -->
<link rel="preconnect" href="https://rsms.me/">
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
/* CSS */
:root { font-family: 'Inter', sans-serif; }
@supports (font-variation-settings: normal) {
  :root { font-family: 'Inter var', sans-serif; }
}

(of course replace rsms.me... with whatever host and location you serve the font files from)

  1. i want the font to be as performant as possible (smallest size)

Variable fonts are the smallest; Inter.var.woff2, which you get automatically if you use the above HTML & CSS. This is only true if you use …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@orenmizr
Comment options

@rsms
Comment options

rsms Sep 30, 2022
Maintainer

Answer selected by orenmizr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants