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.
Created attachment 126260 [details] picture of characters clipped at 18pt Netbeans permits the use of different sized fonts for different programming language elements and this is one of Netbeans best and most distinguishing features. However, in the 7.3 release, there is a bug with respect to rendering variable sized fonts within a single file. It appears that Netbeans is using some calculation of line height and or drawing clip region (in the IDE editor , in this case I am using the Java editor) which is based on insufficient information, specifically it appears it's basing it's calculation on the default font size only. So every line is rendered as though its line height were the same. But the line heights which contain characters with larger fonts are actually higher than the ones which only contain default font sized characters. So the effect is, those lines which contain characters using larger fonts get their characters clipped off to the default line height, making those lines appear cut off from the top and unreadable. I have enclosed a jpg which illustrates the issue. In 7.2 , the behavior was different in a informative way. In 7.2, the line height appeared to be set to the largest font used in the file. The effect there was, everything rendered correctly, but the space *between* the lines was also set to the largest font's height, so you ended up with a lot of space between each line of code. I used to use Intellij and in that editor they permitted the line spacing (the empty space between two lines of code) to be manually adjusted in a config file to be something like "1.3" or "1.5" or "2.0" which would represent double line spacing. Assuming the 7.2 and 7.3 situations represent a necessary (because of a bug in Swing's editor library) engineering trade-off of some sort and not just an outright Netbeans bug, if you went back to the 7.2 way of rendering but added the ability to tweak line spacing independently, then the end user could find some happy compromise between clipped text and too-big line spacing. My own solution in 7.2 was to not make the font as large as I wanted (I wanted 24 pt) for elements in order to keep the line spacing acceptable. If I had to choose between the two, I'd rather have 7.2 rendering than 7.3 because at the cost of some extra white-space, I can still use the variable font size feature which is extremely useful to me. HTH and GREAT product BTW. I am new to NB and the IDE is just fantastic and especially the highly rationalized, well documented plugin framework is extraordinarily valuable to me. Cheers.
Yup, fonts are larger(first thing I noticed when I launched 7.3 beta). My font size is set to 14pt in both 7.2 and 7.3 installations, and I seemed to have lost view of a couple lines of code in the editor (Vertical real estate). Haven't seen fonts being clipped yet, maybe that's because I'm using a smaller font size. Hope you guys can fix this before the official 7.3 release! thanks, RZ
Created attachment 128858 [details] Aharoni 48 pts on same line as "normal " 12 pt text. Fixed! Aharoni 48 pts!
So I marked the issue as fixed. I've introduced additional TextLayout measurements as part of fix of issue #215785 (and there were some minor fixes later). There's still a remaining issue #219291 to be fixed. Btw to display a detailed font measurements info a command line parameter -J-Dorg.netbeans.modules.editor.lib2.view.FontInfo.level=FINE may be used when running the IDE.
Miloslav, OK I downloaded 7.2 and it updated itself so that it is current as of this posting. After the update, it regressed , that is, if you had fixed it in 7.2. But I think maybe it's fixed in 7.3 and not 7.2. Is that correct? Also, I am not sure what this is: Btw to display a detailed font measurements info a command line parameter -J-Dorg.netbeans.modules.editor.lib2.view.FontInfo.level=FINE may be used when running the IDE. Does this output some read-only info to output or does it enable a new set of options in the Options dialog or what? Thank you for looking at this, I use this feature heavily and I know a lot of other people probably do also.