Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] Font size issues with Mac

edited June 2014 in OpenSesame

Hello there,

I am running into a font size problem with OpenSesame when I try and run an experiment on our Mac. We also have a PC, and it isn't an issue on there.

Basically, I have a text display item to display the instructions of the task, and I can't change the font size. In fact, the only thing I can edit and actually change about it besides what it says is the color. If I change the font family from mono to sans, it says in the script that is sans, but when I run the experiment it appears as mono still. The same thing is happening with the font size (which is the more pressing issue because the size is too small.) It seems to be stuck at size 18 font even though I've tried to change it multiple times. I even tried using HTML tags, but it still didn't work.

If anyone knows how to help, that would be great. Thanks!


  • edited 6:09AM

    It sounds like OpenSesame is unable to find the font files, and falls back to some default font. What you could try is switch to another back-end and/ or choose a custom font (i.e. using 'Other ...') in the font selection dialog.

    If this doesn't work, could you provide some more information:

    • Mac OS version
    • OpenSesame version and package
    • The back-end that you are using
    • Does this happen with all experiments and all items, or just in specific cases?


  • edited 6:09AM

    I apologize I misspoke before. We are having this problem when creating a text box on a sketchpatch. No matter which size we write in, it appears small when we run the experiment. It worked when I tried a different backend but we need the psychopy backend for our experiment.

    We have the MountLion Mac OS X 10.8.4
    The latest 32 bit open sesame
    psychopy backend
    happens for all text on sketchpads

  • edited 6:09AM

    I don't have a Mac myself. But since Daniel (who builds the Mac OS packages) is on a holiday, I'll try to shine some light on this anyway...

    Clearly, this has to do with PsychoPy not finding the font files.

    1) Have you tried selecting a custom font in OpenSesame? So not 'mono', 'sans', or 'serif' but one of the system fonts that you can select under 'other ...'. If so, does this work or do you still see a fallback font?

    2) What happens if you use PsychoPy directly, in a script? For example, the following script should show the text 'Testing!' in Courier New font. I assume that you have Courier New on your system. If not, select another font that you know is available. Also, you may want to add a keyboard_response item after the script, so that you have the chance to see the text.

    from psychopy import visual
    # Create text stimulus
    ts = visual.TextStim(win, 'Testing!', font='Courier New')
    # Draw the stimulus
    # Update the display!

    If this also shows a fallback font, then PsychoPy hasn't found the Courier New font on your system, even though it should. In that case, you can use the fontList keyword to specify the font files directly, like so:

    from psychopy import visual
    fontFiles = ['/usr/share/fonts/truetype/msttcorefonts/Courier_New.ttf']
    ts = visual.TextStim(win, 'testing!', font='Courier New', fontFiles=fontFiles)

    You have to change the path to the font, depending on where the .ttf file is located on your system. For more information, see:

    Let me know if one of these approaches works for you!


Sign In or Register to comment.