Browse Source

🐛 Change the way font is loaded due to github pages

Pedro Schneider 3 years ago
parent
commit
549f3aae45
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/main.js

+ 2 - 2
src/main.js

@@ -21,14 +21,14 @@
 
 
 GameHandler._preload = function()
 GameHandler._preload = function()
 {
 {
-    AssetHandler.loadFont("Lato", "/assets/fonts/Lato-Regular.ttf");
+    AssetHandler.loadFont("Lato", "../assets/fonts/Lato-Regular.ttf");
 }
 }
 
 
 GameHandler._setup = function()
 GameHandler._setup = function()
 {
 {
     // GameHandler.drawDebugFPS(true);
     // GameHandler.drawDebugFPS(true);
     // GameHandler.drawDebugBufferBounds(true);
     // GameHandler.drawDebugBufferBounds(true);
-    // textFont(AssetHandler.getP5FontByName("Lato"));
+    textFont(AssetHandler.getP5FontByName("Lato"));
 
 
     // rg = new RebusGame("Rebus game");
     // rg = new RebusGame("Rebus game");
     // rg.levelData = REBUS_LEVELS.tutorial;
     // rg.levelData = REBUS_LEVELS.tutorial;