SOLVED: Is there an height limit in the drawText custom font size ?

SOLVED, sorry it was a mix of a bit of PEBKAC while saving the second font in size "80", and of an issue with the font itself or the BMfont/fontbm exports that create 56px height chars for an "80" font-size....

No limitation on drawText

-------

I have build two fonts in 80 and 112 pixels heights but everything is rendered at the "FONT_NUMBER_THAI_HOT" height (around 58px for the fenix5) ?

Here the blue "4" should be 80px in height, and 48 should be 112. Weirdly enough getFontAscent and getTextDimensions does get the correct values, which shift the "m/m" text way under the 000 while it is calculated to be on the same line.

  • How are you specifying the height? Are you using BMFont? The actual size in pixels of each character on the texture gets controlled by the "Size (px)" value that you specify - is that what you are setting to 80 and 112? Also which font are you using - is it one that can be scaled like truetype? I've made some in the past that were 300-400 high. Or is the actual texture correct and is it just the rendering that is wrong?

  • Hi,

    Yes, i wasn't able to modify my post earlier since it was moderated, but i found out a few explainations.

    1/ the pixmaps created by fontbm (linux) or BMfont (windows) aren't "full height", as of now i suppose it's related to the font itself. In my case using a "font-size" or "Size (px)" of 80 got me numbers glyphs of ~58px height.

    2/ the "size invariance" was due to a simple mistake on my side, of changing the file name to the new size but forgetting to change the size parameter itself.

    I'm working with "Bebas Neue" and yes it's a TrueType Font