Why is my font not rendering properly?

Alyssa

  • Posts: 3
Hello Stencyl Community,

I have an issue with my font rendering in my game. In the game, when font is rendered, huge gaps appear between letters where there should not be any gaps (see attached image).
Does anyone know why this is happening and how I may be able to fix it?

Here's an image of what's happening to clarify:


Thanks,

Jess

Sunflower

  • Posts: 591
It's because Stencyl font system is silly!!1!1

Or rather, from Stencyl's point of view, each character is a bitmap of a rectangular shape, and drawing text is based on placing such bitmaps one after another, assuming the bitmap width as a letter width. With such system letter ornaments might causes the bitmap to widen, and thus letter appears to be wider from the Stencyl's point of view. It's particularly visible in the case of l/p gap, where letter L has an ornament on the right at the top, and then there's letter P which has ornament on the left at the bottom.

I'm not sure how that could be fixed, though. Sorry. >.<

Innes

  • *
  • Posts: 1963
Visit www.TheStencylBook.com - the only published book for learning Stencyl.

Alyssa

  • Posts: 3
Thanks, do you know of another way that I can get the text to be shown that does not present this problem?

ipe 369

  • Posts: 1001
you could 'kern' yourself by splitting the text, but it'd be very timeconsuming. You could use an actor and the actor has text as an animation?

Alyssa

  • Posts: 3
Awesome i'll try that :) Thanks!

Innes

  • *
  • Posts: 1963
Thanks, do you know of another way that I can get the text to be shown that does not present this problem?

For 'static' text, I have generally created an image in Photoshop (or similar), and have displayed the text as an actor.

To keep things tidy, it's possible to use a single actor that contains all the static text - one item in each animation, and then display the relevant animation as required. This can also help with multi-lingual games - use one actor per language, but give the animations for each language the same names. Then, to switch languages, choose the appropriate 'language actor', and display the relevant animation name (which will be the same for every language).
Visit www.TheStencylBook.com - the only published book for learning Stencyl.