Concept
Labels & text.
Every place name, road number and POI is text drawn on the GPU. X-GIS stores each glyph once as a signed-distance field and reuses it at every size — so labels stay sharp from a whole-world view down to a single street, in Latin and CJK alike.
The glyph atlas
Text rendering is a pipeline: rasterise each glyph once, pack it into a texture, shape strings into glyph runs, decide which labels survive collision, then draw. Everything below walks that pipeline — each claim is true of the engine today, with the not-yet-built parts marked as roadmap.
Glyphs are signed-distance fields in an atlas
Where glyphs come from
Glyph-server PBF, or a local rasteriser
In-place re-raster when a range lands
LRU atlas with overflow protection
CJK, Hangul & bilingual
Chinese, Japanese, Korean and Kana need handling Latin doesn't — dense ideographs, line breaking without spaces, and labels that mix scripts.
Ideograph-aware shaping
Collision & placement
When labels would overlap, something has to give. X-GIS runs a greedy axis-aligned collision pass that mirrors Mapbox's placement semantics.
Greedy collision, Mapbox semantics
symbol-sort-key) in a
shared AABB grid; a later label that overlaps is dropped. The pass
supports allowOverlap /
ignorePlacement
(always-visible / never-blocks),
text-variable-anchor (try
each candidate position, keep the first that fits),
symbol-spacing along a line,
collision groups (an icon never blocks its own paired text), and
pre-seeded icon obstacles so text avoids already-placed icons.
Labels that follow a line
Curved labels that follow the road
text-max-angle gate drops a
label whose glyph-to-glyph turn is too sharp to read cleanly.
Where it is going
Roadmap · not yet shipped
This is planned, not built — the plumbing is in the engine but switched off today:
- → Local-ideograph generation — rasterising CJK glyphs locally at display-size buckets instead of the fixed 24-px server PBF. The routing exists but is disabled: the local SDF currently reads thicker and softer than the PBF glyphs, so CJK is served from the sharp PBF path at its authored size until the local SDF quality matches.
Tracked in the repo ROADMAP.md ↗.
See it live
Labels are everywhere a real map renders — place names, road shields and POIs all flow through this pipeline. Open a labelled map in the examples gallery and zoom in: the same atlas glyph stays crisp at every scale.
Specifications
See also
- →Globe & 3D — Labels ride the same 3D scene — the globe and seven flat projections from one source.
- →RTC + DSFUN precision — Label anchors are positioned in the same f32-precise coordinate scheme as the geometry.
- →Mapbox coverage — Which symbol-layer and text properties X-GIS implements against the Mapbox Style Spec.
Problem on this page?