• Content Count

  • Joined

  • Last visited

  1. tsx5000

    Load base64 font

    I managed to make it work by converting it into a bitmap form and loading it inline. Here's the code: var font_uri = "data:image/jpeg;base64,encoded_string"; var font_xml = 'minified_xml'; function preload() { game.load.bitmapFont('font', font_uri, "", font_xml); } function create{} { var msg = game.add.bitmapText(75, 75, 'font','Bitmap Fonts!', 64); msg.fontSize = 90; msg.tint = 0x000000; }
  2. I'm making a playable ad for Facebook and there is condition that all of the code should be contained within a single index.html file. I have managed to do this with all of the audio and images by converting them to base64. Is there any way I can achieve the same with fonts?