2D Toolkit Forum

2D Toolkit => Support => Topic started by: vancext on March 04, 2014, 01:19:34 am

Title: Word Wrap justified right and spaces.
Post by: vancext on March 04, 2014, 01:19:34 am
Heya, just wondering if someone could help me figure out a hack for tk2dTextMesh. I notice whenever I anchor text right and use word wrap, the spaces get pinned to the ends of the line-ending words, instead of being attached to the front of the word moved to the next line (the opposite of what needs to happen with left justification). The effect is a space at the end of every non-final line-ending word, creating a jagged justification.

Any easy way to fix?

Thank you for the help!

Title: Re: Word Wrap justified right and spaces.
Post by: unikronsoftware on March 04, 2014, 11:31:09 am
tk2dTextMesh.FormatText is where the formatting occurs. The
Code: [Select]
else if (idx == ' '/* || idx == '.' || idx == ',' || idx == ':' || idx == ';' || idx == '!'*/)line is where the it treats the space character. You can tweak that there.