bevy_fontmesh
A simple and focused Bevy plugin for generating 3D text meshes from fonts. Powered by fontmesh.
What it does
Turns the same Handle<bevy::text::Font> you already use for Bevy's 2D UI text into a 3D extruded mesh. You control extrusion depth, anchor, justification, and subdivision quality; Bevy handles materials, lighting, and rendering.
Under the hood, parley shapes the text (kerning, ligatures, BiDi, complex scripts) and fontmesh tessellates each glyph.
Quick Start
[]
= "0.19"
= "0.6"
use *;
use *;
For per-character styling use [TextMeshGlyphs]; for custom materials, add the plugin a second time with your material type:
app.add_plugins
See docs.rs/bevy_fontmesh for the full API.
Rendering both sides
The generated mesh is single-sided (front, back, and outward-facing side walls) — same shape as ttf2mesh and previous bevy_fontmesh releases. If you look through a glyph's hole (e.g. into the counter of a 'B') and want the back face to render, set:
StandardMaterial
The examples in this repo all do this.
Examples
Supported Formats
- TrueType (
.ttf) — fully supported - OpenType with TrueType outlines (
.otf) — fully supported - OpenType with CFF/PostScript outlines (
.otf) — fully supported (new in 0.4)
Bevy Version Compatibility
| bevy_fontmesh | Bevy |
|---|---|
| 0.6 | 0.19 |
| 0.2 – 0.5 | 0.18 |
| 0.1 | 0.17 |
License
Licensed under either of MIT or Apache-2.0 at your option.