Retina vs. non-retina text sizing


#1

I've been building a project on a retina screen,  now when viewing the interface on a non-retina screen, the text size is smaller (relative to other objects).

I know a few people have had issues with text rendering, but I couldn't find any posts about this problem. Does anyone have an idea of what's up and how I can fix this? It's a shame for the text sizing to be different on retina / non-retina.

Thanks.


#2

After some further experimentation today, text sizes on the retina display appear about 1.5pts bigger; eg. a size 12 text on the non-retina display will appear approximately a size of between 13 and 14 on the retina display. 

Perhaps a way to get around this would be to check whether a retina monitor is being used, then apply the correct sizing depending? I haven't seen where this could be checked but maybe it's an option. I'm sure someone must have encountered a similar problem before!

 


#3

This should be done automatically. Are you using an old project / version of the library? I'm pretty sure it's an option enabled by defaul in AppConfig.h (or something similar)?


#4

There's no explicit size difference!

Obviously the renderer will snap the font outlines to fit to physical pixels, so there'll always be the chance that a glyph will be slightly bigger or smaller on a lower res display. What you see on a retina display will be closer to the size you actually asked for. But it's not correct to assume that there's some kind of scaling factor involved, or that anything should be resized depending on the display.


#5

Thanks for the replies. The snapping amount is greater than I would describe as "slightly", to be honest it's quite significant. Perhaps a build up of interface components snapping unfortunately is the problem. Do you know if there's a test to see if a screen is retina not? Then I can apply the sizing appropriately.

Thanks!


#6

It'll snap by up to 1 pixel. This is something that happens in OSX, not something that I'd expect to be able to control.


#7

The snapping of various component bounds (not only text) between retina OSX and non retina Windows is way over 1 pixel, in the worst cases I'd say it's at least 10px. I guess you just have to compromise, thanks for the response though.


#8

Are you sure? We have lots of products on Windows and OS X and the layouts look the same. Have you got any screenshots showing the problem?


#9

10 pixels sounds crazy - would need to see some serious evidence to believe that! You might get that if you were using a completely different font, but there's no way it's a snapping issue.