| Summary: | [StyledText] Ability To Turn Off Text Anti-aliasing for StyledText | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Freddie Witherden <freddie> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | CLOSED FIXED | QA Contact: | Felipe Heidrich <eclipse.felipe> |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | andre_weinand, daniel_megert, eclipse.felipe, heath.borders, ipun, Silenio_Quarti, snorthov |
| Version: | 3.2.1 | Keywords: | triaged |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Freddie Witherden
There is a desktop setting that you can use to control this ('Turn off text smoothing for font sizes').
It is also possible to turn of anti-aliasing for string drawing at the GC level but no API exists to do this for StyledText. If API were added to StyledText, then a preference would also need to be added to turn it on in the Eclipse UI. This feature has been asked for in the past but I can't find the duplicate. Moving to UI for consideration.
I have trouble parsing comment 1. What should Platform Text do with this PR if the API on StyledText isn't there yet? We (as a group) need to decide whether we are going to support this feature. If we decide "yes", then SWT will add the API to StyledText, Text can call it and UI (or whoever, Text still?) can make it an option somewhere in Eclipse. We will not add the feature to SWT if nobody can get to it from the Eclipse UI. Are we doing this? I would be willing to add this to the 'Text Editors' preference page and offer it for textual editors. IMO this is a desktop preference, if the user doesn't like text AA he disables the feature for the desktop as a whole. The widget should not be able to override this preference. On windows you can use clear type tunner: http://www.microsoft.com/typography/ClearTypePowerToy.mspx On gnome you can use gnome-font-properties On mac, system preference -> appereance -> font smoothing style (In reply to comment #5) > IMO this is a desktop preference, if the user doesn't like text AA he disables > the feature for the desktop as a whole. The widget should not be able to > override this preference. > > On windows you can use clear type tunner: > http://www.microsoft.com/typography/ClearTypePowerToy.mspx > On gnome you can use gnome-font-properties > On mac, system preference -> appereance -> font smoothing style > I have a tendency to disagree, as on OS X you need to keep text anti-aliasing on for font sizes 9 and greater (or turn off font smoothing for sizes 8 and smaller as it is written in the preferences window), or things break, applications depend on the font smoothing for their UIs. Turn it off and fonts throughout the system become hard to read in many applications. The widget should have every right to override this preference, as do the widgets in Xcode, subetha edit and countless other editors. It is mainly because monospace fonts (at least some of them) do not respond well to AA, while normal (variable width) fonts do, at the same point sizes look fine with AA on. There is no 'one-size-fits-all' solution to this problem at the OS level, and it would seem logical to me to allow the user to exercise discretion when it comes to choosing if they want their code font anti aliased (some work, but others, like monaco do not, compare Eclipse and Xcode at the same point sizes with the font monaco and choose for yourself). Regards, Freddie. André, what's your take on this? +1 on comment #6: IMO it is not a desktop setting, so Eclipse has to provide support for it. I could not find this option in Xcode or Visual Studio 2005. On Windows Presentation Foundation you can not disable Anti-aliasing (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=565101&SiteID=1). If I am not wrong Carbon also doesn't have API to disable AA. I changed StyledText to call gc.setTextAntialias(SWT.OFF); before drawing text and it failed on win32, gtk, and carbon. SSQ, Carbon has flag you can set to disable AA for small fonts, don't we set this flag already ? >I changed StyledText to call gc.setTextAntialias(SWT.OFF); before drawing text >and it failed on win32, gtk, and carbon. I am not sure why this API is not working (my guess it is because all drawing in StyledText goes through TextLayout which is not checking that attribute). But if we use it, GC will turn into advanced mode, which can cause a lot of problems (including bad performance). >SSQ, Carbon has flag you can set to disable AA for small fonts, don't we set >this flag already ? What is the flag (API)? We need to fix the bug that this is not working (or enter a new bug report to capture this. Is Xcode anti-aliased or not? Xcode does not antialias text in the source code editor but everywhere else. Moving to SWT to implement this. Will add preference once it is available. >I changed StyledText to call gc.setTextAntialias(SWT.OFF); before drawing text >and it failed on win32, gtk, and carbon. Filed bug 164928 to track this. >On Windows Presentation Foundation you can not disable Anti-aliasing >(http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=565101&SiteID=1). Does this mean we'd have to add a preference which states that it might not work? Instead of adding a preference, could we do the same as Xcode and always disable AA on Mac - or make it font (size) dependent? The bug in comment #11 is fixed. Your bug has been moved to triage, visit http://www.eclipse.org/swt/triage.php for more info. Hi whats the status of this bug? From the looks of it, the bug being tracked was from comment 11 ( bug 164928 ) and that seems to be fixed. I will close this bug in a week if there are no objections. Closed as to no objections. |