Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 32667 - Help View doesn't show help in right fontsize when -fontsize startup parameter is used.
Help View doesn't show help in right fontsize when -fontsize startup paramete...
Product: usersguide
Classification: Unclassified
Component: Code
All All
: P3 (vote)
: 6.x
Assigned To: Victor Vasilyev
: A11Y
: 16920 34496 61677 152298 154793 156103 (view as bug list)
Depends on:
Blocks: 40668
  Show dependency treegraph
Reported: 2003-04-07 09:17 UTC by Marian Mirilovic
Modified: 2010-04-22 09:13 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT

Help window with -fontsize 18 startup parameter set (27.27 KB, image/gif)
2003-04-07 09:18 UTC, Marian Mirilovic
Patched up / better behaved ide.css using "pt" base font size. (3.90 KB, text/plain)
2007-11-30 00:15 UTC, pbannister
Fontsize 18 (after fix implemented) (176.89 KB, text/plain)
2009-04-15 07:35 UTC, Irina Filippova
Default fontsize (for comparison with fontsize 18) (124.61 KB, text/plain)
2009-04-15 07:36 UTC, Irina Filippova
Help with fontsize 18 (176.89 KB, image/jpeg)
2009-04-17 09:53 UTC, Irina Filippova
Default fontsize (for comparison with fontsize 18) (124.61 KB, image/jpeg)
2009-04-17 09:54 UTC, Irina Filippova

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Mirilovic 2003-04-07 09:17:38 UTC
[s1s5](030406), [jdk1.4.1](02)

see attached screenshot, IDE runs with -fontsize
18, but Help View shows help in default fontsize.
Comment 1 Marian Mirilovic 2003-04-07 09:18:26 UTC
Created attachment 9729 [details]
Help window with -fontsize 18 startup parameter set
Comment 2 _ tboudreau 2003-04-14 12:24:43 UTC
I'll look into it, but this may be difficult or impossible to fix.
The help text is in HTML.  If they are using a style sheet with fixed
font sizes or anything like that, fontsize definitely won't make a 
difference.  And I don't think it would make a difference even without
it - fontsize changes the font sizes in UIDefaults.  AFAIK html
rendering does not look in UIDefaults to determine font sizes.  

Perhaps some hack could be done, but if it involves modifying HTML
on the fly, that would not be a good one to do.
Comment 3 _ tboudreau 2003-04-17 12:57:41 UTC
Setting milestone to future.  I'll look into it, but probably the 
fix must be in JavaHelp or Swing HTML rendering itself.
Comment 4 Wendy Blatt 2003-07-15 16:19:45 UTC
would this issue be analgous to the features offered by the Fonts
Preference window of Netscape browser for example?

I can set a preferred size for mono and proportional.  I can opt to
let the html documents control the size or not. I can also set a
minimum size.

It would be great if NB can offer at least some part of that
flexibility to users 

I run into this issue a lot using NB over a terminal server.  I have
to specify -fontsize 10 to provide a good mapping for the terminal
server fonts available based on my desktop display resolution. The
default font size/type does not map well, so some less than desirable
font is used unless I specify -fontsize.
Comment 5 _ tboudreau 2003-09-09 04:06:29 UTC
*** Issue 34496 has been marked as a duplicate of this issue. ***
Comment 6 Patrick Keegan 2003-11-06 16:57:02 UTC
upping to P3. No obvious solution, but there's is a clear annoyance
from a user point of view.
Comment 7 _ tboudreau 2003-11-06 17:43:45 UTC
FWIW, Swing HTML rendering will respect the font size of the component
if you just try to render plain HTML.  I have no idea what JavaHelp
does wrt that; I suspect it may depend on the style sheet not hard
coding sizes also.
Comment 8 Patrick Keegan 2003-11-06 18:03:12 UTC
Our style sheet does code sizes (e.g. "small", "medium") to retain
proportion between various tags. Paul, what kind of effect on our
styles would deleting the font sizes have? It seems that the sizes
coded there pretty much correspond to what sizes would be used anyway,
e.g. <body> and <p> are small, <h3> is medium, <h2> is large.
Comment 9 _ tboudreau 2003-11-16 11:11:19 UTC
In straight HTML you can do things like font size=+2.  It's been about
five years since I worked heavily with CSS, so I'm not sure, but I
think CSS supports similar relative size definitions.

Maybe try swapping relative size definitions for the "small" type
things in the docs and see if it solves the problem?

Reassigning to core/docs for the time being - Patrick, give it a try
(and give me a shout if you need any assistance).  If you get nowhere,
assign the issue back to me.
Comment 10 Patrick Keegan 2003-11-18 22:07:57 UTC
Tim, are you saying that if we used the "font size=+2" type attributes
instead of "small" etc., the IDE's -fontsize setting could then apply
to the IDE's help as well?
Comment 11 Marian Mirilovic 2006-02-03 15:43:18 UTC
*** Issue 61677 has been marked as a duplicate of this issue. ***
Comment 12 mslama 2006-06-06 13:27:17 UTC
*** Issue 16920 has been marked as a duplicate of this issue. ***
Comment 13 Patrick Keegan 2006-06-06 14:03:31 UTC
Quoting from questions in issue 16920:
"Patrick is ide.css correct CSS used for JavaHelp content?"

"I expect then we could use fontsize passed to IDE as default base size for small
and then set percentage increase like it is set now (125%, 150% or whatever it
is in Swing)."

That sounds reasonable to me
Comment 14 Marian Petras 2006-06-06 14:22:24 UTC
"I expect then we could use fontsize passed to IDE as default base size for
small ..."

Please use the fontsize as default base size for "medium", not for "small". Do
not get confused by web page authors who routinely use "fontsize: small" for the
basic web page content. They just like small letters.

Comment 15 Patrick Keegan 2006-06-06 14:37:34 UTC
"Please use the fontsize as default base size for "medium", not for "small"."
Even though fontsize "small" is what is used for size in basic tags, such as <p>
in the help?
Comment 16 Marian Petras 2006-06-08 11:45:11 UTC
We had a face-to-face discussion with Patrick Keegan and found that using
"small" instead of "medium" is a workaround for wrong rendering of text in the
JDK's HTML editor kit. We will not change it until a better solution is found.
Comment 17 Marian Petras 2006-06-12 13:31:30 UTC
JavaHelp allows to programatically set the font to be used in JavaHelp. The
respective method is f)

I did not find any usage of the HelpBroker class in the NetBeans code. It is not
necessary for implementation of a help system. Maybe the NetBeans code could be
changed such that the HelpBroker (its setFont(...) method) is used. Richard
Gregor should be able to help with this.
Comment 18 pbannister 2007-11-30 00:15:15 UTC
Created attachment 53696 [details]
Patched up / better behaved ide.css using "pt" base font size.
Comment 19 pbannister 2007-11-30 00:17:42 UTC
Attached an updated ide.css that *should* behave better on all platforms.

The base font size is defined in terms of "pt", which should be scaled properly for different DPI displays.
Comment 20 Marian Petras 2007-11-30 08:14:37 UTC
Using "pt" should keep the actual font size, no matter what the resolution of the display is. But it does not respect
the user's preferred size. If the user wants the letters to be larger (e.g 14 pt), using "12pt" on the CSS will override
his/her preferences.
Comment 21 Antonin Nebuzelsky 2008-11-14 15:21:19 UTC
Reassigning to the new "core/help system" owner obarbashov.
Comment 22 Oleg Barbashov 2008-12-18 16:22:57 UTC
*** Issue 154793 has been marked as a duplicate of this issue. ***
Comment 23 Quality Engineering 2008-12-23 14:22:09 UTC
This issue had *2 votes* before move to platform component
Comment 24 Alexei Mokeev 2009-03-05 13:58:03 UTC
Moving JH issues to Victor.
Comment 25 Victor Vasilyev 2009-03-24 18:08:01 UTC
OK. I am able to reproduce with bug on the Windows platform, but --fontsize 18 (i.e. option with double dash) should be
isted instead. I'll look into it...
Comment 26 Victor Vasilyev 2009-04-10 22:51:56 UTC
I see it was hot discussion for six years to fix this bug :-)

Actually, after discussion this issue describes two problems:
1. An initial problem is impossibility to set a default font size for the JavaHelp Content Viewer via the --fontsize
option of the netbeans command through CLI. 
2. Another problem is an inconsistent font size that is used to display text defined inside both the <body> tag and <p>
tags of HTML pages. AFAIU user expectation is to see the font size is the same as it specified by the value of the
--fontsize option, or at least not smaller. 

The changeset adds ability to set a default font size inside the content
viewer that is represented in the JavaHelp by the JEditorPane component. 

My understanding is the second problem should be fixed by changing the CSS file 
I think, all styles should be revised in this CSS and a default font size should be used inside both <body> and <p> tags.

Note, according to the the default font size corresponds to the font "medium" (not "small"!).
Comment 27 Victor Vasilyev 2009-04-10 23:28:34 UTC
*** Issue 152298 has been marked as a duplicate of this issue. ***
Comment 28 Victor Vasilyev 2009-04-10 23:31:16 UTC
*** Issue 156103 has been marked as a duplicate of this issue. ***
Comment 29 Quality Engineering 2009-04-11 19:07:04 UTC
Integrated into 'main-golden', will be available in build *200904111401* on (upload may still be in progress)
User: Victor G. Vasilyev <>
Log: Fix of the issue #32667. The JavaHelpGetContentViewerTest checks compatibility with the version of the JavaTest.
Comment 30 Patrick Keegan 2009-04-12 19:52:58 UTC
 > "Note, according to the the default font size corresponds to the font "medium" (not

IIRC, there is an anomoly is JEditorPane's implementation that makes medium look much too large for body text - thus the
strange-looking definitions in the css.
Comment 31 Irina Filippova 2009-04-15 07:34:12 UTC
Checked on dev build 200904141401
Started the IDE with --fontsize 18, --fontsize 14, and default fontsize --- the fontsize of JavaHelp files changes
accordingly - see attachments for fontsize 18 and default. 

The only inconvenience which I noticed - is for fontsize 24, the TOC entries overlap, so that they become unreadable.
However, as 24 is a very large font, so probably it is not an issue. 

For the initial problem: "Help View doesn't show help in right fontsize when -fontsize startup parameter is used" this
bug can be closed.
Comment 32 Irina Filippova 2009-04-15 07:35:11 UTC
Created attachment 80103 [details]
Fontsize 18 (after fix implemented)
Comment 33 Irina Filippova 2009-04-15 07:36:00 UTC
Created attachment 80104 [details]
Default fontsize (for comparison with fontsize 18)
Comment 34 Victor Vasilyev 2009-04-15 13:51:14 UTC
Hi Irina,

Thanks for review of my fix.

FYI Your two last attachments are not viewable due to their MIME types which is text/plain, but not image/jpeg.
Probably you need do both actions for attachments:
(1) use a non-Windows style for the file name extensions, i.e *.jpg , but not *.JPG  
(2) choose the image/jpeg MIME type explicitly on the "Create attachment" page.

Victor Vasilyev
Comment 35 Irina Filippova 2009-04-17 09:51:14 UTC
Oops, my fault. Reattaching the screenshots.

- Irina
Comment 36 Irina Filippova 2009-04-17 09:53:23 UTC
Created attachment 80320 [details]
Help with fontsize 18
Comment 37 Irina Filippova 2009-04-17 09:54:14 UTC
Created attachment 80321 [details]
Default fontsize (for comparison with fontsize 18)
Comment 38 Irina Filippova 2009-04-22 07:53:11 UTC
I vote for closing this issue as fixed.
The new issue - - has been created for changing the default
fontsize of help
Comment 39 Victor Vasilyev 2009-04-22 10:00:45 UTC
+1 for closing this issue as fixed.
Comment 40 Irina Filippova 2009-05-14 17:42:50 UTC
Checked again on 6.7 build 200905121401.
When --fontsize startup option is used, the fontsize of help is changed accordingly. 

Closing the issue as fixed.
Comment 41 Marian Mirilovic 2010-04-22 09:13:50 UTC

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