Hey everyone!
A while ago, I built a clock/alarm/timer project using Arduino-coding.
Now that I’ve started working with Home Assistant and ESPHome, I wanted to recreate that same digital clock look — and I thought I’d share my method here in case it’s useful for other hobbyists.
Fonts (DSEG)
You can download the free DSEG font family from here:
"DSEG": 7-segment and 14-segment free fonts
Or directly from GitHub:
DSEG v0.46 ZIP
Once downloaded, place the .ttf font files in your ESPHome configuration directory.
For my installation that’s in:
/home/homeassistant/config/
Here’s my setup for an SSD1306 128x32 OLED display:
display:
- platform: ssd1306_i2c
model: "SSD1306 128x32"
And here’s the corresponding font configuration:
font:
- file: "gfonts://Roboto"
id: roboto
size: 12
- file: "Segment/DSEG7Modern-Regular.ttf"
id: font_clock_modreg_large
size: 32
If you have a different font type,like .otf, convert it to .bdf using otf2bdf.
( .otf → OpenType fonts (met PostScript of TrueType outlines)
You can download the free OTF font family from here:
OTF Fonts
Install the converter:
sudo apt install otf2bdf
Convert the font:
otf2bdf -p 24 BrontidevpDemoStyle2-ZV8E3.otf > BrontidevpDemoStyle2_24.bdf
cp to /home/homeassistant/config/demo/
Then reference it in ESPHome:
font:
- file: "gfonts://Roboto"
id: roboto
size: 12
- file: "demo/BrontidevpDemoStyle2_24.bdf"
id: font_clock_modreg24
size: 24

