Loading font from bin file in micropython using v9.1

Hi, I am trying to load a font file on a Waveshare RP2350-Touch-LCD-1.28, I have looked at the docs and searched the forum and it says it should be done like this:

font = lv.binfont_create("S:/xxxxxxx.bin")

However I can’t get it to work. I’m using the devices flash storage and not an external SD card so I’m not sure if that drive letter is correct. I have tried all drive letters from A-Z and all result in None when I log what has been loaded, all apart from M: which curiously seems to crash the device when I try and use it…

Am I doing something wrong or can I not load fonts from flash storage?

Thanks for any help!

You need to import the file-system driver before you can load the font.
It works like this when you load a font from internal flash.
I don’t know how it’s done with an sd card but maybe this helps a little.

import fs_driver

# Register file system driver
fs_drive_letter = 'S' # Can be any letter
fs_font_driver = lv.fs_drv_t()
fs_driver.fs_register(fs_font_driver, fs_drive_letter)

teko_36 = lv.binfont_create(fs_drive_letter + ':' + 'Teko_36l.bin')