[open] Generating consistent font sizes across different platforms and screen sizes
I'm developing a dot-probe experiment which requires a vertically arranged word (h = 50mm), space (h = 30mm), word (h = 50mm). The experiment will be run on participants' own hardware/software. What's the best approach to ensure these sizes are the same for all participants?
My experiment resolution is currently 1024x768. I'm using a canvas to display the words as it allows fonts specified in pixels rather than points which simplifies the calculations I've been using. Should I be doing a calculation based on px/in for specific screen sizes at this resolution? Assuming an LCD 17" XGA = 75.3 px/in and 25.4 mm/in I get 50 / 25.4 * 73 = 148px, but this is about half the height of the words I'm after (25mm for a capital 'D'). By manual measurement, using trial and error, on a 17" display, a 270 pixel font gives a 50mm capital letter.
from openexp.canvas import canvas
c = canvas(exp)
c.set_font('mono', 270)
word = self.get('word')
word_pos = self.get('word_pos')
pair = self.get('pair')
pair_pos = self.get('pair_pos')
c.text(word,y=c.ycenter()+word_pos)
c.text(pair,y=c.ycenter()+pair_pos)
c.show()
Comments
Greetings earc,
The text size is usually measured in pixels and therefore, I think, the absolute size is dependent on the particular display. (Others please correct me if I'm wrong!).
Without getting in technical detail: you're mentioning that participants will run the experiment on their own hardware. The absolute size of the perceived text will also depend on the distance between the participant and the screen. Do you control for that? (Even if they promise that they'll sit, say, at a 50cm distance from the screen, their head position will still be very variable). If this doesn't matter, then I'd say going with an estimate is fine as well.
Cheers,
Josh
Thanks for helping me think this through Josh. As I'm not present to control for distance, I'm going to 'encourage' a distance of 60cm, ask uses to measure their screen height and use these values to calculate the size in pixels for the visual angle I require (about 2 degrees between stimuli).