mirror of
https://github.com/nopnop2002/esp-idf-ssd1306.git
synced 2024-10-03 18:18:47 -04:00
.. | ||
fonts | ||
main | ||
CMakeLists.txt | ||
partitions.csv | ||
README.md | ||
sdkconfig.defaults |
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.
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");