bevy_fontmesh
A simple Bevy plugin for generating 3D text meshes from fonts. Powered by fontmesh.
Quick Start
Add to your Cargo.toml:
[]
= "0.17"
= "0.1"
Basic usage:
use *;
use *;
Text Anchoring
Control where the text is positioned relative to its transform:
TextMeshStyle
Text Justification
Control alignment for multiline text:
TextMesh
Styling Parameters
TextMeshStyle
- depth: Controls the Z-depth of the extruded mesh. Use
0.0for flat 2D-style text. - subdivision: Number of segments used to approximate curves. Higher values produce smoother glyphs but increase vertex count.
Examples
Run the included examples:
# Basic 3D text
# Multiline text with anchoring
# Text justification demo
# All anchor points visualized
# Performance stress test (100 text meshes)
Limitations
I try not to overengineer this plugin. It does not provide:
- Text kerning or ligatures
- Right-to-left (RTL) text layout
- Dynamic text effects (shadows, outlines)
- 2D text rendering
- Text wrapping by width
For advanced typography needs, consider implementing additional logic on top of the generated meshes.
Bevy Version Compatibility
| bevy_fontmesh | Bevy |
|---|---|
| 0.1 | 0.17 |
License
MIT License - see LICENSE for details.