

Map label placement in Mapbox GL - bsudekum
https://www.mapbox.com/blog/placing-labels/

======
i_am_ralpht
I love the work that the Mapbox folks are doing here -- and that they wrote it
up so nicely!

I have some questions, though!

* Why can you only shift glyphs along a straight line during render? Is your geometry somewhat scale-invariant?

* Could you keep the spline and relayout the text along the spline during zooming? Then you'd have great layout and no popping.

* How do you handle complex text with really wide glyphs (where a bunch of characters resolved into a single combined glyph, like in arabic)?

~~~
ansis
Using splines would look nicer. The main reason we're using straight segments
is because it's simpler. The underlying lines are made up of straight
segments, and it's simpler to move a position along a straight line (a point
and vector) than to interpolate a spline in the shader. Adding complexity
might be a performance concern. It would be great to try using splines at some
point!

Complex text is complex. A bunch of characters may be resolved into a single
joined visual glyph, but it is probably made up of smaller, overlapping glyphs
from the font. Each of these individual glyphs would slide along the line
separately. This results in defects of course

The challenge is finding the right balance of doing things right and
performance/implementation effort.

