This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The font very thin also isn't present any smoothing (antialiasing).
Created attachment 105325 [details] NetBeans vs KWrite NetNeans is launched with options -J-Dawt.useSystemAAFontSettings=lcd --laf GTK Font - Liberation Mono 15 /// KWrite Font - Liberation Mono 12 ~/.fonts.conf <?xml version='1.0'?> <fontconfig> <match target="font"> <edit mode="assign" name="rgba"> <const>rgb</const> </edit> </match> <match target="font"> <edit mode="assign" name="hinting"> <bool>true</bool> </edit> </match> <match target="pattern"> <edit mode="assign" name="autohint"> <bool>true</bool> </edit> </match> <match target="font"> <edit mode="assign" name="hintstyle"> <const>hintslight</const> </edit> </match> <match target="font"> <edit mode="assign" name="antialias"> <bool>true</bool> </edit> </match> <match target="font"> <edit mode="assign" name="lcdfilter"> <const>lcddefault</const> </edit> </match> <match target="font"> <test compare="more" name="weight"> <const>medium</const> </test> <edit mode="assign" name="hintstyle"> <const>hintmedium</const> </edit> </match> <dir>~/.fonts</dir> </fontconfig>
Created attachment 105326 [details] Font Monaco
Created attachment 105327 [details] Font Lucida Sans Typewriter
The text is definitely antialiased (I attach noaa editor text once applying of rendering hints in DocumentView to the Graphics would be switched off). We could experiment with various rendering hints to see whether it would make any effect: http://download.oracle.com/javase/tutorial/2d/advanced/quality.html But generally the rendering in KWrite is different - looks more like a bold font though their bold is even a bit "bolder" ;-)
Created attachment 105395 [details] Regular editor rendering
Created attachment 105396 [details] Editor rendering without applying rendering hints in DocumentView
Created attachment 105421 [details] At the left Netbeans, on the right KWord Font: Liberation mono 24, 22, 20, 18, 17 (from top to down for NetBeans). Passage with 24 on 22 (20, 18) does very thin all horizontal dashes. Look at letters "B" and "r". Passage with 18 on 17 sharply changes a thickness and vertical dashes. Compare with KWrite.
Created attachment 105422 [details] Below NetBeans on top Kwrite Below NetBeans on top Kwrite return app.exec (); - it is combined ideally. The distance between lines at NetBeans is less and noticeably less.
Created attachment 105475 [details] NetBeans, KWrite, LibreOffice (From top to down). Font: consolas (in NetBeans size 15) In a word "Browser" letters "o" and "w" are written without a gap. You use too aggressive hinting, and don't allow a method to reduce its level.
(In reply to comment #4) > But generally the rendering in KWrite is different - looks more like a bold > font though their bold is even a bit "bolder" ;-) 1. No, in KWrite "Liberation Mono" - looks like a true. http://www.dafont.com/liberation-mono.font http://www.fontsquirrel.com/fonts/Liberation-Mono 2. http://en.wikipedia.org/wiki/File:Font_Comparison_-_Liberation_Mono_to_Courier_New.svg In NetBeans "Liberation Mono" and "Courier New" (size < 18) have an identical thickness. 3. http://bugzilla-attachments-194676.netbeans.org/bugzilla/attachment.cgi?id=105421 Look attentively at distance between letters "k" and "R". The third and fourth line on top - they have almost faced.
Created attachment 105485 [details] Liberation Mono face
Created attachment 105486 [details] and size 12
Created attachment 105664 [details] Lucida Sans Typewriter on Mac This is not limited to Linux, the same font on os/x renders even worse.
To cabbey #13: that's a separate issue. Please add to netbeans.conf: -J-Dapple.awt.graphics.UseQuartz=false (see http://blogs.sun.com/tor/entry/lcd_sub_pixel_rendering ) I've added some extra debugging info regarding AA attributes of FontRenderContext which shows that AA is on. Available with -J-Dorg.netbeans.modules.editor.lib2.view.DocumentView.level=FINE in netbeans.conf. I've made a simple swing program that shows that on my Ubuntu 10.10 it helps to add the following hints in order to get bolder Liberation Mono font: myHints.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); myHints.put(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON); However imho it does not look very well at least on my system. Anyway if you want to turn on the extra hints please add the following to netbeans.conf: -J-Dorg.netbeans.editor.aa.extra.hints=true We could also try to override the default AffineTransform of FontRenderContext but I'll do some more research before trying that. http://hg.netbeans.org/jet-main/rev/5203cdaabebc
Created attachment 106063 [details] Sample swing app for extra hints
(In reply to comment #14) With an option "-J-Dorg.netbeans.editor.aa.extra.hints=true" is even worse.
Created attachment 106132 [details] There is a riddle a difference from ms windows Font (everywhere) Liberation Mono 15
(In reply to comment #17) The same version Netbeans and Java - and fonts are drawn on a miscellaneous. It as a riddle. And drawing of a font by system in Linux is better than at Microsoft. Well if nevertheless this problem proceeds from Java - then probably and remains.
(In reply to comment #18) Essence of problem not in that in Netbeans for Windows of letter have a large thickness, and in that in "Netbeans for Windows" of letter correspond to the system tuning (letters are displayed exactly as well as in Notepad or Notepad++ or Kate for Windows). In Windows 7 it is possible to change tuning of "Clear Type". I can influence, that letters were displayed by hair-lines. And in all applications, including Netbeas, letters will be displayed identically - thinly. In Linux the function getDesktopProperty("awt.font.desktophints") takes properties from desktop, but obviously not from my desktop.
I think I can't do more with this so I'm closing the issue. Java renders the font thin due to truetype hinting appropriate for the given font size (KWrite for some reason doesn't) and NB can hardly improve the situation - thus I mark it as invalid. Anyway Yuriy if you find e.g. any rendering hints combination that would improve the rendering I'm willing to change the code for -J-Dorg.netbeans.editor.aa.extra.hints=true to support that.
Created attachment 106755 [details] -J-Dorg.netbeans.editor.aa.extra.hints=true with JDK-1.7 - quite good combination With JDK-1.7 At the left: -J-Dawt.useSystemAAFontSettings=on On the right: -J-Dorg.netbeans.editor.aa.extra.hints=true Above font Consolas 15. Letters "ow" - (ot the right) don't stick together. Below font Liberation Mono 15. On the right letters "x" and "w" are drawn more accurately. On the right distance between letters uniform (at the left the last letter "r" as though is torn off from a word). At least against a dark background, the text on the right looks better.
I'd say this is pretty far from resolved and invalid: http://dl.dropbox.com/u/2188345/netbeans_font_problem.png
Rnyberg, your link is not working. Back to resolved-invalid state.
Eclipse the same a java based application. But letters in eclipse are drawn according to system adjustments. Java - doesn't concern a problem.
Created attachment 114371 [details] R U N FA I LED (exi t val ue 1, t ot al ti m e: 233m s) SolStudio 12.3
(In reply to comment #25) > Created attachment 114371 [details] > R U N FA I LED (exi t val ue 1, t ot al ti m e: 233m s) > > SolStudio 12.3 I guess that's an output window which is not NB editor based.
(In reply to comment #24) > Eclipse the same a java based application. But letters in eclipse are drawn > according to system adjustments. Java - doesn't concern a problem. Please see http://wiki.netbeans.org/FaqFontRendering "The difference between Eclipse and NetBeans font appearance follows from the fact that Eclipse uses swt which uses native font rendering while Swing does not." I think that there are no more things that I can improve in terms of this issue (of course I'll continue to fix individual issues in the view hierarchy and improve it overall) so I close the issue. The font rendering in java-swing apps will probably continue to be a bit different than in other apps but I can hardly influence that.