bevy_text_mesh   
 
 
A bevy 3D text mesh generator plugin for displaying text in 3D scenes

The text mesh is generated at runtime from runtime-tessellated (and cached) TrueType font glyphs. Tessellation of glyphs is done with C-based github.com/fetisov/ttf2mesh library that is being interfaced through Rust-based FFI API (see ttf2glyph-rs).
Known limitations
Consider this as a preview of the plugin for gathering feedback about the API:
- The API will change in future - still iterating
 - Multiple 
TextMeshconfiguration fields are not implemented yet, see example below - Text color update is not implemented yet
 - Spacing of characters are incorrect
 - Mesh cache purging is not implemented - this implementation will leak memory (see #2)
 - WASM builds are not supported (see #11)
 
Bevy versions support table
| bevy | bevy_text_mesh | 
|---|---|
| 0.10 | 0.6.0 | 
| 0.9 | 0.5.0 | 
| 0.8 | 0.4.0 | 
| 0.7 | 0.2.0 | 
| 0.6 | 0.1.0 | 
| 0.5 | 0.0.2 | 
Usage
Prequisites
Prequisites (for compiling ttf2mesh-rs):
apt-get install build-essential patch
Running the examples
See the examples -folder.
git clone https://github.com/blaind/bevy_text_mesh.git
cd bevy_text_mesh
cargo run --example 3d_scene --release # or
cargo run --example performance --release
Integrating to your Bevy App
Add to Cargo.toml:
[dependencies]
bevy_text_mesh = "0.6.0"
Include the library:
use *;
Second, add a TextMeshPlugin to your app:
build
    ...
    .add_plugin
    ...;
Then, add the desired TrueType-fonts (with suffix .ttf) into your assets folder, a good convention is to store them to assets/fonts folder.
For example, see Fira fonts. Please read also their LICENSE.
mkdir -p assets/fonts
wget https://github.com/mozilla/Fira/raw/master/ttf/FiraSans-Medium.ttf -O assets/fonts/FiraSans-Medium.ttf
Next, you are ready to spawn a text in your scene at a system:
First, load a font asset:
let font:  = asset_server.load;
Then, spawn a textmesh bundle:
commands.spawn;
Or with expanded syntax:
commands.spawn;
License
Licensed under MIT license
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the software by you, shall be licensed as above, without any additional terms or conditions.