mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-09-27 04:13:07 +02:00
Explain where to upload .ttf font files (#1133)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
d2704ffc89
commit
11021e90cf
@ -134,19 +134,21 @@ specific sizes, with ESPHome you have the option to use **any** TrueType (``.ttf
|
||||
at **any** size! Granted the reason for it is actually not having to worry about the licensing of font files :)
|
||||
|
||||
To use fonts you first have to define a font object in your ESPHome configuration file. Just grab
|
||||
a ``.ttf`` file from somewhere on the Internet and create a ``font:`` section in your configuration:
|
||||
a ``.ttf`` file from somewhere on the internet and place it, for example,
|
||||
inside a ``fonts`` folder next to your configuration file.
|
||||
|
||||
Next, create a ``font:`` section in your configuration:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
font:
|
||||
- file: "Comic Sans MS.ttf"
|
||||
- file: "fonts/Comic Sans MS.ttf"
|
||||
id: my_font
|
||||
size: 20
|
||||
|
||||
display:
|
||||
# ...
|
||||
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **file** (**Required**, string): The path (relative to where the .yaml file is) of the TrueType font
|
||||
|
Loading…
Reference in New Issue
Block a user