Skip to main content

mln_engine/text/
mod.rs

1//! Text shaping and glyphs.
2//!
3//! Font faces shape with HarfRust and draw their glyphs from skrifa's
4//! hinted outlines (`shaper.rs`). Arabic text drawn with glyph PBFs takes
5//! presentation forms instead (`arabic.rs`).
6//!
7//! Glyph requests (`glyph_store`), the font-face engine
8//! ([`font_face_engine`]) and the device's fonts ([`system_fonts`], with the
9//! `system-fonts` feature) are the engine's own.
10
11mod arabic;
12#[rustfmt::skip]
13mod arabic_tables;
14pub mod atlas;
15mod bidi;
16#[rustfmt::skip]
17mod bidi_mirroring;
18#[cfg(target_family = "wasm")]
19pub mod browser_glyph_rasterizer;
20pub mod constants;
21mod face;
22pub mod font_face_engine;
23#[cfg(any(feature = "system-fonts", target_family = "wasm"))]
24pub(crate) mod font_name;
25pub(crate) mod font_stack;
26pub mod glyph;
27pub(crate) mod glyph_cache;
28pub mod glyph_pbf;
29pub(crate) mod glyph_store;
30mod line_breaks;
31pub mod local_fonts;
32mod rasterize;
33mod shaper;
34pub mod shaping;
35#[cfg(test)]
36mod shaping_test;
37#[cfg(feature = "system-fonts")]
38pub mod system_fonts;
39pub mod tagged_string;
40pub mod tiny_sdf;
41pub(crate) mod weight;
42mod woff;
43
44pub use arabic::shape_arabic;
45pub use bidi::{BiDiRun, starts_right_to_left, visual_runs};
46#[cfg(all(feature = "system-fonts", not(target_family = "wasm")))]
47pub(crate) use face::FontFile;
48pub use glyph::{
49    Bounds, Glyph, GlyphID, GlyphIDType, GlyphMap, GlyphMetrics, GlyphPosition, GlyphPositions, GlyphRange,
50    PositionedGlyph, PositionedLine, ShapeResults, Shaping,
51};
52pub use glyph_cache::GlyphCache;
53pub use shaper::{GlyphAdjust, ShapedText, Shaper};
54pub use shaping::{PositionedIcon, ShapingOptions, anchor_alignment, anchor_justification, shape_text};
55pub use tagged_string::{SectionOptions, TaggedString};
56
57#[cfg(test)]
58mod tests;