Add hack font

This commit is contained in:
Tristan Daniël Maat 2022-06-21 21:57:42 +01:00
parent abe8ee631e
commit 0801e85839
Signed by: tlater
GPG key ID: 49670FD774E43268
4 changed files with 29 additions and 1 deletions

View file

@ -27,6 +27,7 @@ $weight-normal: 400;
$body-background-color: $black;
$family-sans-serif: Nunito, $family-sans-serif;
$family-monospace: Hack, $family-monospace;
$text: $grey-light;
$text-strong: $primary;

View file

@ -24,4 +24,25 @@ $weights: 300, 400, 500, 600, 700;
$display: auto,
$style: normal,
$fontDir: "~/node_modules/@fontsource/arimo/files"
)
);
// Hack *does* come with its own CSS, but it's broken and hasn't seen
// a release since https://github.com/source-foundry/Hack/issues/467
// was resolved.
$variants:
regular 400 normal,
bold 700 normal,
italic 400 italic,
bolditalic 700 italic;
@each $name, $weight, $style in $variants {
@font-face {
font-family: "Hack";
src:
url("~/node_modules/hack-font/build/web/fonts/hack-#{$name}-subset.woff2?sha=3114f1256") format("woff2"),
url("~/node_modules/hack-font/build/web/fonts/hack-#{$name}-subset.woff?sha=3114f1256") format("woff");
font-weight: $weight;
font-style: $style;
}
}