Commit cc95abf5 authored by David Kudera's avatar David Kudera

Load fonts lazily

parent 791da548
Pipeline #128217741 passed with stage
in 57 seconds
......@@ -1736,6 +1736,12 @@
"physical-cpu-count": "^2.0.0"
}
},
"@types/node": {
"version": "13.9.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-13.9.2.tgz",
"integrity": "sha512-bnoqK579sAYrQbp73wwglccjJ4sfRdKU7WNEZ5FW4K2U6Kc0/eZ5kvXG0JKsEKFB50zrFmfFt52/cvBbZa7eXg==",
"dev": true
},
"@types/q": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz",
......@@ -8201,6 +8207,11 @@
"defaults": "^1.0.3"
}
},
"webfontloader": {
"version": "1.6.28",
"resolved": "https://registry.npmjs.org/webfontloader/-/webfontloader-1.6.28.tgz",
"integrity": "sha1-23hhKSU8tujq5UwvsF+HCvZnW64="
},
"webidl-conversions": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
......
import {load as loadFont} from 'webfontloader/webfontloader.js';
export function initJetbrainsMonoFonts(): void
{
loadFont({
custom: {
families: ['JetBrains Mono'],
},
});
}
import('./components/fonts')
.then((m) => m.initJetbrainsMonoFonts());
import('./components/calculate-experience-in-years')
.then((m) => m.initCalculateExperienceInYears());
* {
-webkit-font-feature-settings: "liga" on, "calt" on;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: 'JetBrains Mono', monospace;
}
body {
background-color: $gray;
}
......
* {
-webkit-font-feature-settings: "liga" on, "calt" on;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
body {
font-size: 1.8rem;
font-family: monospace;
font-size: 2.3rem;
line-height: 3rem;
color: $white-dark;
}
html.wf-active body {
font-family: 'JetBrains Mono', monospace;
font-size: 1.9rem;
}
a {
color: $white;
font-weight: bold;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment