Jump to content

Phaser.Text vs Phaser.BitmapText


haden
 Share

Recommended Posts

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

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.

Link to comment
Share on other sites

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.....

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

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

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 :P

Link to comment
Share on other sites

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...