Bug 215785 - Font anti-aliasing problems
Font anti-aliasing problems
Status: VERIFIED FIXED
Product: editor
Classification: Unclassified
Component: Painting & Printing
7.2.1
PC Windows 7
: P2 with 2 votes (vote)
: 7.3
Assigned To: Miloslav Metelka
issues@editor
72patch1-verified
:
: 200378 216111 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-20 15:28 UTC by dalelarsen
Modified: 2013-08-21 14:01 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
IDE log (60.99 KB, text/plain)
2012-07-20 15:28 UTC, dalelarsen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dalelarsen 2012-07-20 15:28:26 UTC
Product Version = NetBeans IDE 7.2 RC1 (Build 201206272359)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.6.0_26
Runtime = Java HotSpot(TM) Client VM 20.1-b02

The fonts look terrible in the editor. It seems anti-aliasing isn't working. All the edges are jagged and its rather difficult to read. Looks great in 7.1.2 but not 7.2 RC1.

Thanks!

Dale Larsen
Comment 1 dalelarsen 2012-07-20 15:28:30 UTC
Created attachment 122229 [details]
IDE log
Comment 2 dalelarsen 2012-07-20 15:29:45 UTC
I should also note that that fonts I am testing with are "Courier New" and "Consolas".
Comment 3 dalelarsen 2012-07-20 16:31:36 UTC
This happens after installing 7.2 and choosing to import settings from the previous installation. I haven't pin pointed which setting causes it to happen yet. I have tried all different fonts with no luck, including the default Monospace. It doesn't seem to get fixed by changing any options directly related to the font itself.
Comment 4 spye 2012-07-24 18:20:42 UTC
Confirmed for me as well... I did an installation and then imported settings from a previous version, and font anti-aliasing was then turned off. I can't get it to re-enable, and the font just looks awful. This is only in the editor, and not in the rest of the UI.

(In reply to comment #3)
> This happens after installing 7.2 and choosing to import settings from the
> previous installation. I haven't pin pointed which setting causes it to happen
> yet. I have tried all different fonts with no luck, including the default
> Monospace. It doesn't seem to get fixed by changing any options directly
> related to the font itself.
Comment 5 spye 2012-07-24 18:25:30 UTC
I should add that this happens in 7.2 final release as well, not just RC1.
Comment 6 spye 2012-07-24 19:45:59 UTC
Problem solved (however I think it's still a bug):

For anyone looking for the answer to this: it happens when you import settings from a previous NetBeans installation. Specifically, it is the "Editor > Other" settings that cause this. You can delete your 7.2 configuration to reset it (ie AppData\Roaming\Netbeans\7.2, or Local\NetBeans...).

Using your previous NetBeans installation (ie, 7.1), go to Tools > Options, and export your entire configuration as a ZIP file.

But when you import into 7.2, check the "All" option, but then under "Editor", uncheck the "Other" option, and font anti-aliasing will remain as normal. Everything else can import okay. You will need to edit a couple of settings to match your previous installation (ie, tab size settings), but otherwise, this should solve the problem.
Comment 7 pdelre 2012-07-26 14:36:38 UTC
I also had this issue (DejaVu Sans Mono 11) and spye's workaround did the trick for me. There was one customization I had made in 7.1 when I switched to a smaller font. I added a line-height-correction value (from 1.0 to 1.1) to make it more readable. When I added that value back to the xml configuration file, it stopped rendering with anti-aliasing. I tried values of 0.9, 1.0 (default), 1.1, and 1.2 and the only value that rendered properly was 1.0.

From post: http://justcheckingonall.wordpress.com/2008/12/26/change-line-height-in-netbeans/

File is 7.2\config\Editors\Preferences\org-netbeans-modules-editor-settings-CustomPreferences.xml

and the xml entry is

<entry javaType="java.lang.Float" name="line-height-correction" xml:space="preserve">
    <value><![CDATA[1.1]]></value>
</entry>
Comment 8 Miloslav Metelka 2012-08-03 15:23:34 UTC
The problem was that for line-height-correction != 1.0f the Math.ceil() was not re-applied to the resulting font's ascent leading to the text being rendered on fractional pixel boundaries which is allowed by the API but in reality it looks bad.
Also when text-zooming with Alt+MouseWheel the line-height-correction was not applied properly so I've fixed that problem as well together with a minor problem with applying global ascent in a collapsed fold's text.

http://hg.netbeans.org/jet-main/rev/b932b73d2119
Comment 9 Quality Engineering 2012-08-04 02:32:14 UTC
Integrated into 'main-golden', will be available in build *201208040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b932b73d2119
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #215785 - Font anti-aliasing problems - line-height-correction leading to rendering on pixel fractions.
Comment 10 Miloslav Metelka 2012-08-06 07:27:36 UTC
Note: a possible integration of this issue requires a regression integration - issue #216395 as well.
Comment 11 Jiri Prox 2012-08-09 07:55:50 UTC
verified in trunk
Comment 12 Miloslav Metelka 2012-08-31 18:26:07 UTC
In release72:
b932b73d2119 transplanted as 7335ac6c05c5
Comment 13 Quality Engineering 2012-09-01 11:03:50 UTC
Integrated into 'releases', will be available in build *201209010822* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/7335ac6c05c5
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #215785 - Font anti-aliasing problems - line-height-correction leading to rendering on pixel fractions.
(transplanted from b932b73d21196db3d4951c965c103c2633bfa145)
Comment 14 Miloslav Metelka 2013-08-21 12:55:14 UTC
*** Bug 200378 has been marked as a duplicate of this bug. ***
Comment 15 Miloslav Metelka 2013-08-21 14:01:18 UTC
*** Bug 216111 has been marked as a duplicate of this bug. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo