Serg_pr Posted February 22, 2016 Report Share Posted February 22, 2016 How to use fonts stored on external memory. For example, in ROMFS. Is it possible at all? Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted February 22, 2016 Report Share Posted February 22, 2016 Hello and welcome to the community! The font engine requires fonts to be present in addressable memory. Therefore, if you have an external addressable memory you just have to tell your linker (script) to put the converted font into the external memory and you are done, no file system required - The code stays exactly the same, just the address of the font will change. Loading from other external memory sources such as SD-Cards is currently not possible. Adding support for that is a very low priority task for us as even smaller MCUs tend to have more than enough spare ROM to store a few dozen fonts these days. Proper filter ranges and RLE will further reduce the font size. It's better to keep other resources that are easier to outsource in external memory such as images. Link to comment Share on other sites More sharing options...
Serg_pr Posted February 22, 2016 Author Report Share Posted February 22, 2016 Thanks for the answer, and it is very sad. My board has little memory. I can use a buffer for fonts? But it is better to use a flash memory (it is addressable, but to access the data required reading function - pgm_read_byte(...) ... pgm_read_block(...) Push me in the right direction. (and sorry for my english) Link to comment Share on other sites More sharing options...
inmarket Posted February 27, 2016 Report Share Posted February 27, 2016 fonts are defined using "static const". This generally puts them into code space (not RAM) and is the most efficient place for them to be on most micro's. Any situation where the font is stored in external flash (or an SD-Card) would require the font to be read back into RAM and then relocated before it could be used. The full font image would therefore be held in RAM for it to be used. This is not a simple job and we currently don't support this. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now