Issues with GDI Scaling in Windows
Michael Staszewski <[email protected]>
| Newsgroups | gmane.comp.lib.scintilla.devel |
|---|---|
| Message-ID | <[email protected]> |
We've discovered what appears to be a defect in Scintilla in our Windows application. It is reproducible in SciTE. Our application uses GDI Scaling which can be configured by compiler option or by overriding the High DPI scaling behavior of the executable and setting it to System (Enhanced). [image: ScalingBehavior.png] With some font/size combinations and when the technology property is set to SC_TECHNOLOGY_DEFAULT there are various issues including... - Characters crowding each other - Excessive visual space between characters - Characters of the current line shifting left or right - Selection painting not aligning with character boundaries - Incorrect caret placement and incorrect text modification when editing text using a rectangular selection Consolas 14 pt is a good combination to produce some of the issues. Here we can see text crowding and selection painting issues and something going on there with the *E* before *INVOICE*. [image: Painting.jpg] We have several workarounds available, each having side effects, and would like something more stable. We can use SC_TECHNOLOGY_DIRECTWRITE and this resolves it with minimal side effects; however, the DirectWrite technologies enable font ligatures. We surface Font Ligatures as an option in our product and when enabled we use DirectWrite; when disabled we use the Default technology. SciTE doesn't appear to show ligatures when using a suitable font (Fira Code) and I don't see an option for disabling it. 1. Is this GDI Scaling issue a defect or just a known issue/limitation? 2. Is there a way to disable font ligatures and still use the DirectWrite API? Ideally our application would move to the newer PerMonitorV2 scaling in Windows which I believe fixes everything as well, but we have some limitations at the moment preventing us from making the leap. Thanks, Michael -- You received this message because you are subscribed to the Google Groups "scintilla-interest" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/scintilla-interest/d07c6653-1470-44ea-a21b-48283a6d20adn%40googlegroups.com.
ScalingBehavior.png
(image/png, 223.6 KB) - not displayed
Painting.jpg
(image/jpeg, 53.1 KB) - not displayed