Hi all,
This class creates bitmapfonts at runtime and adds them to the bitmapfonts cache, using default or already loaded browser fonts (included webfonts).
Features
- Converts any loaded font[1] in the browser to a bitmapfont, ready to use in Phaser3 at runtime.
- Shares same texture for multiple bitmapfonts.
- Ensures power of two texture size (optional).
- Calcs kernings for 97 commonly used pairs. (optional).[2]
- Supports list of fallback fonts.
- Predefined fallback font lists for sans-serif, sans, and monospace types.
Repository and more info: https://github.com/jjcapellan/phaser3-bitmapfont-factory
Demo: https://jjcapellan.github.io/phaser3-bitmapfont-factory/
I hope you find it useful !!