parseWeight

Parses a font weight.

The allowed values are "heavy", "ultrabold", "bold", "normal", "light", "ultraleight" and integers. Case variations are ignored.

bool
parseWeight
(
string str
,,
bool warn
)

Parameters

str string

a string to parse.

weight pango.types.Weight

a pango.types.Weight to store the result in.

warn bool

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

Return Value

Type: bool

true if str was successfully parsed.