Expand description
Symbol/cartography foundations: asset dependencies and placement.
This module provides a small engine-owned symbol system inspired by the
higher-level responsibilities in MapLibre’s symbol/placement.ts and image
/ glyph management. It is intentionally foundational rather than complete:
the engine can now derive text/icon dependencies, perform basic collision
detection, de-duplicate nearby repeated labels, and preserve per-symbol fade
state across frames.
§Sub-modules
| Module | Purpose |
|---|---|
cross_tile_index | Cross-tile symbol deduplication index (MapLibre CrossTileSymbolIndex equivalent). |
Modules§
- cross_
tile_ index - Cross-tile symbol index for deduplicating labels at tile boundaries.
- text_
shaper - Text shaping engine for symbol label rendering.
Structs§
- Glyph
Atlas - Requested glyph set for symbol text rendering.
- Glyph
Atlas Entry - Glyph atlas entry metadata.
- Glyph
Key - A requested glyph in a font stack.
- Glyph
Quad - A pre-laid-out glyph quad for GPU rendering.
- Glyph
Raster - Rasterized glyph bitmap.
- Image
Manager - Tracks symbol image dependencies.
- Placed
Symbol - A placed symbol after collision resolution.
- Procedural
Glyph Provider - A tiny built-in procedural glyph source for engine-side symbol plumbing.
- Sprite
Image - A sprite or standalone image dependency.
- Sprite
Sheet - Registered sprite-sheet metadata.
- Symbol
Asset Dependencies - Asset dependencies for a single placed symbol.
- Symbol
Asset Registry - Runtime registry of glyph and image dependencies derived from placed symbols.
- Symbol
Candidate - Candidate symbol generated from a symbol layer before placement.
- Symbol
Collision Box - A simple collision box in world-space meters.
- Symbol
Placement Config - Placement tuning parameters.
- Symbol
Placement Engine - Stateful placement engine with collision handling and fade persistence.
Enums§
- Sprite
Sheet Parse Error - Errors while parsing a sprite-sheet index.
- Symbol
Anchor - Symbol anchor position relative to the anchor point.
- Symbol
Icon Text Fit - Icon sizing mode relative to the label text box.
- Symbol
Placement - Placement mode for symbol features.
- Symbol
Text Justify - Horizontal text justification for symbol labels.
- Symbol
Text Transform - Text transformation applied before shaping and measurement.
- Symbol
Writing Mode - Text writing mode for symbol labels.
Traits§
- Glyph
Provider - Glyph raster source used to populate a glyph atlas.
Functions§
- layout_
symbol_ glyphs - Compute per-glyph positions from the glyph atlas and store them in each
PlacedSymbol::glyph_quads. - layout_
symbol_ glyphs_ shaped - Lay out symbol glyphs using the text shaping engine.
- symbol_
mesh_ from_ placed_ symbols - Build a placeholder vector mesh from placed symbols.