Skip to main content

Fonts

Supported formats#

FormatExtensionMime type
TrueType.ttffont/truetype
Embedded OpenType.eotfont/opentype
Web Open Font Format.woffapplication/font-woff
Web Open Font Format 2.woff2application/font-woff2

Adding a custom font#

Copying the file#

The font file should be copied in the assets/fonts folder.

Configuring the custom font#

The custom font needs to be configured in the fonts.yaml file.

Silom-Regular:
asset: assets/fonts/Silom-Regular.ttf
assetType: font/truetype
fontFamily: Silom
fontStyle: normal
fontWeight: 300
PropertyUsage
Silom-RegularAn unique identifier for the custom font
assetThe path to the previously copied font file
assetTypeThe mime type of the font (see supported formats)
fontFamilyThe family name of the font
fontStyleThe font style, normal or italic
fontWeightHow thick or thin characters in text should be displayed (from 100 to 900 ; 400 for normal, 700 for bold)