Skip to content

Instantly share code, notes, and snippets.

@mfrancois3k
Last active April 6, 2023 02:36
Show Gist options
  • Save mfrancois3k/162596616d205a82178c2acedef20350 to your computer and use it in GitHub Desktop.
Save mfrancois3k/162596616d205a82178c2acedef20350 to your computer and use it in GitHub Desktop.
Fonts setup custom #setup
got to this site to conver it to woff
https://transfonter.org/
once is converted grab all the from the zip
The modified code snippet should look like this: put the font in the public directory
example
in the css
@font-face {
font-family: 'Neue Montreal';
src: url('NeueMontreal-Light.woff2') format('woff2'),
url('NeueMontreal-Light.woff') format('woff');
font-weight: 300;
font-style: normal;
font-display: swap;
}
.your-style {
font-family: 'Neue Montreal';
font-weight: bold;
font-style: normal;
}
in html
<link rel="preload" href="NeueMontreal-Bold.woff2" as="font" type="font/woff2" crossorigin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment