-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong baseline? #8
Comments
Fixed and released, thank you and sorry for the late reply =) |
Thanks, but it still not correct (char g). |
I guess you use common/lineHeight parameter for your canvas height, so bottom of 'g' doesn't fit into the picture. Actually lineHeight means how far the cursor should be moved vertically when moving to the next line (see http://www.angelcode.com/products/bmfont/doc/render_text.html). To calculate required canvas height you can get the maximum value out of all yoffset + height. |
I added the |
I use lineHeight |
BMFont uses TEXTMETRIC.tmAscent as common/base value (without TEXTMETRIC.tmInternalLeading) and crops top of glyphs above this value: As result of this cropping - you could fit your text in lineHeight. fontbm uses distance from topmost possible pixel (for all font glyphs) to baseline as common/base, so it is not the same value as BMFont, and rendered text looks below a bit (to fit all accent marks and other diacritical characters), but in this case lineHeight is not enough to fit all the glyphs and should be used only as distance between baselines. |
The last release generates more similar base values, maybe this will suit your case. |
Just compare fontbm vs BMFont vs Hiero, chars:
A Á Â Ấ Ắ Ễ Ỗ
From image, I found some issues
BMFont: size=-48, lineHeight=56 base=44
fontbm: size=48, lineHeight=57 base=36
The text was updated successfully, but these errors were encountered: