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
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.
Activity
mikemorris commentedon Jun 26, 2014
👍
Should buffer size (currently hardcoded to 3) be configurable too?
yhahn commentedon Jun 26, 2014
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.
mikemorris commentedon Jul 1, 2014
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.
mikemorris commentedon Jul 2, 2014
@ansis Can you link to the lines in the code where distance units per pixel and shift are implemented?
ansis commentedon Jul 3, 2014
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
mikemorris commentedon Aug 6, 2014
https://github.com/mapbox/mapbox-gl-js/blob/891cb690d8e8f3d770cbfd2fe14ba4aef3f1a1fa/js/render/drawsymbol.js#L109-L132
mattdesl commentedon May 6, 2015
👍
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:
https://github.com/Jam3/sdf-bitmap-glyphs/blob/master/index.js#L6
A few other metrics like
lineHeight, baseline, etc would also be great to add to theload()data. Not sure how MapboxGL is currently handling those?mikemorris commentedon May 7, 2015
offsetandradius, more hardcoded defaults that should be exposed/adjustable https://github.com/mapbox/node-fontnik/blob/master/src/glyphs.cpp#L614-L615jcary741 commentedon Oct 13, 2026
Closing as stale.