1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Text rendering for UI and 3D world text.
//!
//! Render text with SDF (Signed Distance Field) fonts for crisp scaling:
//!
//! - [`TextProperties`]: Font size, color, alignment, outline settings
//! - [`load_font_from_bytes`]: Load custom SDF fonts
//!
//! # Text Properties
//!
//! | Property | Description | Default |
//! |----------|-------------|---------|
//! | `font_size` | Size in pixels | 16.0 |
//! | `color` | RGBA color | White |
//! | `alignment` | Left, Center, Right | Left |
//! | `vertical_alignment` | Top, Middle, Bottom, Baseline | Baseline |
//! | `line_height` | Line spacing multiplier | 1.2 |
//! | `letter_spacing` | Extra space between characters | 0.0 |
//! | `outline_width` | Outline thickness | 0.0 |
//! | `outline_color` | Outline RGBA color | Black |
//!
//! # Loading Custom Fonts
//!
//! Load SDF fonts generated with tools like msdf-atlas-gen:
//!
//! ```ignore
//! let font_data = include_bytes!("../assets/my_font.ttf").to_vec();
//! let font_index = load_font_from_bytes(world, font_data, 48.0)?;
//! ```
//!
//! [`TextProperties`]: components::TextProperties
//! [`load_font_from_bytes`]: commands::load_font_from_bytes
pub mod commands;
pub mod components;
pub mod resources;
pub mod systems;
pub use commands::*;
pub use components::*;
pub use resources::*;
pub use systems::*;