How to load fonts from external source

What do you want to achieve?

Store and load font bitmaps from an external source (QSPI flash in my case but I can handle that in the file system driver I think).

What have you tried so far?

I see that in the Project Settings I can configure my images to be exported as binaries and specify the “drive” to retrieve them from. I am not seeing anything similar for fonts. When I create a font, I see the console convert it to a binary but not stored in the “drive” like the image assets are. It is also unclear how the generated sources will know how to find externally stored fonts. Will the exported code be modified to use lv_binfont_create?

How can I have the montserrat fonts stored externally as well, not just fonts I create.

Screenshot or video

Others

  • SquareLine Studio version: 1.4.0
  • Operating system: Windows 11
  • Target hardware:

It’s a desirable feature, thanks for mentioning it. This will probably be realized soon.

@hermit, did this make it into reality yet? I’ve just hit the exact same problem. I have 16Mb of QSPI flash storage sitting empty meanwhile my Squareline project will not compile due to being slightly bigger than 2Mb mainly due to a 200pt font that I need for the main display. cheers, Giles

No, it’s not realized yet AFAIK. If these are only numbers or certain letters that you need as large as this, you might be able to reduce the overall flash-size by selecting thos or limiting the range to those in the font-converter.

Thanks @hermit, I have subsetted the font and got back down to 80% memory usage, good for the moment :slight_smile:

You dont show your target, but for example ESP can use bigger app partition as 2M. And when you have static big font use images instead. Images can be stored on QSPI data …

Thanks @Marian_M, this is for a fluctuating temperature and humidity display, so I’ve subsetted to 0-9 . C % which has it sorted for the moment but it’s definitely a desirable feature to be able to use fonts from the QSPI storage.