Replies: 2 comments 2 replies
-
While I can't argue that the text may need improvements, I'm not sure I understand what will be the needed change in the spec...? |
Beta Was this translation helpful? Give feedback.
2 replies
-
I opened a GL JS issue here maplibre/maplibre-gl-js#2990 which proposes improvements that do not affect the style spec |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Our current SDF-based text rendering stack leads inevitably to rounded edges on text which are an artifact from the bilinear interpolation which is used to turn a raster SDF to pixel colors.
To get sharper text rendering, one approach could be to double the resolution of all the SDF raster data as @bdon has proposed. This might be a very direct way to get sharper text.
An alternative approach might be to upload spline segments to the GPU for every glyph and compute the distance to the glyph on the GPU. It is more computationally intensive than our current raster SDF texture approach, but the advantage would be that it creates much sharper text.
There is an OpenGL ES2 implementation of this, it is called https://github.com/behdad/glyphy and is written by Behdad, the author of HarfBuzz, who is a text shaping and rendering expert. Anyway, might be worth exploring, our text looks bad I find when comparing it to Google Maps...
Beta Was this translation helpful? Give feedback.
All reactions