Explain where to upload .ttf font files (#1133)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
TheGroundZero 2021-05-12 16:42:50 +00:00 committed by GitHub
parent d2704ffc89
commit 11021e90cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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