2D Toolkit Forum

2D Toolkit => Support => Topic started by: widow on April 14, 2015, 07:47:49 pm

Title: Font bounds
Post by: widow on April 14, 2015, 07:47:49 pm
Hi, i'm having trouble with the mesh bounds in tk2dtextmeshes.
As you can see in the image below when ever I have a blank space the height of the mesh is affected as the mesh for the empty space is rendered at a different height.

http://i.imgur.com/63AwilW.png

Different fonts have different results, fonts with characters of similar height have better results. All fonts have been exported with the same settings on BMFont.

http://i.imgur.com/7s6DMZC.png
http://i.imgur.com/9c8w5nB.png

Is there any way to mitigate this on the uneven fonts?

Thanks!
Title: Re: Font bounds
Post by: unikronsoftware on April 17, 2015, 09:10:40 am
That is the base of the font, i.e. including all your hanging characters like g y, etc. The pivot of the font should never change though. Don't use the mesh bounds for height if you don't want it to change - you can use the fonts lineHeight to define the constant "lineHeight" thats in the font data.