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

Font offsets #13

Open
neurolabusc opened this issue Jul 18, 2017 · 0 comments
Open

Font offsets #13

neurolabusc opened this issue Jul 18, 2017 · 0 comments

Comments

@neurolabusc
Copy link

One great feature of this tool is that it creates a json file with the font metrics. Even nicer, this is a json file with the same parameters as the output of Hiero (though Hiero does not use a tab delimited format not JSON). What makes this fantastic is that with a few lines of code changes (shader and json reading) one can upgrade from the sdf fonts of Hiero to the sharper msdf.

I did want to point out on discrepancy: the "xoffset" and "yoffset" values are a bit different from Hiero. Left to its own devices, the fonts generated by this tool are displaced vertically upward and horizontally rightward. In my experience, this was about 1/6th the value stored in the font "base" (xoffset = xoffset - (0.17*base);). I presume this is a difference in the output of Hiero vs msdfgen, but as an enhancement it might be nice to make it truly plug-and-play compatible. I realize there is some work in this, not sure if my 1/6th adjustment works for all font sizes and bitmap sizes.

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

No branches or pull requests

1 participant