diff --git a/package.json b/package.json index a2b4408cfe..ce09fd94ca 100644 --- a/package.json +++ b/package.json @@ -405,7 +405,6 @@ "typed-emitter": "^1.4.0", "typedoc": "0.22.15", "typedoc-plugin-markdown": "^3.11.12", - "typeface-roboto": "^1.1.13", "typescript": "^4.5.5", "typescript-plugin-css-modules": "^3.4.0", "webpack": "^5.72.0", diff --git a/src/renderer/components/app.scss b/src/renderer/components/app.scss index 9bff2a1092..80317acb59 100755 --- a/src/renderer/components/app.scss +++ b/src/renderer/components/app.scss @@ -70,7 +70,8 @@ html, body { overflow: hidden; color: var(--textColorPrimary); background-color: var(--mainBackground); - font: var(--font-size) var(--font-main); + font-size: var(--font-size); + font-family: var(--font-main); } #terminal-init { diff --git a/src/renderer/components/fonts.scss b/src/renderer/components/fonts.scss index d4a890342e..40f9e9625b 100644 --- a/src/renderer/components/fonts.scss +++ b/src/renderer/components/fonts.scss @@ -3,8 +3,40 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ -// Material Design Icons, used primarily in icon.tsx -// Latest: https://github.com/google/material-design-icons/tree/master/font +// 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; @@ -13,6 +45,7 @@ src: url("../fonts/MaterialIcons-Regular.ttf") format("truetype"); } + // Terminal fonts (monospaced) // Source: https://fonts.google.com/?category=Monospace @font-face { @@ -63,6 +96,6 @@ // 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"); + src: local("RobotoMono"), url("../fonts/Roboto-Mono-nerd.ttf") format("truetype"); font-display: block; } diff --git a/src/renderer/fonts/Roboto-Bold.ttf b/src/renderer/fonts/Roboto-Bold.ttf new file mode 100644 index 0000000000..43da14d84e Binary files /dev/null and b/src/renderer/fonts/Roboto-Bold.ttf differ diff --git a/src/renderer/fonts/Roboto-Light.ttf b/src/renderer/fonts/Roboto-Light.ttf new file mode 100644 index 0000000000..e7307e72c5 Binary files /dev/null and b/src/renderer/fonts/Roboto-Light.ttf differ diff --git a/src/renderer/fonts/Roboto-LightItalic.ttf b/src/renderer/fonts/Roboto-LightItalic.ttf new file mode 100644 index 0000000000..2d277afb23 Binary files /dev/null and b/src/renderer/fonts/Roboto-LightItalic.ttf differ diff --git a/src/renderer/fonts/roboto-mono-nerd.ttf b/src/renderer/fonts/Roboto-Mono-nerd.ttf similarity index 100% rename from src/renderer/fonts/roboto-mono-nerd.ttf rename to src/renderer/fonts/Roboto-Mono-nerd.ttf diff --git a/src/renderer/fonts/Roboto-Regular.ttf b/src/renderer/fonts/Roboto-Regular.ttf new file mode 100644 index 0000000000..ddf4bfacb3 Binary files /dev/null and b/src/renderer/fonts/Roboto-Regular.ttf differ diff --git a/yarn.lock b/yarn.lock index 21beb4bb50..2dc1ac455e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13002,11 +13002,6 @@ typedoc@0.22.15: minimatch "^5.0.1" shiki "^0.10.1" -typeface-roboto@^1.1.13: - version "1.1.13" - resolved "https://registry.yarnpkg.com/typeface-roboto/-/typeface-roboto-1.1.13.tgz#9c4517cb91e311706c74823e857b4bac9a764ae5" - integrity sha512-YXvbd3a1QTREoD+FJoEkl0VQNJoEjewR2H11IjVv4bp6ahuIcw0yyw/3udC4vJkHw3T3cUh85FTg8eWef3pSaw== - typescript-plugin-css-modules@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/typescript-plugin-css-modules/-/typescript-plugin-css-modules-3.4.0.tgz#4ff6905d88028684d1608c05c62cb6346e5548cc"