You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: