Commit f4caf32
committed
[Win32] Consider SWT.DRAW_DELIMITER flag when drawing text with GDI+
The GC.drawText() implementation falls back to using GDI instead of GDI+
(even if enabled) in many cases for historic reasons. There were issues
with rendering tabs back then. One of the few cases where GDI+ is used
is when glyphs that are non existing for GDI are used. In that case,
however, the DRAW_DELIMITER flag is not properly considered. The
behavior is always as if the flag was enabled, i.e., line delimiters is
always drawn even if the flag is not set.
This change corrects the behavior of the GDI+ text drawing
implementation to consider if the DRAW_DELIMITER flag is not set. In
consequence, strings with glyphs that are not supported by GDI are now
rendered without line breaks if undesired as per defined flags.
Contributes to
#30911 parent 83b9fee commit f4caf32
File tree
2 files changed
+15
-0
lines changed- bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics
- tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit
2 files changed
+15
-0
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3037 | 3037 | | |
3038 | 3038 | | |
3039 | 3039 | | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
3040 | 3043 | | |
3041 | 3044 | | |
3042 | 3045 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
957 | 969 | | |
958 | 970 | | |
959 | 971 | | |
| |||
0 commit comments