-
Notifications
You must be signed in to change notification settings - Fork 29
UI.makeFont
kerrishotts edited this page Apr 1, 2013
·
1 revision
(part of UI)
Returns: font
Parameters: family (string), size (number), [weight (string)]
Returns a font object of the form { family: family, size: size, weight: weight }
. If weight
is not specified, "normal" is assumed.
Note: family
can contain more than one font, just like CSS. Also, should family names with spaces be needed, enclose in the opposite quote.
Note: size
is in pixels when translated to CSS.
Note: weight
can be any of the CSS values for font weights.
var aFont = UI.makeFont ( "Helvetica", 20, "bold" );
// aFont is { family: "Helvetica", size: 20, weight: "bold" );
0.3 Introduced; Docs Valid