Which fonts are availabe for text items in Pavlovia experiments?

Hello Psychopy community

Last year I ran some experiments online with text elements that were presented in the font Courier. Now I can’t get that font to work in a new Pavlovia experiment, and in fact the old experiments - with no changes to the code - no longer present text the correct font. Courier shows up as some kind of serif, not-monospaced font.

On my local computer, Psychopy can present in whichever font I like. I made the most bare-bones little experiment with a single routine to put up words in Monospace, Courier, Courier New, Times, Times New Roman, and Arial. Here’s a screenshot:

The same little test experiment in Pavlovia presents Courier New and Arial correctly, but not Monospace or Courier. Both Times fonts appear to be the same serif font.

So my question is – which fonts are available in Pavlovia, and is there a way to get Courier back? Attached is the psyexp file for my font test experiment.

Many thanks
textTest.psyexp (16.8 KB)

Hi @alexlwhite,

My understanding is that locally run PsychoPy has access to most-any font you have saved on your computer, while Pavlovia has access to the fonts available on the participant’s browser. There is a list of web-safe fonts that should be correctly presented on most browsers. Maybe Courier used to be a web-safe font but has been replaced with Courier New?

Improving access to fonts on Pavlovia experiments is something the developers want to add, but in the meantime, the web-safe fonts are the best ones to try.

When I need strict control over the font of text stimuli, I prefer to make the stimuli in a separate software (such as Inkscape) then save my stimuli as images to use in the experiment. This gives me the most control over how stimuli are presented.

Hope that helps,

1 Like

Thank you!! That’s helpful.
The nice thing about using the built-in text function is that the letter size can be properly scaled (or at least, so I hope).
I’ll consider instead creating images of the letters to present in the experiment, but there are some hurdles to overcome to make sure the size and spacing are correct depending on the screen size, etc (for a web-based experiment).