psychopy.org | Reference | Downloads | Github

Persian font issue: cropped

OS:Win10
PsychoPy version: 3.0.4

I want to run a lexical decision task in Persian. The “B Nazanin” font is shown nicely, but the top and the bottom part of some characters are cropped.

Hi, am glad that you are getting some value from the Persian/Arabic text option.

We’ve seen similar issues with characters being clipped in other languages. Unfortunately the only answer we’ve found has been to switch to another font face.

PsychoPy doesn’t currently render the font glyphs itself: that task gets passed down to a lower-level library written by a third party. That means we don’t get detailed control of the font drawing process.

If you find a suitable font, it would be wonderful if you could post screenshots here of both the original problem and a correctly-drawn version. That would provide a very useful guide to future users.

One further option: web standards generally deal better with text from various languages. You might find it worth trying to run your experiment online (using JavaScript generated by Builder) rather than directly from your computer (using the Python script generated by Builder). For example, I have found that online experiments can correctly display multi-line Farsi text, whereas in Python, multi-line Farsi flows from the bottom of the screen to the top, in a way that we can’t influence from within PsychoPy.