Managing fonts in CocoonJS 1.3

Lot’s a developers are contacting us to ask about font support and management in CocoonJS. We definitively need to improve our font support but until we fix it, let us comment on how fonts are handled so anyone can use them right now and do not face any more problems:

  1. Fonts can be either stored in the root folder of your project or inside a folder called “fonts”.
  2. The font file name and the font reference name inside the application/game code MUST be exactly the same. We know this is not a usual thing to do when handling fonts but it is how CocoonJS works at the moment. Sorry about that.
  3. In the current version of CocoonJS (1.3), fonts are not loaded when accessing the game using a remote URL. We need to fix this for sure, but fonts are loaded either if a zip file with the project inside is accessed using a remote URL (http://YOU_SERVER_ADDRESS/YOUR_GAME_FOLDER/YOUR_GAME.ZIP) or when a the same zip file is loaded to the device and run from the application list inside the CocoonJS Launcher App. To learn how to upload zip files to the launcher, please read this tutorial.

If you understand and follow these simple rules, you can master font management inside CocoonJS! Good news is that whenever we are able to improve font management inside CocoonJS, your project will still work if you follow these rules and it will definitively work in any browser too. Once again, sorry for the inconveniences. We are trying to improve our platform with every release update but there are still things missing or that need to be fixed.

Happy HTML5 game development!

1 Comment Managing fonts in CocoonJS 1.3

  1. avatarDysprosiumDy

    It would’ve been helpful if you’d also posted about the font types you support. I read somewhere in a forum post that CocoonJS only supports TrueType (TTF), whereas I’d also like to see support for OpenType (OTF). I haven’t as of yet been able to find anything about this in your documentation, because well… your documentation is everywhere and nowhere. 🙁


Leave a Reply

Your email address will not be published. Required fields are marked *