Skip to main content

Module symbols

Module symbols 

Source
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

ModulePurpose
cross_tile_indexCross-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§

GlyphAtlas
Requested glyph set for symbol text rendering.
GlyphAtlasEntry
Glyph atlas entry metadata.
GlyphKey
A requested glyph in a font stack.
GlyphQuad
A pre-laid-out glyph quad for GPU rendering.
GlyphRaster
Rasterized glyph bitmap.
ImageManager
Tracks symbol image dependencies.
PlacedSymbol
A placed symbol after collision resolution.
ProceduralGlyphProvider
A tiny built-in procedural glyph source for engine-side symbol plumbing.
SpriteImage
A sprite or standalone image dependency.
SpriteSheet
Registered sprite-sheet metadata.
SymbolAssetDependencies
Asset dependencies for a single placed symbol.
SymbolAssetRegistry
Runtime registry of glyph and image dependencies derived from placed symbols.
SymbolCandidate
Candidate symbol generated from a symbol layer before placement.
SymbolCollisionBox
A simple collision box in world-space meters.
SymbolPlacementConfig
Placement tuning parameters.
SymbolPlacementEngine
Stateful placement engine with collision handling and fade persistence.

Enums§

SpriteSheetParseError
Errors while parsing a sprite-sheet index.
SymbolAnchor
Symbol anchor position relative to the anchor point.
SymbolIconTextFit
Icon sizing mode relative to the label text box.
SymbolPlacement
Placement mode for symbol features.
SymbolTextJustify
Horizontal text justification for symbol labels.
SymbolTextTransform
Text transformation applied before shaping and measurement.
SymbolWritingMode
Text writing mode for symbol labels.

Traits§

GlyphProvider
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.