Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Text horizontal padding, bug?


cloakedninjas
 Share

Recommended Posts

Originally posted here: http://www.html5gamedevs.com/topic/16816-text-horizontal-padding-bug/

 

 

I've spotted an issue with text being cut off I can't resolve with padding.x Here's some screenshots of the text.

 

First with 0 padding

KuSGlSj.png

 

And with 40 padding

QrcyDsd.png

 

Is there a way to add padding to the start of the text ? Or split the horizontal padding to both sides of the sprite?

 

 

FWIW - I'm using Phaser 2.4.3

 

Anyone got any tips?

Link to comment
Share on other sites

  • 2 years later...

Hey cloakedninjas,

Easy solution (albeit hacky) for horizontal cutoff is to add a leading (or trailing) whitespace to the text.

That is when you create your Text, enter " jogar". Then the "j" doesn't get cutoff. I had the same issue using an italic webfont and had to add a whitespace at the end of every text string. In that case, if you must use multiple lines it's preferable to use explicit "newline"s rather than relying on wordWrap. 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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