mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
switch to inter font
This commit is contained in:
parent
9b3042829c
commit
11a4e4b2e1
@ -8,7 +8,7 @@
|
||||
--grey-text-color: #666;
|
||||
--main-bg-color: #000000;
|
||||
--border-color: #333333;
|
||||
--base-font: normal 15px / normal "Lato", sans-serif;
|
||||
--base-font: normal 15px / normal "Inter", sans-serif;
|
||||
--fixed-font: normal 12px / normal "Hack", monospace;
|
||||
--accent-color: rgb(88, 193, 66);
|
||||
--panel-bg-color: rgba(31, 33, 31, 1);
|
||||
|
@ -6,6 +6,7 @@ let isLatoFontLoaded = false;
|
||||
let isHackFontLoaded = false;
|
||||
let isBaseFontsLoaded = false;
|
||||
let isFiraCodeLoaded = false;
|
||||
let isInterFontLoaded = false;
|
||||
|
||||
function addToFontFaceSet(fontFaceSet: FontFaceSet, fontFace: FontFace) {
|
||||
// any cast to work around typing issue
|
||||
@ -106,6 +107,19 @@ function loadHackFont() {
|
||||
hackBoldItalic.load();
|
||||
}
|
||||
|
||||
function loadInterFont() {
|
||||
if (isInterFontLoaded) {
|
||||
return;
|
||||
}
|
||||
isInterFontLoaded = true;
|
||||
const interFont = new FontFace("Inter", "url('fonts/inter-variable.woff2')", {
|
||||
style: "normal",
|
||||
weight: "400",
|
||||
});
|
||||
addToFontFaceSet(document.fonts, interFont);
|
||||
interFont.load();
|
||||
}
|
||||
|
||||
function loadBaseFonts() {
|
||||
if (isBaseFontsLoaded) {
|
||||
return;
|
||||
@ -121,7 +135,7 @@ function loadBaseFonts() {
|
||||
|
||||
function loadFonts() {
|
||||
loadBaseFonts();
|
||||
loadLatoFont();
|
||||
loadInterFont();
|
||||
loadJetBrainsMonoFont();
|
||||
loadHackFont();
|
||||
loadFiraCodeFont();
|
||||
|
BIN
public/fonts/inter-variable.woff2
Normal file
BIN
public/fonts/inter-variable.woff2
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user