Gdk has several scaling-dependent functions: gdk_screen_(set|get)_resolution(), gdk_monitor_get_scale_factor, and gdk_(screen|monitor)_get_(height|width)_mm() and I'm trying to figure out how to get the right behavior on MacOS HiDPI (aka retina) monitors. A couple of weeks ago I replaced an obsolete function ([NSScreen userSpaceScaleFactor]) [1] with a more-correct implementation that effectively does what it's supposed to, return 144dpi for retina and 72 for normal. Doing so causes the font-size to double; i.e. a 12-point font displays at 24-points. I suspect that's because Pango calls gdk_screen_get_resolution(), but it also uses Apple's CoreText for rendering and layout on MacOS and I suspect that CoreText is already compensating for the retina screen, resulting in the doubled font scaling. Does that make sense? Is the correct solution to have Pango ignore resolution on MacOS or to always set GdkScreen resolution to 72? If the latter, what about the other functions that use scaling information and how to communicate to applications that they need to use larger icons and such? Regards, John Ralls |