PgMiscellaneous.parseWeight

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

class PgMiscellaneous
static
int
parseWeight
(
string str
,,
int warn
)

Parameters

str string

a string to parse.

weight PangoWeight

a PangoWeight to store the result in.

warn int

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

Return Value

Type: int

TRUE if str was successfully parsed.

Meta