esp-idf-ssd1306/FreeTypeDemo
2024-09-08 12:22:52 +09:00
..
fonts added FreeTypeDemo 2024-09-08 12:15:46 +09:00
main added FreeTypeDemo 2024-09-08 12:15:46 +09:00
CMakeLists.txt added FreeTypeDemo 2024-09-08 12:15:46 +09:00
partitions.csv added FreeTypeDemo 2024-09-08 12:15:46 +09:00
README.md Update README.md 2024-09-08 12:22:52 +09:00
sdkconfig.defaults added FreeTypeDemo 2024-09-08 12:15:46 +09:00

FreeTypeDemo for SSD1306

FreeType components are published in the ESP Component Registry.
The github page is here.
This component can convert a True Type Font to a bitmap image.

Please note that if you use a proportional font, some fonts may not convert correctly.
Monospaced fonts can be converted correctly.
You can find Monospaced fonts here.

FreeTypeDemo

How to use True Type font.

  • Download Monospaced fonts from internet.

  • Copy font file to fonts directory.

  • Select font.
    load_font("/fonts/consola.ttf");

  • Specify the display position and threshold.
    The lower the threshold, the thicker the text. The larger the threshold, the thinner the text.
    render_text(&dev, 0, 16, 128, "FreeType");