Text scale on HiDPI display using Direct2D renderer Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
User avatar
Kerber
In need of some credit
In need of some credit
Posts: 8
Joined: Wed Aug 16, 2017 9:21 pm
Location: Russia

Text scale on HiDPI display using Direct2D renderer

Post by Kerber » Wed Dec 04, 2019 12:05 am

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.

User avatar
doublemax
Moderator
Moderator
Posts: 14285
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Text scale on HiDPI display using Direct2D renderer

Post by doublemax » Wed Dec 04, 2019 6:10 am

That looks like a bug. Please open a ticket at: http://trac.wxwidgets.org/
Use the source, Luke!

User avatar
Kerber
In need of some credit
In need of some credit
Posts: 8
Joined: Wed Aug 16, 2017 9:21 pm
Location: Russia

Re: Text scale on HiDPI display using Direct2D renderer

Post by Kerber » Wed Dec 04, 2019 10:52 am

Sure. I'll do that once I figure out how to create tickets there.

User avatar
Kerber
In need of some credit
In need of some credit
Posts: 8
Joined: Wed Aug 16, 2017 9:21 pm
Location: Russia

Re: Text scale on HiDPI display using Direct2D renderer

Post by Kerber » Wed Dec 04, 2019 1:13 pm

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

User avatar
doublemax
Moderator
Moderator
Posts: 14285
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Text scale on HiDPI display using Direct2D renderer

Post by doublemax » Wed Dec 04, 2019 1:18 pm

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.
Use the source, Luke!

User avatar
Kerber
In need of some credit
In need of some credit
Posts: 8
Joined: Wed Aug 16, 2017 9:21 pm
Location: Russia

Re: Text scale on HiDPI display using Direct2D renderer

Post by Kerber » Wed Dec 04, 2019 11:30 pm

Solved by updating to 3.1.3, details in ticket.

Post Reply