1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/renderer/components/fonts.scss
Roman 55a977554d
Custom terminal fonts support (#5414)
Fixes #5132 #5133 
- bundled 7 new monospaced fonts for terminal
- fix: refresh terminal font after changing in the preferences / keep cluster iframe accessible in DOM while not active/focused
- display terminal's custom font preview with font-name in the select-box + live-preload for current `fontSize`, fix lint

* Fixes for <Input/>:
- remove duplicated error messages for sync validators
- don't propagate invalid values on change (uncontrolled components only)
- more informative error message for numeric input with min/max info
2022-06-06 18:03:12 +03:00

102 lines
2.7 KiB
SCSS

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
// App's main font
// Downloaded from: https://fonts.google.com/specimen/Roboto
@font-face {
font-family: "Roboto";
src: url("../fonts/Roboto-Light.ttf") format("truetype");
font-display: swap;
font-weight: 300; // "light"
}
@font-face {
font-family: "Roboto";
src: url("../fonts/Roboto-LightItalic.ttf") format("truetype");
font-display: swap;
font-weight: 300; // "light" + italic
font-style: italic;
}
@font-face {
font-family: "Roboto";
src: url("../fonts/Roboto-Regular.ttf") format("truetype");
font-display: swap;
font-weight: 400; // "normal"
}
@font-face {
font-family: "Roboto";
src: url("../fonts/Roboto-Bold.ttf") format("truetype");
font-display: swap;
font-weight: 700; // "bold"
}
// Icon fonts, see: `icon.tsx`
// Latest version for manual update: https://github.com/google/material-design-icons/tree/master/font
@font-face {
font-family: "Material Icons";
font-style: normal;
font-weight: 400;
font-display: block;
src: url("../fonts/MaterialIcons-Regular.ttf") format("truetype");
}
// Terminal fonts (monospaced)
// Source: https://fonts.google.com/?category=Monospace
@font-face {
font-family: "Anonymous Pro";
src: local("Anonymous Pro"), url("../fonts/AnonymousPro-Regular.ttf") format("truetype");
font-display: block;
}
@font-face {
font-family: "IBM Plex Mono";
src: local("IBM Plex Mono"), url("../fonts/IBMPlexMono-Regular.ttf") format("truetype");
font-display: block;
}
@font-face {
font-family: "JetBrains Mono";
src: local("JetBrains Mono"), url("../fonts/JetBrainsMono-Regular.ttf") format("truetype");
font-display: block;
}
@font-face {
font-family: "Red Hat Mono";
src: local("Red Hat Mono"), url("../fonts/RedHatMono-Regular.ttf") format("truetype");
font-display: block;
}
@font-face {
font-family: "Source Code Pro";
src: local("Source Code Pro"), url("../fonts/SourceCodePro-Regular.ttf") format("truetype");
font-display: block;
}
@font-face {
font-family: "Space Mono";
src: local("Space Mono"), url("../fonts/SpaceMono-Regular.ttf") format("truetype");
font-display: block;
}
@font-face {
font-family: "Ubuntu Mono";
src: local("Ubuntu Mono"), url("../fonts/UbuntuMono-Regular.ttf") format("truetype");
font-display: block;
}
// Patched RobotoMono font with icons
// RobotoMono Windows Compatible for using in terminal
// https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/RobotoMono
@font-face {
font-family: "RobotoMono";
src: local("RobotoMono"), url("../fonts/Roboto-Mono-nerd.ttf") format("truetype");
font-display: block;
}