kova_native_text/lib.rs
1//! Text for Kova Native.
2//!
3//! Text is a first-class part of the framework:
4//!
5//! * [`TextSystem`] owns the font database (system fonts + loaded fonts),
6//! font fallback (emoji, CJK, symbols) and glyph rasterization with
7//! subpixel positioning at any HiDPI scale.
8//! * [`TextLayout`] holds shaped (HarfBuzz-compatible shaping, kerning,
9//! ligatures, BiDi), wrapped and measured text, and answers hit-testing,
10//! caret and selection geometry queries.
11//! * [`TextStyle`] describes how text looks.
12
13mod layout;
14mod style;
15mod system;
16
17pub use layout::{GlyphInstance, LineMetrics, TextLayout};
18pub use style::{FontStyle, FontWeight, LineHeight, TextAlign, TextStyle, TextWrap};
19pub use system::{GlyphKey, RasterizedGlyph, TextSystem};
20
21#[cfg(test)]
22mod tests;
23
24/// Generic family name resolved to the platform monospace font
25/// (Cascadia Mono / Consolas on Windows, SF Mono / Menlo on macOS, ...).
26pub const MONOSPACE: &str = "monospace";