haden Posted March 20, 2014 Share Posted March 20, 2014 I've been using bitmap fonts without any problem so far. Now I want to make it easier for me to translate my in game text to any desired language, but this means I need to support extra characters (for example russian), and I'm thinking about using regular Text instead. My question is: are there any drawbacks or limitations to using regular text instead of bitmap font text, in Phaser ? Link to comment Share on other sites More sharing options...
jflowers45 Posted March 20, 2014 Share Posted March 20, 2014 the nice thing about bitmapFonts in your case is that you wouldn't be worried about what fonts are installed on the end user's system ... but that's a limitation of all html text as opposed to a phaser thing haden 1 Link to comment Share on other sites More sharing options...
Mike Posted March 20, 2014 Share Posted March 20, 2014 Hm... with css loading the fonts, everybody will have the font you use... so html text should be a problem if the font supports the language characters as Cyrillic chars for example.You can convert a font or use some of the Google fonts. haden 1 Link to comment Share on other sites More sharing options...
clark Posted March 21, 2014 Share Posted March 21, 2014 We actually try to avoid anything to do with bitmap fonts. It was the same in Starling, a total nightmare when it comes to spacing and layout etc. Especially when you support like 10 resolutions and none of the FNT files match..... haden 1 Link to comment Share on other sites More sharing options...
haden Posted March 23, 2014 Author Share Posted March 23, 2014 the nice thing about bitmapFonts in your case is that you wouldn't be worried about what fonts are installed on the end user's system ... but that's a limitation of all html text as opposed to a phaser thing Yes indeed. The problem is I need to re-generate the bitmap font each time a sponsor adds a new language to the game, because depending on the language some characters weren't available in the first font. clark 1 Link to comment Share on other sites More sharing options...
Souzou Posted March 28, 2014 Share Posted March 28, 2014 Check out this tutorial I've written on exactley this. Using Google Fonts straight from their site for easy translations. http://souzou.com.au/google-font-integration-with-phaser/ haden 1 Link to comment Share on other sites More sharing options...
haden Posted April 5, 2014 Author Share Posted April 5, 2014 Check out this tutorial I've written on exactley this. Using Google Fonts straight from their site for easy translations. http://souzou.com.au/google-font-integration-with-phaser/Thank you Souzou, your blog is really useful. I'm gonna follow your instructions and see how it goes Link to comment Share on other sites More sharing options...
aurelien974 Posted May 25, 2014 Share Posted May 25, 2014 This topic's name perfectly fits my question : Can someone explain the pros and cons of using a Bitmap Font ? and a normal font ? Especially the Pros of a Bitmap Font ? Except for faster rendering when the text always change (as rich said in another topic), or easy loading with Phaser, i don't see any others... Link to comment Share on other sites More sharing options...
haden Posted May 28, 2014 Author Share Posted May 28, 2014 Can someone explain the pros and cons of using a Bitmap Font ? and a normal font ? Especially the Pros of a Bitmap Font ? Except for faster rendering when the text always change (as rich said in another topic), or easy loading with Phaser, i don't see any others... Each has it's pro and cons. BitmapFont require time to prepare the font file, and if a sponsor asks you to add support for language that requires special characters (like Turkish or Russian) you'll have to regenerate the bitmap font. BitmapFont also doesn't support word wrapping so you'll have make sure your text fits into the game or add extra '\n' in it.Text require you to use Webfonts, and one problem I'm facing right now is I can't seem to be able to display Russian using Google Web Fonts Link to comment Share on other sites More sharing options...
aurelien974 Posted May 28, 2014 Share Posted May 28, 2014 I see, thank you What is your problem exactly ? You can't find a font with Cyrillic letters ? (For the game I'm working on, I used a JSON with the different languages I translated; and I downloaded the font I chose on the internet with the Webfont Generator of fontsquirrel.com. It works well.) Link to comment Share on other sites More sharing options...
haden Posted May 29, 2014 Author Share Posted May 29, 2014 I see, thank you What is your problem exactly ? You can't find a font with Cyrillic letters ? (For the game I'm working on, I used a JSON with the different languages I translated; and I downloaded the font I chose on the internet with the Webfont Generator of fontsquirrel.com. It works well.) Although the Google says the font supports cyrillic, and although I added the cyrillic subset to the font, it doesn't display cyrillic, or turkish or even franch (ç) characters correctly !!! Link to comment Share on other sites More sharing options...
haden Posted May 29, 2014 Author Share Posted May 29, 2014 Turned out the problem was caused by Dropbox who for some reason doesn't serve my game files as utf-8 so all text characters were messed up. Link to comment Share on other sites More sharing options...
mariogarranz Posted May 29, 2014 Share Posted May 29, 2014 As far as I know, BitmapFont is way faster at rendering than TTF fonts. Link to comment Share on other sites More sharing options...
Recommended Posts