[Win32] Remove obsolete fallback for drawing text without GDI+#3100
[Win32] Remove obsolete fallback for drawing text without GDI+#3100HeikoKlare wants to merge 1 commit intoeclipse-platform:masterfrom
Conversation
|
Interestingly, this change would also have an impact on some issues reported to GEF (@ptziegler fyi). It seems like the following fix would be come obsolete as I see the behavior also fixed with this PR: Without this change on 150% monitor: With this change on 150% monitor: For the underlying issue and the snippet posted there, I rather see a change that I would consider a regression caused by this PR: This is how it looks without this change on 100%: And this is how it looks with this change on 100%: But comparing the position of the text on 100% monitor with its position on 150% monitor, the behavior after this change seems to be even more "correct". Anyway, it seems like the Win32 |
A check in GC.drawText() make the implementation fall back to the text rendering based on glyphs and their positions calculated by GDI even when GDI+ is used in all cases except when it contains specific characters that GDI cannot handle. This was necessary more than a decade ago because specific Chinese characters were not properly rendered by GDI+. But this is quite non-intuitive as in case GDI+/advance mode is enabled the consumer will usually expected GDI+ to be used for rendering. In addition, the problematic scenario from back then works fine now. This change thus adapts the GC.drawText() implementation to use plain GDI+ whenever it is enabled and removes all existing fallback code. It also adds a case for not drawing line delimiters when an according style flag is set, which was not considered by the GDI+ implementation yet. May fix eclipse-platform#3091
4ccca1a to
6ff4768
Compare




❗This is an experimental PR to test if the current "fallback" logic is actually obsolete.
A check in GC.drawText() make the implementation fall back to the text rendering based on glyphs and their positions calculated by GDI even when GDI+ is used in all cases except when it contains specific characters that GDI cannot handle. This was necessary more than a decade ago because specific Chinese characters were not properly rendered by GDI+. But this is quite non-intuitive as in case GDI+/advance mode is enabled the consumer will usually expected GDI+ to be used for rendering. In addition, the problematic scenario from back then works fine now.
This change thus adapts the GC.drawText() implementation to use plain GDI+ whenever it is enabled and removes all existing fallback code. It also adds a case for not drawing line delimiters when an according style flag is set, which was not considered by the GDI+ implementation yet.
May fix #3091