Skip to content

Commit c74667e

Browse files
authored
Update font renderer example to avoid number to string ambiguity
If someone would add numeric characters (say `0`) like in the affected example, this error would occur: ``` Must be string, got <class 'esphome.helpers.EInt'>. did you forget putting quotes around the value?. - 0 ``` Instead, the numeric characters should be listed in a string with the other plain ones. The specials can still be added on new rows, even with commas if desired.
1 parent d6bb477 commit c74667e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

components/font.rst

+6-5
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,13 @@ Next, create a ``font:`` section in your configuration:
5252
size: 28
5353
bpp: 4
5454
glyphs: [
55-
a,A,á,Á,e,E,é,É,
55+
0123456789aAáÁeEéÉ,
5656
(,),+,-,_,.,°,•,µ,
57-
"\u0020", #space
58-
"\u0021", #!
59-
"\u0022", #"
60-
"\u0027", #'
57+
"\u0020", # space
58+
"\u002C", # ,
59+
"\u0021", # !
60+
"\u0022", # "
61+
"\u0027", # '
6162
]
6263
6364
- file: "fonts/RobotoCondensed-Regular.ttf"

0 commit comments

Comments
 (0)