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
Earned a small fee
Earned a small fee
Posts: 11
Joined: Wed Aug 16, 2017 9:21 pm
Location: Russia

Text scale on HiDPI display using Direct2D renderer

Post 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.
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Text scale on HiDPI display using Direct2D renderer

Post by doublemax »

That looks like a bug. Please open a ticket at: http://trac.wxwidgets.org/
Use the source, Luke!
User avatar
Kerber
Earned a small fee
Earned a small fee
Posts: 11
Joined: Wed Aug 16, 2017 9:21 pm
Location: Russia

Re: Text scale on HiDPI display using Direct2D renderer

Post by Kerber »

Sure. I'll do that once I figure out how to create tickets there.
User avatar
Kerber
Earned a small fee
Earned a small fee
Posts: 11
Joined: Wed Aug 16, 2017 9:21 pm
Location: Russia

Re: Text scale on HiDPI display using Direct2D renderer

Post 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
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Text scale on HiDPI display using Direct2D renderer

Post 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.
Use the source, Luke!
User avatar
Kerber
Earned a small fee
Earned a small fee
Posts: 11
Joined: Wed Aug 16, 2017 9:21 pm
Location: Russia

Re: Text scale on HiDPI display using Direct2D renderer

Post by Kerber »

Solved by updating to 3.1.3, details in ticket.
Post Reply