FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    FontWeight

    struct · ferroui-base · v0.5.0

    struct FontWeight
    

    Defines a set of predefined font weights.

    As defined by the OpenType specification, a font weight is any value in the range 1..=1000 (variable fonts and the OS/2 table produce values between the named ones), so this is an open set: a number with named constants.

    View source

    Members

    0

    0: i32
    

    Source

    Thin

    const Thin: FontWeight
    

    Specifies a "thin" font weight.

    Source

    ExtraLight

    const ExtraLight: FontWeight
    

    Specifies an "extra-light" font weight.

    Source

    UltraLight

    const UltraLight: FontWeight
    

    Specifies an "ultra-light" font weight.

    Source

    Light

    const Light: FontWeight
    

    Specifies a "light" font weight.

    Source

    SemiLight

    const SemiLight: FontWeight
    

    Specifies a "semi-light" font weight.

    Source

    Normal

    const Normal: FontWeight
    

    Specifies a "normal" font weight.

    Source

    Regular

    const Regular: FontWeight
    

    Specifies a "regular" font weight.

    Source

    Medium

    const Medium: FontWeight
    

    Specifies a "medium" font weight.

    Source

    DemiBold

    const DemiBold: FontWeight
    

    Specifies a "demi-bold" font weight.

    Source

    SemiBold

    const SemiBold: FontWeight
    

    Specifies a "semi-bold" font weight.

    Source

    Bold

    const Bold: FontWeight
    

    Specifies a "bold" font weight.

    Source

    ExtraBold

    const ExtraBold: FontWeight
    

    Specifies an "extra-bold" font weight.

    Source

    UltraBold

    const UltraBold: FontWeight
    

    Specifies an "ultra-bold" font weight.

    Source

    Black

    const Black: FontWeight
    

    Specifies a "black" font weight.

    Source

    Heavy

    const Heavy: FontWeight
    

    Specifies a "heavy" font weight.

    Source

    Solid

    const Solid: FontWeight
    

    Specifies a "solid" font weight.

    Source

    ExtraBlack

    const ExtraBlack: FontWeight
    

    Specifies an "extra-black" font weight.

    Source

    UltraBlack

    const UltraBlack: FontWeight
    

    Specifies an "ultra-black" font weight.

    Source

    value

    const fn value(self: Self) -> i32
    

    The numeric weight (C# (int)weight).

    Source

    try_parse_ignore_case

    fn try_parse_ignore_case(s: &str) -> Option<Self>
    

    Parses a weight name, ignoring case (C# Enum.TryParse(token, true, ..) restricted to names; numbers are handled by FromStr).

    Source

    Trait implementations

    Availability

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