Function pango::functions::parse_weight [−][src]
pub fn parse_weight(str: &str, warn: bool) -> Option<Weight>
Expand description
Parses a font weight. The allowed values are “heavy”, “ultrabold”, “bold”, “normal”, “light”, “ultraleight” and integers. Case variations are ignored.
str
a string to parse.
warn
if true
, issue a g_warning()
on bad input.
Returns
true
if str
was successfully parsed.
weight
a Weight
to store the result
in.