-
Notifications
You must be signed in to change notification settings - Fork 65
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
sdf metadata #51
Comments
👍 Should buffer size (currently hardcoded to 3) be configurable too? |
Hrm, let's not worry about this until we have a reason to change these things. Picking good defaults and not changing them beats making anything possible and giving the impression that they will be handled by implementers. |
In testing SDF granularity, it appears that our current defaults, while sensible for most serif and sans-serif fonts, are quite inadequate for curvy, swooping fonts. |
@ansis Can you link to the lines in the code where distance units per pixel and shift are implemented? |
They aren't separate variables yet, but the values are part of the equations for u_buffer and u_gamma here https://github.com/mapbox/mapbox-gl-js/blob/1e8bb1120da09db7eaa804581204acfa36fe4d97/js/render/drawtext.js#L93-L106 @lbud is currently working on updating this part for v4 styles mapbox/mapbox-gl-js#514 |
👍 Even if things like buffer aren't (yet) adjustable it would be great to export meta data so there is less magic going on in tools that use fontnik. For example: A few other metrics like |
|
It would be nice to include metadata about how the sdfs are rendered.
Not urgent, but it would be nice to not hardcode these in the renderers.
Explanation of how this metadata is used at mapbox/mapbox-gl-style-spec#66 (comment)
The text was updated successfully, but these errors were encountered: