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.
Font size of javadoc part of Code completion is too big. It's regression - As you can see on attached screenshots: 1. it works fine in [nb_dev](200406141800), [jdk1.5.0](b51) (first screenshot) 2. font is too big [nb_dev](200406201800)[jdk1.5.0](b51)
Created attachment 15878 [details] previous font size - [nb_dev](200406141800)
Created attachment 15879 [details] current (tto big) font size - [nb_dev](200406201800)
I cannot reproduce it. And I cannot find a relevant cvs changelog that could cause this between 14.6 and 20.6 :-( Marian, could you please find out exactly the last build where this worked and the build where it was broken? Thanks. What LF do you use? Metal?
Mato, should be a missing font the cause of this problem ?
Mato, I am using Linux and default L&F (metal), I am sorry but I have no resources for investigation it now, sorry .....
maybe related to issue 42824 ....
[20040603, 20040606], jdk1.4.2_04 I tried open the Javadoc CC in build befeore/after the Trung's commit (see issue 42824) and I have observed the change in font size. But after restart of the IDE the font size was back. Only by the first start is visible the changed font! Before the change I have bigger font in Javadoc window CC than the CC window itself. Now I have the same font for both windows (by first start). It looks better now, but there are not used the same font for all Linux systems.
So it's confirmed that this is a regression caused by integration of issue 42824 => closing as dup of it as it's now reopened (I've added a note to the related issue as well). *** This issue has been marked as a duplicate of 42824 ***
No it can't be caused by fix for issue 42824. I only modified the style for the html editor kit attached to a text area in the wizard to make it use *smaller* font. This is the essence of the fix if (description.getEditorKit() instanceof HTMLEditorKit) { // override the Swing default CSS to make the HTMLEditorKit use the // same font as the rest of the UI. This must be done in addNotify() // because before the components are realized the font sizes are wrong // on GTKLookAndFeel HTMLEditorKit htmlkit = (HTMLEditorKit) description.getEditorKit(); StyleSheet css = htmlkit.getStyleSheet(); Font f = jLabel1.getFont(); css.addRule(new StringBuffer("body { font-size: ").append(f.getSize()) // NOI18N .append("pt; font-family: ").append(f.getName()).append("; }").toString()); // NOI18N }
Well, but if the instance of the HTMLEditorKit would be shared by multiple editor pane instances your fix could affect others as well. IIRC the kit instances are cloned for use in other panes. The HTMLEditorKit.clone() does not deep-copy the "defaultStyles" variable so the same physical StyleSheet instance would be used. But I'm just guessing here - I need to verify first that this really happens.
Mila is right. This issue is a regression caused by the fix for issue #42824. StyleSheet is shared by all HTMLEditorKit instances. Here is javadoc of HTMKEditorKit.getStyleSheet(): /** * Get the set of styles currently being used to render the * HTML elements. By default the resource specified by * DEFAULT_CSS gets loaded, and is shared by all HTMLEditorKit * instances. */ And you can easily test it (the sharing of css) by the following scenario: 1. start IDE 2. open code completion javadoc popup. The font should be OK. 3. Then open File/New project wizard - it causes that styleSheet will be modified 4. check the cc javadoc again, font is bigger (css is sharing) Resolving as duplicate. *** This issue has been marked as a duplicate of 42824 ***
*** Issue 46741 has been marked as a duplicate of this issue. ***
verified in [nb_dev](200408011800)
*** Issue 37313 has been marked as a duplicate of this issue. ***