public final class Font extends NativeObjectContainer
FontCallback
Constructor and Description |
---|
Font()
Creates new font element.
|
Modifier and Type | Method and Description |
---|---|
String |
getFamily()
Returns the font family, follows CSS font-family options.
|
double |
getLineHeight()
Returns the line height.
|
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 |
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.
|
getArrayValue, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, 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 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 double getLineHeight()