Skip to content
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 RequestL msdfgen 1.4 #12

Open
neurolabusc opened this issue Jul 17, 2017 · 7 comments
Open

Feature RequestL msdfgen 1.4 #12

neurolabusc opened this issue Jul 17, 2017 · 7 comments

Comments

@neurolabusc
Copy link

This is a terrific tool. As a feature request, it would be great to upgrade the msdfgen binaries to version 1.4. I can not find documentation on how to compile msdfgen on MacOS, but you did this with the older version. Hopefully you can do the same with the modern version. I have noticed a few artifacts with this older version of msdfgen when gneerating lower-resolution bitmaps.

@arilotter arilotter self-assigned this Jul 17, 2017
@arilotter
Copy link
Contributor

Hey @neurolabusc, could you try this branch and let me know if it works for you?
https://github.com/Jam3/msdf-bmfont/tree/msdfgen1.4

It seems to invert my test case font, weird.

@neurolabusc
Copy link
Author

Nice. You just need to change your shader for the new format, as shown on the msdfgen web page. This makes a huge difference in reducing artifacts when the font bitmaps are created with a low resolution or when normal sized bitmaps are scaled to be small.

@arilotter
Copy link
Contributor

Hmm, the new shader almost works, but I get rendering artifacts around the edges of my glyphs. Any thoughts? I've updated the msdfgen1.4 branch.
screen shot 2017-07-18 at 10 08 02 am

@neurolabusc
Copy link
Author

My solution was to increase the "x" position by 1/scaleW, the "y" by 1/scaleH and the decrease the width and height by the same amount, but this is a change with respect to how they are represented by Hiero. So perhaps the change could be put into the generator. I think the truth is that with Hiero's standard distance fonts the edges of the quads have no information (they are very distant from the character), but with the new version of msdfgen the hinting extends right to the border of the character's quad.

@gigablox
Copy link

Any updates on this? Have the artifacts been resolved?

@arilotter
Copy link
Contributor

@gigablox a PR is in progress by @soimy here: #15
I'll get to thoroughly reviewing and probably merge in a couple weeks, but you can use the WIP branch for now if you'd like updated binaries sans-artifacts

@donmccurdy
Copy link

Related: soimy#16 (comment)

You can check out https://github.com/soimy/msdf-bmfont-xml/tree/master/test for an example on how to use [msdfgen v1.4] generated atlas with three-bmfont-text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants