PgMiscellaneous.parseWeight

Parses a font weight.

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

struct PgMiscellaneous
static
bool
parseWeight
(
string str
,,
bool warn
)

Parameters

str string

a string to parse.

weight PangoWeight

a PangoWeight 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.

Meta