2D Toolkit Forum
2D Toolkit => Support => Topic started by: tayasui on February 02, 2012, 03:03:19 pm
-
Hello,
I'm currently using tk2dTextMesh to display texts in my Unity Apps.
I'm experiencing some trouble with a specific font: some pixels which don't belong to some characters are displayed. You can see it on the attached screenshot.
I've used Hiero to generate the texture and the .bmfont file for "VAG-Bold 16px".
On Unity side, I've checked the option "Flip Texture Y", and selected 480 as "Target Height", 240 as "Target Ortho size" (considering the camera attributes).
Do you have any idea why this glitch happens?
Do you need more information?
Thanks,
Cl?ment.
-
Two things to check first
- How many pixels of padding did you add to the font in bmfont / hiero? Try increasing this to see if it goes away.
- If you aren't scaling the texture, set it to point filtered, less chance of bleeding that way.
Let me know how it goes...
-
Thank you unikron,
Actually, I've already tried these solutions, but the results aren't what I expected: check the two screenshots to see that.
I think the best solution would be to use padding, but only if the tk2dTextMesh let me set the spacing between characters.
Cl?ment.
-
2D Toolkit isn't able to add padding to your font textures currently - the reasoning to leave this out is that it was easy enough to re-export from BMFont / Hiero with different padding settings. We can implement this feature if more people would find it useful - any feedback here would be greatly appreciated.
-
Ok, thanks for your quick replies.
Congratulations on the great work you do on the 2D Toolkit.
-
Hello,
If you are interested, I've made the modifications that I needed on the scripts.
Feel free to use it for the next release.
Cl?ment.
-
Thanks for sharing - I will look into this before the next release.