Abstract
Protected
_nativeStatic
iosStatic
DEFAULTDefault font family. This might be different for Android and iOS.
0.1
Static
IOS_Default iOS System font family. Only works on iOS.
0.1
Static
NORMALRepresents normal font style
0.1
Static
BOLDRepresents bold font style
0.1
Static
Readonly
ITALICRepresents italic font style
0.1
Static
BOLD_Represents both bold and italic font style
0.1
Gets/sets size of font.
4.2.3
Gets/sets size of font.
4.2.3
Protected
preAbstract
sizeProtected
createStatic
create0.1 Creates a font instance with the given family name, size and style. Assigning font style is deprecated usage (may not work mostly) instead font name parameter must be specified according to actual name of font. To obtain actual font name for iOS, use UI.Font#allFontNames allFontNames method. The actual name is same as named of font file in Android.
import Font from '@smartface/native/ui/font';
import Label from '@smartface/native/ui/label';
const myLabel = new Label({
font: Font.create("Arial-ItalicMT", 16)
});
myLabel.text = "Label text";
Optional
style: FontStyleStatic
createCreates a font instance with the given file path and size.
import Font from '@smartface/native/ui/font';
import Label from '@smartface/native/ui/label';
const myLabel = new Label({
font: Font.createFromFile("assets://MyFont.ttf", 16)
});
myLabel.text = "Label text";
0.1
Generated using TypeDoc
iOS Only Static Properties