Skip to content

Commit

Permalink
theme(fix): proper font for code
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsneighbour committed Aug 13, 2024
1 parent 25a3e23 commit ca59efb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
31 changes: 13 additions & 18 deletions assets/scss/01-settings/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@
$fontdir: "/assets/webfonts";

@font-face {
font-family: "Exo Font Number 2";
src:
url("#{$fontdir}/exo/normal.woff2") format("woff2") tech("variations"),
url("#{$fontdir}/exo/normal.woff2") format("woff2-variations");
font-family: "Exo2";
src: url("#{$fontdir}/exo/normal.woff2") format("woff2") tech("variations"),
url("#{$fontdir}/exo/normal.woff2") format("woff2-variations");
font-weight: 100 900;
font-style: normal;
font-display: swap;
text-rendering: optimizelegibility;
}

@font-face {
font-family: "Exo Font Number 2";
src:
url("#{$fontdir}/exo/italic.woff2") format("woff2") tech("variations"),
url("#{$fontdir}/exo/italic.woff2") format("woff2-variations");
font-family: "Exo2";
src: url("#{$fontdir}/exo/italic.woff2") format("woff2") tech("variations"),
url("#{$fontdir}/exo/italic.woff2") format("woff2-variations");
font-weight: 100 900;
font-style: italic;
font-display: swap;
Expand All @@ -26,9 +24,8 @@ $fontdir: "/assets/webfonts";

@font-face {
font-family: JetBrainsMono;
src:
url("#{$fontdir}/jetbrainsmono/jetbrainsmonoi.woff2") format("woff2") tech("variations"),
url("#{$fontdir}/jetbrainsmono/jetbrainsmonoi.woff2") format("woff2-variations");
src: url("#{$fontdir}/jetbrainsmono/jetbrainsmonoi.woff2") format("woff2") tech("variations"),
url("#{$fontdir}/jetbrainsmono/jetbrainsmonoi.woff2") format("woff2-variations");
font-weight: 100 800;
font-style: italic;
font-display: swap;
Expand All @@ -37,9 +34,8 @@ $fontdir: "/assets/webfonts";

@font-face {
font-family: JetBrainsMono;
src:
url("#{$fontdir}/jetbrainsmono/jetbrainsmono.woff2") format("woff2") tech("variations"),
url("#{$fontdir}/jetbrainsmono/jetbrainsmono.woff2") format("woff2-variations");
src: url("#{$fontdir}/jetbrainsmono/jetbrainsmono.woff2") format("woff2") tech("variations"),
url("#{$fontdir}/jetbrainsmono/jetbrainsmono.woff2") format("woff2-variations");
font-weight: 100 800;
font-style: normal;
font-display: swap;
Expand All @@ -48,10 +44,9 @@ $fontdir: "/assets/webfonts";

@font-face {
font-family: BahnPro;
src:
url("#{$fontdir}/bahn/bahnpro_regular-webfont.woff2") format("woff2"),
url("#{$fontdir}/bahnpro_regular-webfont.woff") format("woff"),
url("#{$fontdir}/bahnpro_regular-webfont.ttf") format("truetype");
src: url("#{$fontdir}/bahn/bahnpro_regular-webfont.woff2") format("woff2"),
url("#{$fontdir}/bahnpro_regular-webfont.woff") format("woff"),
url("#{$fontdir}/bahnpro_regular-webfont.ttf") format("truetype");
font-weight: 700;
font-style: normal;
font-display: swap;
Expand Down
3 changes: 2 additions & 1 deletion assets/scss/01-settings/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ $body-bg: $arctic-powder;
/// typography
/// $font-size-root: 16px;
$font-size-base: 1.2rem;
$font-family-sans-serif: "Exo Font Number 2";
$font-family-sans-serif: Exo2, sans-serif;
$font-family-monospace: JetBrainsMono, monospace;

/// font sizes
$font-weight-lighter: 100;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ And so we have our `__dirname` and `__filename` back. This is particularly usefu
And isn't that what we all want?
[^1]: Those are two underscores in front of the variables `dirname` and `filename`. Sadly the style of my code-ing font on this website seems to think that a wide underscore is enough to envision that. I don't, so bear with me while I fix the font. Just know it's two underscores, as in `_ _ d i r n a m e`.
[^1]: ~~Those are two underscores in front of the variables `dirname` and `filename`. Sadly the style of my code-ing font on this website seems to think that a wide underscore is enough to envision that. I don't, so bear with me while I fix the font. Just know it's two underscores, as in `_ _ d i r n a m e`.~~

0 comments on commit ca59efb

Please sign in to comment.