I am designing an experiment which requires Hindi language words on screen.
Now it is displaying words but upper and lower part of word is not visible. In the end word is appearing on screen with cut upper and lower part of word.
The normal advice here is just to try using another font - but this can be hit-and-miss.
With the standard Text component, the actual drawing of the text is handled by a third-party library and is not directly under PsychoPy’s control. But in the latest release, it might be worth using the new TextBox component rather than the Text component. The TextBox component is designed for subjects to be able to type text into, so you will find it under the “Response” component tab. But you can set it to be non-editable so it works just like a regular Text component. The difference is that it doesn’t rely on a third party text library, with all its drawing code belonging to PsychoPy itself. That means we can fix glitches as they arise.
We are intending for this to provide much better rendering of non-European text. So please try it out, and let us know if you have any issues (ideally providing some sample text and screenshots).
Thanks for this. I tried some of that text using the TextBox component, and it actually does worse than the old Text component (only boxes are shown using Arial, and an error occurs when trying to use a full Unicode font like Arial Unicode MS). I have posted a bug report here:
and will follow up with @jon to see if we can get better Unicode support here.
That is a good point. Text display in general should be better online, as we aren’t using Python packages for text drawing. Instead, Pavlovia uses web technologies, which should be pretty good at handling most languages.
So you could actually test your existing experiment - even the standard text component should do well. I’ve just run a test in local debug mode, and this is what happens (specifying Arial, the top one is the standard text component, the bottom one is the new TextBox (just realised I left the bold, italic, and various background settings on for that)):
If you are thinking of running online, you should upgrade your version of PsychoPy to the latest version anyway: there has been some very active development in fixing issues since the version you are using:
I’m getting this error on my first attempt to use an editable text box online. This is the only thread that I find when searching for the error. Any ideas?
I was facing the same problem initially. The top and bottom part of the text did not appear.
The solution that worked for me is, using ALT- ENTER to insert a line break above and below the words in every cell of the loopTemplate/ the excel file that I am using in the design. It creates enough space in the cell for the top and bottom part of the word to appear completely while running online. While doing so you can increase the row height in the excel file for your convenience.
Has any updates been made in the newer versions so we can have Hindi words displayed offline? I have used textbox, arial font and line break yet i see boxes appearing in place of stimuli, any idea where am i going wrong?
None probably occurs when the message variable is None. Should it sometimes be blank? Where are the messages coming from? If it’s a spreadsheet and there should always be something then I suspect you have some blank rows that need deleting. There are a few ways of checking this:
Look at the loop and reload the spreadsheet to check the number of conditions PsychoPy reports it to have.
Change the loop to sequential to identify which trials display None
Save the spreadsheet as a CSV file and then open it in a text editor to look for rows that have commas but no content.
I am also trying to do it display words in Kannada, tried with Noto Sans, Arial, Times New Roman, Calibri, in text box, with line break. Although, the words are shown as blocks. PFA the screenshot. What should I do?