Hello Guest

Author Topic: Font bounds  (Read 3416 times)

widow

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 1
    • View Profile
Font bounds
« 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!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Font bounds
« Reply #1 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.