Blurry Text In retina

I am having to deal with a retina screen for the first time and I an seeing something I don’t understand.

I thought if I drew text in the paint event directly to the graphics object using g.drawtext, it is supposed to come come out just fine without needing to to do anything special.

But the text is looking obviously blurry or pixelated (or poorly ant-aliased) on a 27" retina iMac with Text set to large on El Capitan . On my old late 2013 27" running 10.9.5 with the Display resolution set to HiDPI, I see the blurriness, but it’s not as pronounced as on a real retina screen…

I there anything I can do about that?

Thanks,

  • Karen

There are some properties you can set via Declare (or AppleLib) for enhanced CGContext quality like ShouldSmoothFonts, FontAntialiasing, InterpolationQuality. One or several of them should do the trick.

I’ve never done anything special for drawing text on Retina. What are you doing? How does the result look like? What do moths have to do with Retina?

If “Supports Hi-DPI” is on there should be nothing else to do. Are you using declares for vibrancy or anything?

[quote=293476:@Beatrix Willius]I’ve never done anything special for drawing text on Retina. What are you doing?

Drawing on top of a picture:
Here is the relevant code which i in the paint event of a canvas on a window:

g.DrawPicture LastChart, 0,0 <snip> g.ForeColor = &cFEFA8B00 g.FillRect BoxLeft, BoxTop, BoxW, BoxHt g.ForeColor = TextColor g.DrawString Line1, BoxLeft + (BoxW- Line1W)\\2, BoxTop + 3 + g.TextAscent g.DrawString Line2, BoxLeft + (BoxW- Line2W)\\2, BoxTop + 3 + g.TextAscent +1 + g.TextHeight g.DrawString Line3, BoxLeft + (BoxW- Line3W)\\2, BoxTop + 3 + g.TextAscent +1 + 2*g.TextHeight

[quote]How does the result look like?
[/quote]

I tried putting a sample on drop box but I can’t get it to display here… I stored it as a png and strangely when it is displayed in the browser the text is smaller looks a LOT better than it does in the app even if I blow it up a bit!!

Autocorrect strikes again! At least it makes typos amusing sometimes! ':wink:

I did not realize it had done that and at first I had no idea what you meant until I went back and looked.

Thanks,

  • Karen

I’ll look into that… I just thought that I would not have to worry about that at all.

Thanks,

  • Karen

[quote=293480:@Karen Atkocius]I’ll look into that… I just thought that I would not have to worry about that at all.

Thanks,

  • Karen[/quote]
    You shouldn’t.

Let me ask this… if you run the IDE on that same screen, is the text blurry there too?

The IDE looked fine and the labels on the window in my app looked a lot better than the text I drew… But I now think it was due to a bad assumption on my part… I’ll know for sure when I can get back on the retina machine.

  • Karen