-
Notifications
You must be signed in to change notification settings - Fork 18
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
Feature request: loading fonts from SPIFFS/LittleFS #30
Comments
Hello I have same understanding and need. Loading from LittleFS Thanks! |
Here is the code I've used:
hope this helps |
OpenFontRender v1.2 now includes enhanced support for file systems. Sorry for the crazy slow response. |
Hi thanks a lot, I suggest you enapsulate the code I provided for littleFS in a method of your class then |
I tried this and while: I am using TFT_eSPI with PlatformIO on an ESP32 (although I'm not sure that is relevant) |
Could you share me your code? |
Here it is...
here is the code that executes in setup()
I'm re-checking the validity of the data and partition just to be sure. Thanks. |
Thank you share your code😄 Since access to the file system varies greatly from microcontroller to microcontroller, it is necessary to implement low-level functions for each microcontroller. See examples/M5Stack/load_from_spiffs if you want to use SPIFFS with ESP32. Unfortunately, there are no presets for LittleFS yet, so you have to create your own low-level functions. Please refer to examples/M5Stack/load_from_sd_without_preset for implementation. For a more detailed explanation, please refer to the documentation. Also note that even if the implementation is correct, if the font file size is large, it may not be possible to load the file due to insufficient memory in the microcontroller. |
LittleFS code was provided just for completeness. It (LittleFS) is NOT defined in this case, I can confirm I am using SPIFFS as I can access other files normally. I'll try again. |
I understood that you are not using LittleFS. |
Maybe I didn't quite get it yet but from what I understand OpenFontRender can only load fonts from SD card or binary (i.e. embedded in code).
Working with ESP32 it would be most helpful to be able to load fonts from the internal LittleFS file system.
The text was updated successfully, but these errors were encountered: