This is a collection of demos showing different techniques to preload CSS webfonts and use it in your games. Here we are using Phaser as a game engine/framework.
You can see these demos online here.
You can also clone this repository and run them locally, but Phaser needs a server to be able to load assets. This means that just opening index.html
will not work. There are several quick ways to run a local server:
With Python:
python -m SimpleHttpServer
With npm and http-server
:
npm install http-server -g
http-server