-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
Feature request: extra margin between glyphs #33
Comments
No. If you think you're getting artifacts because of no margin, that means you're actually mapping the glyphs wrong. If I added such an option everyone would use it without realizing their mistake, meaning they would still have glyphs positioned wrong and on top of that less space in the atlas. |
Let me show you how it appears. In the first image, you can see the artifacts. On the left there's the font size. See sizes 25, 32, 33 (on right of _), 39, 45/46 (on left of |)... You can also see how nice are the fonts. This is the shader i'm using:
If i use the parameters you defined in the Shadron sample, it becomes this:
And then the result is in the second image: the artifacts are almost gone (still on size 47, 50, 54...). However, the fonts looks very ugly, specially on small sizes. Note: my app works on desktop, so it requires sizes <= 18. Thanks
|
This is how i'm creating the font: msdf-atlas-gen.exe -font roboto.ttf -charset roboto_charset.txt -size 30 -type mtsdf -format png -potr -imageout roboto.png -csv roboto.csv -json roboto.json -scanline -yorigin top -pxrange 4 -coloringstrategy inktrap Btw, i miss a lot, in the md file, the default values for each parameter, and in which situations a change is recommended. |
None of that is the problem. Your texture coordinates are wrong. How do you compute them? |
Why you add a margin of 0.5 to all coords in GlyphGeometry::getQuadPlaneBounds? |
Found my issue. I was removing the 0.5 margin as LibGDX's BitmapFont format don't support it. I added the margin back and it worked.
|
That's good to hear. Just one thing to check - depending on what exactly happened, in case all your texture coordinates actually got rounded down, you may want to add to |
You were right: the correct is to add. |
Hi,
I'm using your wonderful tool to create my fonts, but since the margin between the glyphs is only 1, some glyphs at some font sizes are getting artifacts from the other glyphs. Can you please add a parameter to define an extra margin around the glyphs?
Kind regards
The text was updated successfully, but these errors were encountered: