DrawText() on Retina Display

Mac OSX specific forum
Christian
Enthusiast
Enthusiast
Posts: 154
Joined: Mon Dec 08, 2003 7:50 pm
Location: Germany

DrawText() on Retina Display

Post by Christian »

Hi everyone,

I currently purchased a retina MacBook. When compiling a program using DrawText() in a CanvasGadget() I recognized that the Text now looks very blurry. Searching in the forum did not give any solutions or mentioning of this problem, but I think it has to do with the Retina display.

Is there something I have to consider when coding or is it simply a PB bug?

Thanks and best regards,
Christian
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: DrawText() on Retina Display

Post by wilbert »

A retina display uses 4 physical pixels (2x2) for 1 logical pixel.
The image PureBasic uses for CanvasGadget is not a @2x retina image.
I think it should look the same as on a non retina display.
It it is even more blurry it probably is a bug.
Windows (x64)
Raspberry Pi OS (Arm64)
Christian
Enthusiast
Enthusiast
Posts: 154
Joined: Mon Dec 08, 2003 7:50 pm
Location: Germany

Re: DrawText() on Retina Display

Post by Christian »

Thanks for your reply. Unfortunately it looks different. It is much sharper on the non-retina display. I tried to make a screenshot for comparison:

Image

The upper part is taken from the program compiled and displayed on a Retina display, the lower one is taken from a non-retina MacBook. So, you think its a bug and there is nothing I can or have to do?
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: DrawText() on Retina Display

Post by wilbert »

Might be a good idea for Fred to take a look at it.
I don't know what is causing it but maybe it can be solved by something like setting setImageInterpolation from NSGraphicsContext or by shifting coordinates by half a pixel.
Windows (x64)
Raspberry Pi OS (Arm64)
Post Reply