Defines a font. Writes the necessary style to define the font for the website.

Groups several hylo-font-file components. Each defines one font weight/style of the font or a variable font. If static and variable font files are defined together, the static files are setup as fallback for the variable fonts.

<hylo-font path="path/to/font/folder">
<hylo-font-file file="ExtraLight.ttf" weight="200"></hylo-font-file>
<hylo-font-file file="ExtraLightItalic.ttf" weight="200" italic></hylo-font-file>
<hylo-font-file file="Regular.ttf" weight="400"></hylo-font-file>
<hylo-font-file file="Italic.ttf" weight="400" italic></hylo-font-file>
<hylo-font-file file="Bold.ttf" weight="700"></hylo-font-file>
<hylo-font-file file="Variable.ttf" variable="font-style: normal;"></hylo-font-file>
<hylo-font-file file="Variable-Italic.ttf" variable="font-style: italic;"></hylo-font-file>
</hylo-font>

Properties

Properties

name: string = 'DefaultFont'

The name of the font with which it is accessed in the styles.

path: string

The path to folder which holds the font files.

swap: boolean

Adds "font-display: swap;" to the style definition.

Generated using TypeDoc