Page 1 of 1

DrawText() on Retina Display

Posted: Fri Feb 10, 2017 2:24 pm
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

Re: DrawText() on Retina Display

Posted: Fri Feb 10, 2017 4:12 pm
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.

Re: DrawText() on Retina Display

Posted: Fri Feb 10, 2017 9:13 pm
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?

Re: DrawText() on Retina Display

Posted: Fri Feb 10, 2017 9:31 pm
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.