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
51
//! Text layout for Smudge, backed by parley.
//!
//! This crate owns parley's font and layout contexts in a per-thread
//! [`TextSystem`], lays out text through [`TextLayout`], and shares a
//! [`TextStyle`] with widgets through reactive context.
//!
//! The fonts in this crate's `assets/fonts` directory are embedded by
//! default, so layout is deterministic and never depends on the fonts
//! installed on the host. System font discovery is opt-in through the
//! `system-fonts` feature and is unavailable on wasm.
//!
//! Without the `complex-scripts` feature, line and word breaks follow the
//! Unicode rules alone. Chinese and Japanese still wrap between characters,
//! but word selection treats each Han character as a word, and Thai, Lao,
//! Khmer and Burmese, which put no spaces between words, wrap only at
//! spaces. The feature compiles in the break dictionaries for those scripts,
//! at about 3 MB per binary and about 5 percent more layout time for other
//! text.
//!
//! ```
//! use smudge_text::{TextLayout, TextSystem, TextStyle};
//!
//! TextSystem::bundled_only().install();
//!
//! let style = TextStyle::default();
//! let layout = TextLayout::new("Hello, Smudge", &style, None);
//! assert!(layout.size().width > 0.0);
//! ```
pub use ;
pub use ;
pub use TextLayout;
pub use FontFamily;
pub use FontWeight;
pub use GenericFamily;
pub use ;
pub use TextSystem;
pub use ;
pub use ;