Font customization
Applies to: v0.5 or newer
FlorisBoard offers a variety of customization options for fonts with themes.
Font family#
FlorisBoard by default uses the font installed in the system. This can be overridden with themes though. Generally, there are two types of fonts: generic fonts, and custom fonts.
Generic Fonts#
Without any further setup, FlorisBoard supports five different font families, as shown below:
| Name | Example |
|---|---|
system |
Example text. |
sans-serif |
Example text. |
serif |
Example text. |
monospace |
Example text. |
cursive |
Example text. |
These can be used by assigning a generic font family value to the font-family property.
Custom fonts#
Custom fonts are defined via one ore multiple font source sets. Each font source set can use a different source file.
Before custom fonts can be used, they have to be imported to the theme extension.
Custom font source set#
The source set defining the font.
Possible properties:
Source#
The URI reference which font asset should be used
- Property name:
source
| Property value | Description |
|---|---|
uri(`<path>`) |
Defines the URI which should be resolved to load the font |
Font size#
Controls the size of the text to be rendered.
- Property name:
font-size - Inherits implicitly: yes
| Property value | Description |
|---|---|
<num>sp |
Defines the font size in scale-independent pixels.<num> must be an integer >= 1. |
Font style#
Controls whether text is rendered in normal or italic style.
- Property name:
font-style - Inherits implicitly: yes
| Property value | Example |
|---|---|
normal |
Example text. |
italic |
Example text. |
Font weight#
Controls the weight of the text to be rendered.
- Property name:
font-weight - Inherits implicitly: yes
| Property value | Example |
|---|---|
thin or 100 |
Example text. |
extra-light or 200 |
Example text. |
light or 300 |
Example text. |
normal or 400 |
Example text. |
medium or 500 |
Example text. |
semi-bold or 600 |
Example text. |
bold or 700 |
Example text. |
extra-bold or 800 |
Example text. |
black or 900 |
Example text. |