Skip to content

Commit 3b39480

Browse files
committed
Testing Hack font, since RobotoMono failed to display.
Signed-off-by: ubi de feo <[email protected]>
1 parent 37c4dcb commit 3b39480

File tree

3 files changed

+36
-8
lines changed

3 files changed

+36
-8
lines changed

ui/arduino/main.css

+15-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
@font-face {
22
font-family: "RobotoMono";
33
src:
4-
url("media/roboto-mono-latin-ext-400-normal.woff2") format("woff2"),
5-
url("media/roboto-mono-latin-ext-400-normal.woff") format("woff");
4+
url("./media/roboto-mono-latin-ext-400-normal.woff2") format("woff2");
5+
font-weight: normal;
6+
font-style: normal;
7+
}
8+
9+
@font-face {
10+
font-family: "Hack";
11+
src:
12+
url("./media/hack-regular.woff2") format("woff2");
613
font-weight: normal;
714
font-style: normal;
815
}
916

1017
@font-face {
1118
font-family: "OpenSans";
12-
src: url("media/open-sans_5.0.29_latin-wght-normal.woff2") format("woff2");
19+
src: url("./media/open-sans_5.0.29_latin-wght-normal.woff2") format("woff2");
1320
font-weight: normal;
1421
font-style: normal;
1522
}
@@ -137,7 +144,7 @@ button.small .icon {
137144
height: 100%;
138145
justify-content: center;
139146
align-items: center;
140-
font-family: "RobotoMono", monospace;
147+
font-family: "OpenSans", sans-serif;
141148
overflow: hidden;
142149
}
143150

@@ -271,7 +278,7 @@ button.small .icon {
271278
}
272279

273280
#code-editor * {
274-
font-family: "RobotoMono", monospace;
281+
font-family: "Hack", monospace;
275282
}
276283
#code-editor .cm-editor {
277284
width: 100%;
@@ -465,7 +472,7 @@ button.small .icon {
465472
.dialog .dialog-content #file-name {
466473
font-size: 1.3em;
467474
width:100%;
468-
font-family: "RobotoMono", monospace;
475+
font-family: "Hack", monospace;
469476
}
470477

471478
.dialog .dialog-content input:focus {
@@ -582,7 +589,7 @@ button.small .icon {
582589
position: relative;
583590
cursor: pointer;
584591
color: #000;
585-
font-family: "RobotoMono", monospace;
592+
font-family: "Hack", monospace;
586593
font-size: 14px;
587594
font-style: normal;
588595
font-weight: 400;
@@ -679,7 +686,7 @@ button.small .icon {
679686
}
680687
.file-list .item .text {
681688
color: #000;
682-
font-family: "RobotoMono", monospace;
689+
font-family: "Hack", monospace;
683690
font-size: 14px;
684691
font-style: normal;
685692
font-weight: 400;

ui/arduino/main.js

+21
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,28 @@ function App(state, emit) {
4141
`
4242
}
4343

44+
// document.fonts.ready.then(() => {
45+
// console.log("Fonts loaded");
46+
// console.log(document.fonts.check('12px RobotoMono'));
47+
// });
48+
4449
window.addEventListener('load', () => {
50+
// const fontRobotoMono = new FontFace('RobotoMono', 'url(http://github.com/media/roboto-mono-latin-ext-400-normal.woff2)', {
51+
// style: 'normal',
52+
// weight: '400',
53+
// display: 'swap'
54+
// });
55+
// fontRobotoMono.load().then((loadedFace) => {
56+
// document.fonts.add(loadedFace);
57+
// // The font will now be available for your CSS to use
58+
// console.log('RobotoMono properties:', loadedFace);
59+
// });
60+
// const fontHack = new FontFace('Hack', 'url(http://github.com/media/hack-regular.woff2)');
61+
// fontHack.load().then((loadedFace) => {
62+
// document.fonts.add(loadedFace);
63+
// // The font will now be available for your CSS to use
64+
// console.log('loaded face: ', loadedFace);
65+
// });
4566
let app = Choo()
4667
app.use(store);
4768
app.route('*', App)

ui/arduino/media/hack-regular.woff2

104 KB
Binary file not shown.

0 commit comments

Comments
 (0)