Function pango::parse_variant

source ·
pub fn parse_variant(str: &str, warn: bool) -> Option<Variant>
Expand description

Parses a font variant.

The allowed values are “normal”, “small-caps”, “all-small-caps”, “petite-caps”, “all-petite-caps”, “unicase” and “title-caps”, case variations being ignored.

§str

a string to parse.

§warn

if true, issue a g_warning() on bad input.

§Returns

true if @str was successfully parsed.

§variant

a [Variant][struct@crate::Variant] to store the result in.