Preview 2.0 is now in Public Beta!
Read the Announcement
Note: You are on the beta version of our docs. This is a work in progress and may contain broken links and pages.
Font
Font

Summary

Constructors

constructor

new Font(family: string, size: number, style?: FontStyleType, weight?: FontWeightType, scale?: number, fontVariationSettings?: FontVariationSettings[]): Font
Parameter Default Description
family
string

size
number

style
FontStyleType

weight
FontWeightType

scale
number

fontVariationSettings
FontVariationSettings[]

Returns Font

Properties

fontFamily

fontFamily: string

fontScale

fontSize

fontStyle

fontStyle: FontStyleType

fontVariationSettings

fontVariationSettings?: FontVariationSettings[]

fontWeight

fontWeight: FontWeightType

isBold

isItalic

default

Static

Methods

getAndroidTypeface

getAndroidTypeface(): any

getUIFont

getUIFont(defaultFont: any): any
Parameter Default Description
defaultFont
any

Returns any

withFontFamily

withFontFamily(family: string): Font
Parameter Default Description
family
string

Returns Font

withFontScale

withFontScale(scale: number): Font
Parameter Default Description
scale
number

Returns Font

withFontSize

withFontSize(size: number): Font
Parameter Default Description
size
number

Returns Font

withFontStyle

withFontStyle(style: FontStyleType): Font
Parameter Default Description
style
FontStyleType

Returns Font

withFontVariationSettings

withFontVariationSettings(variationSettings: FontVariationSettings[]): Font
Parameter Default Description
variationSettings
FontVariationSettings[]

Returns Font

withFontWeight

withFontWeight(weight: FontWeightType): Font
Parameter Default Description
weight
FontWeightType

Returns Font

equals

Static
equals(value1: Font, value2: Font): boolean
Parameter Default Description
value1

value2

Returns boolean
Previous
Folder