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
42
43
44
45
46
47
48
49
50
//! Optional single-line screen labels using Sim;Engine's font implementation.
//!
//! Fonts and validated label values can be created and inspected without a
//! window or GPU. `headless-text` with default features disabled also omits
//! GPU compile dependencies. `text` adds Engine's GPU bridge; `fonts` alone
//! exposes CPU font primitives without enabling managed labels.
//! Font discovery, fallback, wrapping, text input, and widgets are not included.
//!
//! ```no_run
//! use sim_logic::prelude::*;
//!
//! # fn main() -> LogicResult {
//! #[derive(Clone, Copy, PartialEq, Eq, Hash)]
//! enum Action {}
//! let mut app = Application::<Action>::new(AppConfig::default())?;
//! let font = app.register_font(
//! std::fs::read("assets/your-font.ttf")?,
//! TextSettings::new(24.0)?,
//! )?;
//! let mut label = ScreenTextVisual::new(
//! font, "Привет, мир!", LogicalScreenPosition::new(400.0, 64.0),
//! )?;
//! label.set_alignment(TextAlignment::Center)?;
//! label.set_text("Ready")?;
//! # Ok(())
//! # }
//! ```
//!
//! Before spawning labels, opt into nonzero text source/byte/glyph allowances
//! on [`crate::render::RenderLimits`]. Desktop drawing also needs enough frame
//! texture allowance for every referenced font atlas. Preparing a value alone
//! does not enlarge these limits or draw anything.
pub use ;
pub use TextError;
pub use TextFont;
pub use TextRegistry;
pub use TextPreparationSession;
pub use ;
pub use ;