Opensesame lower case text misalignment
Hello!
I have looked for previous posts on this but I haven't been able to find any. I have written a word-pair task in which I use sketchpad to present two adjacent words on each trial, where [word1](x=-180, y=0) [word2] (x=180, y=0). The words are pulled in from a .csv file, are all lower case and this all works fine for me.
When sharing this .osexp with collaborators, however, they are observing misalignment of words in cases where one of the words has a descender such as the "p" in "pull", and the other word doesn't. So for example, for word-pair "pull" "tired", pull is pushed slightly upwards, so that the bottom of the p is aligned with tired rather than dangling below. My interpretation is that my version is using the bottom of the words (ignoring descenders) to align along the y-axis whereas theirs is using the absolute letter height or bottom of the word/descender to align.
I have checked and re-checked and the only difference I can detect between the files in each case is that I am running the script on OpenSesame 3.1.6 (Python 2.7.12), whereas my collaborators are running the most recent 3.2.5 version and associated modules and packages.
Is anyone aware of any upgrades which might account for this? I can get around this by using upper case letters, but would like to not have to.
Many thanks,
Emma
Comments
Hi Emma,
I forgot the details, but in some other discussion @sebastiaan explained how the text is currently rendered (which is different to previous versions of Opensesame), if you feel lucky, give it a go and search the forum. Basically, a box is drawn around the text, and this is box is centered at the provided coordinates. Not sure whether there is a workaround for that, but you can try writing every letter separately (in a for loop you can loop over a word and write letter by letter to the canvas, adjusting the x and y coordinates)
Eduard