Hi, I’m trying to get the vector fonts working on my Pico 2W with attached Pico Display 2.8 (DISPLAY_PICO_DISPLAY_2).
See the program below which I adapted from a Presto-example
from picographics import PicoGraphics, DISPLAY_PICO_DISPLAY_2 # type: ignore
from picovector import PicoVector, ANTIALIAS_X4 # type: ignore
#SET DISPLAY
display = PicoGraphics(display=DISPLAY_PICO_DISPLAY_2)
display.set_backlight(0.8)
vector = PicoVector(display)
vector.set_antialiasing(ANTIALIAS_X4)
result = vector.set_font('IndieFlower-Regular.af', 50) # font from https://github.com/lowfatcode/alright-fonts/tree/main/sample-fonts, stored in root on filesystem
print(result)
#SET PALETTE
WHITE = display.create_pen(255,255,255)
GREY = display.create_pen(20,20,20)
# BG
display.set_pen(GREY)
display.clear()
#SET PEN AND DISPLAY TEXT
display.set_pen(WHITE)
vector.text("Hello World!", 60, 90, 0)
#UPDATE SCREEN
display.update()
print('program done')
The issue is with the vector.set_font(‘IndieFlower-Regular.af’, 50). This one does not work, it returns False. And, even worse, when I run this code line twice my Pico 2W crashes (no communication anymore with Thonny).
The font file itself is there and can be found (different error when I change the file name). Display itself is working fine as well (can use normal bitmap fonts etc) but nothing happens when I try to write anything (vector.text(“Hello World!”, 60, 90, 0)).
What am I missing? Anybody else tried vector fonts outside of the Presto-HW?
I’m using the MicroPython uf2 pico2_w_2025_09_19-uf2 from pimoroni (1.26.1).