-
Notifications
You must be signed in to change notification settings - Fork 3
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
Glyph placing is odd #5
Comments
I can reproduce this issue with roboto-regular with 32 px size. The issue disappears at 48 px size. It's been some time since I've taken at look at this, but it seems I knew this was an issue judging by this comment: msdf-gdx-gen/gen/src/main/kotlin/com/maltaisn/msdfgdx/gen/BMFont.kt Lines 49 to 52 in ae0fed1
The issue gets worse at smaller font sizes. One solution is to manually adjust the |
I already tried adjusting the yoffset but 1px step size is not fine granular enough. That's probably why the issue disappears with larger fonts. A proper solution would be to use float as yoffset (and make libgdx use float as well). |
Hey @davidgiga1993 were you able to fix that issue by any chance? I'm running into the same problem and everything points to msdf-gdx-gen being the culprit (Hiero always outputs a valid font, even with SDF). I'm trying to understand the code to maybe try some things and hopefully fix it, but I'm having a hard time understanding where this offset is calculated. Would appreciate if anyone could point me to some directions here. |
Nope, not really. I moved away from the idea of using msdf and rather generate a dynamic font texture atlas on-demand which works well enough for my use case |
I've noticed that using roboto-regular the glyph placing is a bit odd.
This is a sample render using the shader from msdf-gen and the texture has been generated with this utility.
As you can see the
B
is placed a bit too high as well as thel
and theL
. TheD
also looks a bit off.The issues persists when scaling the font to any size, so my guess is that the font generation messes something up?
The text was updated successfully, but these errors were encountered: