Problem with ESPHome and Font:

Hi,

Hope someone can help as I’ve spent hours searching for an answer - wore chatGPT out :slight_smile:

I’m trying to use:

font:
  - file: "fonts/arial.ttf"
    id: arial_98
    size: 98

but as soon as I do I get an error:
FT_Exception: (unknown file format)

The font is in ESPHome/fonts and I do believe I have pillow installed.

Couild anyone offer som elight on what I’m doing wrong.

Thanks in advance
Dave

It’s telling you that the file is not what it purports to be. Make sure you’re using the latest ESPHome and get another copy of the font, or use the gfonts option to download it automatically.

Many thanks @clydebarrow , it was a problem with the file, I’d used
“wget travis-scripts/fonts/Arial.ttf at c1096d3f9560f8c102c8771d3de4fce548d44efa · matomo-org/travis-scripts · GitHub” from within the temrinal window. I deleted it and then went to File Editor and to ESPHome/Fonts and just uploaded a known good version from my PC, and it all worked fine.

Cheers
Dave