<< Click to Display Table of Contents >>
new sg.symbols.Font(size_or_json, style, variant, weight, family)
Description
create a new Font object.
Position
Symbol.js
Parameters
Parameter |
Type |
Description |
size_or_json |
Number |
font size |
style |
String |
font style |
variant |
String |
font variant |
weight |
String |
font weight |
family |
String |
font family |
Constants
Constants |
Description |
STYLE_ITALIC |
Italic style. |
STYLE_NORMAL |
normal style. |
SYTLE_OBLIQUE |
oblique style. |
VARIANT_NORMAL |
normal font |
VARIANT_SMALLCAPS |
smallcaps font |
WEIGHT_BOLD |
bold font |
WEIGHT_BOLDER |
bolder font |
WEIGHT_LIGHTER |
lighter font |
WEIGHT_NORMAL |
normal font |
Properties
Properties |
Type |
Description |
decoration |
String |
font decoration. There are three decoration types: "underline", "line-through", and "none". |
family |
String |
font family |
size |
Number |
font size |
style |
String |
font style |
variant |
String |
font variant |
weight |
Number |
font weight |
Methods
Methods |
Type |
Description |
||||||
setDecoration(decoration) |
String |
define font decoration.
|
||||||
setFamily(family) |
String |
define font family
|
||||||
setSize(size) |
Number |
define font size.
|
||||||
setStyle(style) |
String |
define font style. See Constants table for values.
|
||||||
setVariant(variant) |
String |
define font variant.
|
||||||
setWeight(weight) |
Number |
define font weight.
|
Example
|
©2015 Supergeo Technologies Inc.