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
In the example above, text-size is set to 1, while font-scale is set to different values. This generates downscaled SDF textures that produces unreadable results.
Hmm, although that is a slightly surprising usage it sounds like there is a bug caused by not adjusting the sdf blurring distance for the scaled size. I think this should be fixable. Can you open an issue and tag Chris?
Passing variable halo distance (or really, variable text-size) to the shaders would require us to do something like a paint property binder whenever we used format expressions. The current implementation takes advantage of being able to implement "font-scale" purely by changing the layout vertices. This has the advantage that no extra data has to get passed to the GPU to support multiple "scales" in a single draw call, but leads to these artifacts with large font-scales. See discussion at #6994 (comment).
Putting an explicit limit on font-scale might help guide people in the right direction here. Maybe .25 <= font-scale <= 4?
I think text-size is already always data-driven so baking it in there wouldn't require any extra binding. I'm not familiar with the formatted text implementation. Would it be hard to implement it with this?
Given the following
style.json
render test example:In the example above,
text-size
is set to 1, whilefont-scale
is set to different values. This generates downscaled SDF textures that produces unreadable results.Rendered result:

/cc @ansis @ChrisLoer
The text was updated successfully, but these errors were encountered: