From 4d9eb9b4b4cb0134583ea13815e31a758b135e4c Mon Sep 17 00:00:00 2001 From: Camelid Date: Sat, 29 Aug 2020 13:16:56 -0700 Subject: [PATCH 1/2] Prefer bundled version of Source Code Pro This prevents an issue with Firefox 80 on macOS that prevents syntax highlighting from working. --- src/theme/fonts/fonts.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/theme/fonts/fonts.css b/src/theme/fonts/fonts.css index b2b63d02..8535e403 100644 --- a/src/theme/fonts/fonts.css +++ b/src/theme/fonts/fonts.css @@ -96,6 +96,6 @@ font-family: 'Source Code Pro'; font-style: normal; font-weight: 500; - src: local('Source Code Pro Medium'), local('SourceCodePro-Medium'), - url('source-code-pro-v11-all-charsets-500.woff2') format('woff2'); + src: url('source-code-pro-v11-all-charsets-500.woff2') format('woff2'), + local('Source Code Pro Medium'), local('SourceCodePro-Medium'); } From 73cabeb90439357a18c61f3265640c74510cd896 Mon Sep 17 00:00:00 2001 From: Camelid <37223377+camelid@users.noreply.github.com> Date: Sun, 6 Sep 2020 10:34:11 -0700 Subject: [PATCH 2/2] Remove local version from `@font-face` It's unlikely that the bundled version wouldn't load, and it's especially unlikely that the page would load but the bundled version would not. Also, if it doesn't load, it should fall back to another monospace font, which is fine. --- src/theme/fonts/fonts.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/theme/fonts/fonts.css b/src/theme/fonts/fonts.css index 8535e403..858efa59 100644 --- a/src/theme/fonts/fonts.css +++ b/src/theme/fonts/fonts.css @@ -96,6 +96,5 @@ font-family: 'Source Code Pro'; font-style: normal; font-weight: 500; - src: url('source-code-pro-v11-all-charsets-500.woff2') format('woff2'), - local('Source Code Pro Medium'), local('SourceCodePro-Medium'); + src: url('source-code-pro-v11-all-charsets-500.woff2') format('woff2'); }