Fonts
#
Supported formatsFormat | Extension | Mime type |
---|---|---|
TrueType | .ttf | font/truetype |
Embedded OpenType | .eot | font/opentype |
Web Open Font Format | .woff | application/font-woff |
Web Open Font Format 2 | .woff2 | application/font-woff2 |
#
Adding a custom font#
Copying the fileThe font file should be copied in the assets/fonts
folder.
#
Configuring the custom fontThe custom font needs to be configured in the fonts.yaml
file.
Property | Usage |
---|---|
Silom-Regular | An unique identifier for the custom font |
asset | The path to the previously copied font file |
assetType | The mime type of the font (see supported formats) |
fontFamily | The family name of the font |
fontStyle | The font style, normal or italic |
fontWeight | How thick or thin characters in text should be displayed (from 100 to 900 ; 400 for normal, 700 for bold) |