-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use external fonts in code? #78
Comments
Hi! First use program: https://github.com/loboris/ESP32_TFT_library/tree/master/tools at last you can use new font: |
Thank you so much for your helpful reply... |
You must copy oxygen.c to ESP32_TFT_library\components\spiffs_image\image\fonts folder, then in command line use: to write new filesystem data to ESP |
After I copy .c file into \spiffs_image\image\fonts , is file will be automatically converted to the .fon type file? Because I'm stuck on converting from .c to .fon |
No, from this folder you copy files to ESP using flahfs command. Next you must use compile_font_file in your program to read .c file from ESP and make .fon file. Then you can use TFT_setFont(USER_FONT, "/spiffs/fonts/oxygen.fon"); |
Thank you for your really helpful replies. I got so far with your help. I did everything you wrote, everything on the code side looks okay, But I got still some issues.. |
Ok. Paste what debug shows |
I'm really beginner on Eclipse and IDF coding, sorry I don't understand clearly. Is that what you wanted me to send? Copied from Debugger Console. |
When I enter "make monitor", it says; What the reason could be? |
You are not doing correctly make makefs and make flashfs so you don't have file in ESP. |
This is the output of terminal, I tried to repeat all the process; `Musab@MUSAB-PC MINGW32 ~ Musab@MUSAB-PC MINGW32 ~/esp/workspace/ESP32_TFT_library-master Musab@MUSAB-PC MINGW32 ~/esp/workspace/ESP32_TFT_library-master Leaving... Musab@MUSAB-PC MINGW32 ~/esp/workspace/ESP32_TFT_library-master Project is not inside a git repository, will not use 'git describe' to determine PROJECT_VER. Leaving... Musab@MUSAB-PC MINGW32 ~/esp/workspace/ESP32_TFT_library-master rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) I (169) esp_image: segment 3: paddr=0x0003da90 vaddr=0x3ffb1920 size=0x034e0 ( 1 I (176) esp_image: segment 5: paddr=0x00041380 vaddr=0x40080400 size=0x0ac68 ( 4 I (0) cpu_start: App cpu up. ==============================
|
Hmmm... I don't know why it does't work. Try run standard fonts from flash, example:
|
Okay, thank you so much for your help, even so I'll keep trying. Do you think it's something important we need to consider? May can help? |
(Update) Changed to new microcontroller, still getting the same error... |
Does the original demo work if you just do |
I have another solution.
Now you don't need to write filesystem to ESP flash, just use make flash |
Thank you really much man... This solution works... You helped me a lot. |
Hi. I'm new on idf coding and got an issue about fonts. I created my own .c file font via ttf2c_vc2003.exe program. But I don't know how to use this external font in my code. Can somebody explain please?
Thanks in advance...
The text was updated successfully, but these errors were encountered: