Hello! I’m having a issue with underscores not rendering correctly when my experiment is hosted online. I am conducting a cumulative self-paced reading study where the text is pulled from an excel file which is formatted like this:
When run locally, I have had no issues with the underscores displaying while the experiment is running. However, now that I have synced it to Pavlovia and am testing on Google Chrome, the underscores are not showing up. Here is a screenshot showing how the above sentence appears in its tenth iteration:
As you can see, the spacing is correct but the underscores are not visible. A large part of why I included the underscores was to direct the participants to the beginning of the sentence as quickly as possible, but this is not possible when the underscores do not appear.
Interestingly, this applies to all but 3 trials in my experiment. The full sentences for the 3 trials that do not have this problem are the following:
- “After a disastrous debate performance, the previously most popular candidate suddenly lagged far behind.”
- “The radical activists just didn’t believe any scientists, so they stubbornly continued using ivermectin.”
- “Unfortunately, surgery was required after the exclusive restaurant’s famous head chef tripped over a mop.”
I’m unable to discern any unique features about these sentences that would impact this formatting issue.
Please let me know if any extra details would be helpful in deciphering this issue! Thank you for any help you can provide.
Are you using a text component or textbox? It might be worth trying the other.
A different font would probably also work, perhaps even just a larger font size.
Thank you for your response! I was previously using Courier New and when I switched to another font, the underscores appeared! The problem is now that I need a monospaced font for my experiment. Do you know of any web-safe monospaced fonts other than Courier New? Or a way to make a non-web-safe font work on Pavlovia? Thank you!!
Hello @lilyannaw
I think that Google font Space Mono is monospaced.
Best wishes Jens
Hello! I fixed my issue, and I just wanted to leave a response here letting people know how I did it in case anyone else has this issue. For some reason, the underscores (and anything else that goes below the normal text like the bottom of letters like y, g, and p) was getting cut off on the very bottom line of any text component. Other people have had this issue as well in posts like Underscores in bottom line of text becomes dark gray in Pavlovia . The way I worked around this for my experiment is by adding a second text component in the routine with instructions so that the sentence wouldn’t be the last line of text. I had to set the position of the second text component to (0, -0.1) (using height as a unit, so it may be different if you are using another unit) so that it would show up, but once it did, I no longer had my issues with the underscores! I still don’t understand why 3 of my trials were exempt from this issue, but it’s solved now, so I don’t really care!
Here’s a photo of what it looks like now that I’ve fixed it: