FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    FerroTextService

    struct · ferroui-pretext-media · v0.5.0

    struct FerroTextService
    

    A fixed-font native measurement and glyph-shaping service.

    View source

    Members

    try_measure_text

    fn try_measure_text(self: &Self, text: &str) -> Result<f64, PretextError>
    

    Measures with the same shaping and font fallback as native drawing, without allocating portable glyph records or drawing resources.

    Source

    shape_native

    fn shape_native(self: &Self, text: &str, options: PretextShapeOptions) -> Result<FerroShapedText, PretextError>
    

    Shapes through the framework's Unicode bidi, font fallback and platform shaping services and retains the actual native font faces for drawing.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.