Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352291

Summary: TextLayout ignores TextStyle rise if GC's antialias is different from SWT.DEFAULT
Product: [Eclipse Project] Platform Reporter: Peter Severin <peter>
Component: SWTAssignee: Felipe Heidrich <eclipse.felipe>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: eclipse.felipe
Version: 3.5   
Target Milestone: 3.7.1   
Hardware: PC   
OS: Windows All   
Whiteboard:
Attachments:
Description Flags
Snippet to reproduce the problem
none
Results with antialias set to ON
none
Results with antialias set to DEFAULT none

Description Peter Severin CLA 2011-07-17 11:15:05 EDT
Build Identifier: Eclipse 3.5 and higher

TextLayout ignores rise when drawing on a GC with antialias set to ON or OFF. It works with antialias set to SWT.DEFAULT. This happens only on Windows and from my tests it still works with Eclipse 3.4 but is broken from 3.5 and higher. I didn't test with Indigo but I am pretty sure it's broken there too.

I am attaching the snippet and screenshots that show the difference in results.

Reproducible: Always
Comment 1 Peter Severin CLA 2011-07-17 11:15:42 EDT
Created attachment 199794 [details]
Snippet to reproduce the problem
Comment 2 Peter Severin CLA 2011-07-17 11:16:09 EDT
Created attachment 199795 [details]
Results with antialias set to ON
Comment 3 Peter Severin CLA 2011-07-17 11:16:29 EDT
Created attachment 199796 [details]
Results with antialias set to DEFAULT
Comment 4 Peter Severin CLA 2011-07-17 22:39:13 EDT
The problem even worse than that. I was hoping that I can work around it by temporarily setting antialias to SWT.DEFAULT but it does not work. Setting antialias to anything else than SWT.DEFAULT breaks rise handling for good.
Comment 5 Peter Severin CLA 2011-07-17 22:47:36 EDT
Just wanted to confirm that Eclipse Indigo has this bug too.
Comment 7 Peter Severin CLA 2011-07-18 19:58:12 EDT
Thanks Felipe, this was fast! Any chance for this fix to be backported? Ideally I'd like to see it in Eclipse 3.6 since this is the version used by most Eclipse-based IDEs.
Comment 8 Felipe Heidrich CLA 2011-07-19 10:10:47 EDT
We are done with Eclipse 3.6.x (3.6.2 shipped back in Feb).

The earliest I can make this fix available is 3.7.1.
Would that help you ?
Comment 9 Peter Severin CLA 2011-07-19 10:21:29 EDT
3.7.1 is not ideal but it would help too. However I'll have to wait for current generation of IDEs to upgrade from 3.6 before I can go on and implement subscripts in my plug-in.
Comment 10 Felipe Heidrich CLA 2011-07-19 14:50:46 EDT
backported to 3.7.x
Comment 11 Felipe Heidrich CLA 2011-08-25 14:36:59 EDT
Verified in Version: 3.7.1 Build id: M20110825-0847