Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352291 - TextLayout ignores TextStyle rise if GC's antialias is different from SWT.DEFAULT
Summary: TextLayout ignores TextStyle rise if GC's antialias is different from SWT.DEF...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows All
: P3 major with 1 vote (vote)
Target Milestone: 3.7.1   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-17 11:15 EDT by Peter Severin CLA
Modified: 2011-08-25 14:36 EDT (History)
1 user (show)

See Also:


Attachments
Snippet to reproduce the problem (4.01 KB, text/x-java)
2011-07-17 11:15 EDT, Peter Severin CLA
no flags Details
Results with antialias set to ON (3.33 KB, image/png)
2011-07-17 11:16 EDT, Peter Severin CLA
no flags Details
Results with antialias set to DEFAULT (3.19 KB, image/png)
2011-07-17 11:16 EDT, Peter Severin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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