tonyw

How to win at PIXI.extras.BitmapText ?

Recommended Posts

hi,

I'm trying to get bitmap fonts working, with little success. Now, the font that the pixi example uses, does work, e.g. -

https://github.com/pixijs/examples/blob/gh-pages/required/assets/desyrel.xml demo page - http://pixijs.github.io/examples/#/demos/text-demo.js

Bit whatever I output myself, from https://www.bmglyph.com/ as recommended here - http://pixijs.download/release/docs/PIXI.extras.BitmapText.html - does not work, failing with - 

TypeError: undefined is not an object (evaluating 'BitmapText.fonts[this._font.name].size')

So, I'm wondering, what exactly did they output the example font, desyrel.xml, from? I'm using the Mac exporter that they recommend. Maybe that actually doesn't work, and only the windows exporter works?

Um, kinda stuck. Any ideas? 

thanks, Tony

Share this post


Link to post
Share on other sites
4 hours ago, alex_h said:

There's an online bitmap font tool made in flash that is a bit easier to use

http://kvazars.com/littera/

you could give that a try?

bmglyph is easy to use, but its output doesn't work ;) I might report this to pixi as their instructions are wrong.

But littera does work! Yay. Thanks for the link :)  

Share this post


Link to post
Share on other sites

I couldn't get bitmaps to work. I always got errors like `Uncaught Error: Texture Error: frame does not fit inside the base Texture dimensions: X: 54 + 0 = 54 > 1 and Y: 50 + 0 = 50 > 1`

I'm using the Arial  font (really simple). I'm using http://kvazars.com/littera/

  • I tried Pack Method 1 through 7
  • I tried just digits, just lowercase etc.
  • I tried different paddings
  • I tried different fontsizes
  • I tried different strokes
  • I tried different canvas sizes
  • I tried the same with bmglyph 

But none seem to work, what am I missing? 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.