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.
Summary: | Help View doesn't show help in right fontsize when -fontsize startup parameter is used. | ||
---|---|---|---|
Product: | usersguide | Reporter: | Marian Mirilovic <mmirilovic> |
Component: | Code | Assignee: | Victor Vasilyev <vvg> |
Status: | CLOSED FIXED | ||
Severity: | blocker | CC: | mpetras, pkeegan, vvg |
Priority: | P3 | Keywords: | A11Y |
Version: | 3.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 40668 | ||
Attachments: |
Help window with -fontsize 18 startup parameter set
Patched up / better behaved ide.css using "pt" base font size. Fontsize 18 (after fix implemented) Default fontsize (for comparison with fontsize 18) Help with fontsize 18 Default fontsize (for comparison with fontsize 18) |
Description
Marian Mirilovic
2003-04-07 09:17:38 UTC
Created attachment 9729 [details]
Help window with -fontsize 18 startup parameter set
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. Setting milestone to future. I'll look into it, but probably the fix must be in JavaHelp or Swing HTML rendering itself. 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. *** Issue 34496 has been marked as a duplicate of this issue. *** upping to P3. No obvious solution, but there's is a clear annoyance from a user point of view. 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. 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. 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. 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? *** Issue 61677 has been marked as a duplicate of this issue. *** *** Issue 16920 has been marked as a duplicate of this issue. *** Quoting from questions in issue 16920: "Patrick is ide.css correct CSS used for JavaHelp content?" Yes. "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 "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. Links: http://www.w3.org/TR/REC-CSS2/fonts.html#font-size-props http://www.htmlhelp.com/reference/css/font/font-size.html "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? 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. JavaHelp allows to programatically set the font to be used in JavaHelp. The respective method is javax.help.HelpBroker.setFont(Font 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. Created attachment 53696 [details]
Patched up / better behaved ide.css using "pt" base font size.
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. 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. Reassigning to the new "core/help system" owner obarbashov. *** Issue 154793 has been marked as a duplicate of this issue. *** This issue had *2 votes* before move to platform component Moving JH issues to Victor. 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... 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 http://hg.netbeans.org/main/rev/8367db934bf7 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 usersguide\javahelp\org\netbeans\modules\usersguide\ide.css 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 http://www.w3.org/TR/CSS21/ the default font size corresponds to the font "medium" (not "small"!). *** Issue 152298 has been marked as a duplicate of this issue. *** *** Issue 156103 has been marked as a duplicate of this issue. *** Integrated into 'main-golden', will be available in build *200904111401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/8367db934bf7 User: Victor G. Vasilyev <vvg@netbeans.org> Log: Fix of the issue #32667. The JavaHelpGetContentViewerTest checks compatibility with the version of the JavaTest. > "Note, according to the http://www.w3.org/TR/CSS21/ the default font size corresponds to the font "medium" (not "small"!)." 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. 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. Created attachment 80103 [details]
Fontsize 18 (after fix implemented)
Created attachment 80104 [details]
Default fontsize (for comparison with fontsize 18)
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 and (2) choose the image/jpeg MIME type explicitly on the "Create attachment" page. Cheers, Victor Vasilyev Victor, Oops, my fault. Reattaching the screenshots. - Irina Created attachment 80320 [details]
Help with fontsize 18
Created attachment 80321 [details]
Default fontsize (for comparison with fontsize 18)
I vote for closing this issue as fixed. The new issue - http://www.netbeans.org/issues/show_bug.cgi?id=162964 - has been created for changing the default fontsize of help +1 for closing this issue as fixed. 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. v/c |