public final class Font extends NativeObjectContainer
DataLabelsPlugin.ID
plugin configuration.FontCallback
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_LINE_HEIGHT
Default line height, 1.2.
|
static Weight |
DEFAULT_WEIGHT
Default font weight,
Weight.NORMAL . |
Constructor and Description |
---|
Font()
Creates new font element, using the default values options.
|
Modifier and Type | Method and Description |
---|---|
String |
getFamily()
Returns the font family, follows CSS font-family options.
|
double |
getLineHeight()
Returns the height of an individual line of text.
|
String |
getLineHeightAsString()
Returns the height of an individual line of text.
|
int |
getSize()
Returns the font size.
|
FontStyle |
getStyle()
Returns the font style, follows CSS font-style options (i.e.
|
Weight |
getWeight()
Returns the font weight, follows CSS font-style-weight options.
|
void |
setFamily(String fontFamily)
Sets the font family, follows CSS font-family options.
|
void |
setLineHeight(double lineHeight)
Sets the line height.
|
void |
setLineHeight(String lineHeight)
Sets the line height.
|
void |
setSize(int fontSize)
Sets the font size.
|
void |
setStyle(FontStyle fontStyle)
Sets the font style, follows CSS font-style options (i.e.
|
void |
setWeight(Weight weight)
Sets the font weight, follows CSS font-style-weight options.
|
checkValue, empty, getArrayValue, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, keys, remove, remove, removeIfExists, setArrayValue, setArrayValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
public static final Weight DEFAULT_WEIGHT
Weight.NORMAL
.public static final double DEFAULT_LINE_HEIGHT
public void setSize(int fontSize)
fontSize
- the font size.public int getSize()
public void setStyle(FontStyle fontStyle)
fontStyle
- Font style, follows CSS font-style options (i.e. normal, italic, oblique, initial, inherit).public FontStyle getStyle()
public void setFamily(String fontFamily)
fontFamily
- Font family, follows CSS font-family options.public String getFamily()
public void setWeight(Weight weight)
weight
- font weight, follows CSS font-style-weight options.public Weight getWeight()
public void setLineHeight(double lineHeight)
lineHeight
- the line height.public void setLineHeight(String lineHeight)
lineHeight
- the line height.public double getLineHeight()
public String getLineHeightAsString()