nightshade-text
Text shaping, styling, and glyph geometry, built on
cosmic-text.
It shapes a string into laid-out glyphs, describes how a run should look, and holds the slot storage consumers index into. Turning glyph geometry into GPU buffers is left to the caller.
This is a leaf crate: it depends on no other nightshade crate, so the renderer and the retained UI can both build on it. Anything else can too, not only the nightshade engine.
[]
= "0.57.0"
What lives here
text_data:TextMeshandTextVertex, the geometry shaping produces, plus theFontKindand alignment enums that describe a run. Always available.font_engine:FontEngine, owning the font database, the shaping context, and the glyph rasterization cache. Four fonts are embedded: Roboto, JetBrains Mono, Material Icons, and Lucide.text:TextPropertiesfor styling,TextCachefor slot storage, andTextStatepairing a cache with a font engine.text_wrapping:wrap_text, re-flowing a string to a width.
Everything here sits on the path from a &str to laid-out glyphs. Nothing that
is not on that path belongs here.
Features
default = ["shaping"]
| Feature | What it adds |
|---|---|
shaping |
The font engine, wrapping, and TextState, over cosmic-text |
With shaping off, the crate is the geometry and styling types alone, with no
font database and no shaping dependency.
Examples
License
Dual-licensed under MIT or Apache-2.0, at your option.