fix font load for canvas

This commit is contained in:
LuckyLaszlo
2023-01-17 12:18:42 +01:00
parent d9fc3b49be
commit d8317350b0
3 changed files with 27 additions and 16 deletions

View File

@@ -26,6 +26,16 @@ body {
font-display: swap;
}
@font-face {
font-family: "Bit5x3";
src:
url("/fonts/Bit5x3.woff2") format("woff2"),
local("Bit5x3"),
url("/fonts/Bit5x3.woff") format("woff");
font-weight: normal;
font-style: normal;
font-display: swap;
}
a {
color: rgb(0,100,200);

View File

@@ -390,19 +390,20 @@
{/if}
{/if}
<div id="preload_font">.</div>
</div> <!-- div "game_page" -->
<style>
@font-face {
#preload_font {
font-family: "Bit5x3";
src:
url("/fonts/Bit5x3.woff2") format("woff2"),
local("Bit5x3"),
url("/fonts/Bit5x3.woff") format("woff");
font-weight: normal;
font-style: normal;
font-display: swap;
opacity:0;
height:0;
width:0;
display:inline-block;
}
.dim_background {
background-color: #222;
}

View File

@@ -175,19 +175,19 @@
</div>
{/if}
<div id="preload_font">.</div>
</div> <!-- div "game_page" -->
<!-- -->
<style>
@font-face {
#preload_font {
font-family: "Bit5x3";
src:
url("/fonts/Bit5x3.woff2") format("woff2"),
local("Bit5x3"),
url("/fonts/Bit5x3.woff") format("woff");
font-weight: normal;
font-style: normal;
font-display: swap;
opacity:0;
height:0;
width:0;
display:inline-block;
}
.dim_background {