Replace Source Code Pro with Fira Mono for code snippets

The main reason to do this is to fix https://github.com/standardebooks/manual/issues/9, but the font is also about 20% smaller which is a nice benefit.

Fira Mono is also licensed under OFL so no change there. I have no stylistic preference either way, but they’re broadly similar in look. Fira Mono has no italic faces, but we have no italic display of source code so no loss there.
This commit is contained in:
Robin Whittleton 2020-07-01 23:12:15 +02:00 committed by Alex Cabal
parent fbb3ea2565
commit b1b2dc4e14
14 changed files with 5 additions and 20 deletions

View file

@ -48,33 +48,19 @@
} }
@font-face{ @font-face{
font-family: "Source Code Pro"; font-family: "Fira Mono";
src: local('Source Code Pro'), url('/fonts/source-code-pro.woff2') format('woff2'), url('/fonts/source-code-pro.woff') format('woff'); src: local('Fira Mono'), url('/fonts/firamono-regular.woff2') format('woff2'), url('/fonts/firamono-regular.woff') format('woff');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@font-face{ @font-face{
font-family: "Source Code Pro"; font-family: "Fira Mono";
src: local('Source Code Pro'), url('/fonts/source-code-pro-bold.woff2') format('woff2'), url('/fonts/source-code-pro-bold.woff') format('woff'); src: local('Fira Mono'), url('/fonts/firamono-bold.woff2') format('woff2'), url('/fonts/firamono-bold.woff') format('woff');
font-weight: bold; font-weight: bold;
font-style: normal; font-style: normal;
} }
@font-face{
font-family: "Source Code Pro";
src: local('Source Code Pro'), url('/fonts/source-code-pro-italic.woff2') format('woff2'), url('/fonts/source-code-pro-italic.woff') format('woff');
font-weight: normal;
font-style: italic;
}
@font-face{
font-family: "Source Code Pro";
src: local('Source Code Pro'), url('/fonts/source-code-pro-bold-italic.woff2') format('woff2'), url('/fonts/source-code-pro-bold-italic.woff') format('woff');
font-weight: bold;
font-style: italic;
}
:root{ :root{
--light-body-text: #222; --light-body-text: #222;
--light-highlight: #1d6878; --light-highlight: #1d6878;

View file

@ -148,14 +148,13 @@ code.css.full::before{
} }
code{ code{
font-family: 'Source Code Pro', monospace; font-family: 'Fira Mono', monospace;
font-size: .8rem; font-size: .8rem;
} }
code.terminal{ code.terminal{
color: #fff; color: #fff;
background-color: #444; background-color: #444;
font-family: 'Source Code Pro', monospace;
text-align: left; text-align: left;
padding: 1rem 1rem 1rem 3rem; padding: 1rem 1rem 1rem 3rem;
border-radius: .25rem; border-radius: .25rem;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.