Page 1 of 1

Text scale on HiDPI display using Direct2D renderer

Posted: Wed Dec 04, 2019 12:05 am
by Kerber
I have 4K screen (3840x2160) and scaling set to 200% in Windows. When I use GDI or GDI+ to draw text it looks fine and scales as needed, but when I use wxGraphicsContext (or wxGCDC) with Direct2D backend the text is drawn with 100% scale. Images are drawn with correct size. Only text is affected.

GDI:
Image

Direct2D:
Image

Direct2D (with image):
Image

Is there a way to fix that? Scintilla draws text with proper scaling when I set it to wxSTC_TECHNOLOGY_DIRECTWRITE.

Re: Text scale on HiDPI display using Direct2D renderer

Posted: Wed Dec 04, 2019 6:10 am
by doublemax
That looks like a bug. Please open a ticket at: http://trac.wxwidgets.org/

Re: Text scale on HiDPI display using Direct2D renderer

Posted: Wed Dec 04, 2019 10:52 am
by Kerber
Sure. I'll do that once I figure out how to create tickets there.

Re: Text scale on HiDPI display using Direct2D renderer

Posted: Wed Dec 04, 2019 1:13 pm
by Kerber
Here's the ticket. I'm not sure if it's actually created and visible to anyone else. This wxTrack system is utterly unusable.

https://trac.wxwidgets.org/ticket/18608

Re: Text scale on HiDPI display using Direct2D renderer

Posted: Wed Dec 04, 2019 1:18 pm
by doublemax
The ticket is visible, thanks.

Could you check if the problem can be seen in the "drawing" sample where you can switch between different renderers? If yes, please add that information to the ticket.

Re: Text scale on HiDPI display using Direct2D renderer

Posted: Wed Dec 04, 2019 11:30 pm
by Kerber
Solved by updating to 3.1.3, details in ticket.