Skip to content

Commit e8029e9

Browse files
committed
Use new code font generally to fix Android monospace
Using a specific font, and hosting it ourselves, allows us to ensure consistent behavior and a code font that covers the Nushell table border drawings characters. Adds FiraCode font, which is under OFL (SIL Open Font license). https://github.com/tonsky/FiraCode Introduces a 100 kb font file download, which should happen only once through adequate cashing.
1 parent 973f881 commit e8029e9

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

.vuepress/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export default defineUserConfig({
9090
},
9191
},
9292
head: [
93+
["link", { rel: "preload", href: "/fonts/FiraCode-Regular.woff2", as: "font", type: "font/woff2", crossorigin: "anonymous" }]
9394
['meta', { name: 'theme-color', content: '#3eaf7c' }],
9495
['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }],
9596
[
128 KB
Binary file not shown.
101 KB
Binary file not shown.

.vuepress/styles/index.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
@font-face {
2+
font-family: 'Fira Code';
3+
src: url('/fonts/FiraCode-Regular.woff2') format('woff2'), url("woff/FiraCode-Regular.woff") format("woff");
4+
font-weight: 400;
5+
font-style: normal;
6+
}
7+
18
.navbar .navbar-items-wrapper {
29
flex-direction: row-reverse;
310
}
@@ -29,7 +36,7 @@ div[class*='language-'].line-numbers-mode .line-numbers {
2936
*/
3037
:root {
3138
--code-line-height: 1.1;
32-
--font-family-code: Consolas, Monaco, 'Andale Mono', 'DejaVu Sans Mono',
39+
--font-family-code: 'Fira Code', Consolas, Monaco, 'Andale Mono', 'DejaVu Sans Mono',
3340
'Ubuntu Mono', monospace;
3441
}
3542

0 commit comments

Comments
 (0)