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-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 { a {
color: rgb(0,100,200); color: rgb(0,100,200);

View File

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

View File

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