Mvt Curved Text Placer
Arc-length parameterised glyph placement along a polyline. Given a polyline in screen coordinates, a text string with its per-character advance widths in pixels, and a desired label-repeat interval, produces one GlyphRun per repeat position covering as much of the line as fits.
Each GlyphRun holds the per-glyph (screen position, tangent angle) pairs so the caller can emit one rotated earth.worldwind.shape.Label per glyph. The first repeat starts with enough margin from the line's start that the label's left edge sits on or after the line's first vertex; subsequent repeats begin at previousRunEnd + repeatGapPx.
Curvature handling: each glyph's tangent angle is sampled at its position along the curve (the segment containing its arc-length offset). On a sinuous river this produces a snake-along-the-curve effect; on a straight road every glyph in a run shares the same angle.
The placer is pure: no global state, no allocations beyond the returned list.
Functions
Rotate the per-glyph anchor offsets into screen space. Useful when emitting one Label per glyph and you need to compute the glyph's screen bbox for collision. Returns (dx, dy) screen offsets from the anchor centerX, centerY for a glyph that would otherwise sit at the anchor with width glyphWidth and height glyphHeight.