From ec515c4dbc79d81cfefcb38d27656a2aa3a15947 Mon Sep 17 00:00:00 2001 From: Foster Hangdaan Date: Mon, 27 Nov 2023 17:43:21 -0500 Subject: [PATCH] Change fonts - Mona Sans for paragraphs and default text. - Hubot Sans for headings and titles. - Monaspace for code and other monospace text. Removed CascadiaCode and Ubuntu fonts. --- _includes/styles/base.scss | 1 + _includes/styles/fonts.scss | 34 +++++++++++++++++---------------- _includes/styles/variables.scss | 5 +++-- about.md | 2 +- 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/_includes/styles/base.scss b/_includes/styles/base.scss index 14bcaf1..ec36c27 100644 --- a/_includes/styles/base.scss +++ b/_includes/styles/base.scss @@ -28,6 +28,7 @@ main { } h1, h2, h3, h4, h5, h6 { + font-family: var(--font--sans-serif-alt); color: var(--color-headings); font-weight: bold; margin-top: 1.5rem; diff --git a/_includes/styles/fonts.scss b/_includes/styles/fonts.scss index 1217623..bf81b75 100644 --- a/_includes/styles/fonts.scss +++ b/_includes/styles/fonts.scss @@ -1,24 +1,26 @@ @font-face { - font-family: "Ubuntu"; - font-weight: normal; - src: url("https://static.fosterhangdaan.com/fonts/ubuntu/latest/Ubuntu-Regular.ttf") format("truetype"); + font-family: 'Mona Sans'; + src: + url('https://static.fosterhangdaan.com/fonts/mona-sans/latest/Mona-Sans.woff2') format('woff2 supports variations'), + url('https://static.fosterhangdaan.com/fonts/mona-sans/latest/Mona-Sans.woff2') format('woff2-variations'); + font-weight: 200 900; + font-stretch: 75% 125%; } @font-face { - font-family: "Ubuntu"; - font-style: italic; - font-weight: normal; - src: url("https://static.fosterhangdaan.com/fonts/ubuntu/latest/Ubuntu-RegularItalic.ttf") format("truetype"); + font-family: 'Hubot Sans'; + src: + url('https://static.fosterhangdaan.com/fonts/hubot-sans/latest/Hubot-Sans.woff2') format('woff2 supports variations'), + url('https://static.fosterhangdaan.com/fonts/hubot-sans/latest/Hubot-Sans.woff2') format('woff2-variations'); + font-weight: 200 900; + font-stretch: 75% 125%; } @font-face { - font-family: "Ubuntu"; - font-weight: bold; - src: url("https://static.fosterhangdaan.com/fonts/ubuntu/latest/Ubuntu-Bold.ttf") format("truetype"); -} - -@font-face { - font-family: "CascadiaCode"; - font-weight: normal; - src: url("https://static.fosterhangdaan.com/fonts/cascadia-code/latest/CascadiaMono-Regular.woff2") format("woff2"); + font-family: 'Monaspace Neon'; + src: + url('https://static.fosterhangdaan.com/fonts/monaspace/latest/MonaspaceNeon.woff2') format('woff2 supports variations'), + url('https://static.fosterhangdaan.com/fonts/monaspace/latest/MonaspaceNeon.woff2') format('woff2-variations'); + font-weight: 200 800; + font-stretch: 100% 125%; } diff --git a/_includes/styles/variables.scss b/_includes/styles/variables.scss index 09938d6..fbf9782 100644 --- a/_includes/styles/variables.scss +++ b/_includes/styles/variables.scss @@ -25,6 +25,7 @@ :root { --page--max-width: 48rem; /* Fonts */ - --font--sans-serif: Ubuntu, Inter, -apple-system, BlinkMacSystemFont, sans-serif; - --font--mono: CascadiaCode, monospace; + --font--sans-serif: "Mona Sans", Inter, -apple-system, BlinkMacSystemFont, sans-serif; + --font--sans-serif-alt: "Hubot Sans", Inter, -apple-system, BlinkMacSystemFont, sans-serif; + --font--mono: "Monaspace Neon", monospace; } diff --git a/about.md b/about.md index 9e116de..ece0ba0 100644 --- a/about.md +++ b/about.md @@ -11,4 +11,4 @@ ## Credits - The icons are from [Tabler Icons](https://tabler-icons.io/) and [Simple Icons](https://simpleicons.org/). - The colour palette of both the light theme and the dark theme is from [Tokyo Night](https://github.com/enkia/tokyo-night-vscode-theme). -- The sans-serif font is [Ubuntu](https://design.ubuntu.com/font). The monospace font is [Cascadia Code](https://github.com/microsoft/cascadia-code). +- The sans-serif fonts are [Mono Sans and Hubot Sans](https://github.com/mona-sans). The monospace font is [Monaspace](https://monaspace.githubnext.com).