JDK-4417174 : stddoclet: Creates invalid stylesheet.css file (font-size: normal)
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.3.1,1.4.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: other,linux_redhat_7.2,windows_2000
  • CPU: generic,x86
  • Submitted: 2001-02-20
  • Updated: 2014-05-05
  • Resolved: 2002-09-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
1.4.2 mantisFixed
Related Reports
Duplicate :  
Duplicate :  
Description
Name: boT120536			Date: 02/20/2001

java version "1.3.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-beta-b15)
Java HotSpot(TM) Client VM (build 1.3.1beta-b15, mixed mode)

Java Source Code (Empty.java):
public class Empty { }

Steps to Reproduce:
javadoc Empty

The generated stylesheet.css file contains the lines:
.FrameTitleFont   { font-size: normal; font-family: normal }
.FrameHeadingFont { font-size: normal; font-family: normal }
.FrameItemFont    { font-size: normal; font-family: normal }

These lines generate the following errors when run through the W3C CSS
validator (http://jigsaw.w3.org/css-validator/):
Line: 14 Context : .FrameTitleFont Invalid number : font-size
normal is not a font-size value : normal
Line: 15 Context : .FrameHeadingFont Invalid number : font-size
normal is not a font-size value : normal
Line: 16 Context : .FrameItemFont Invalid number : font-size
normal is not a font-size value : normal
(Review ID: 117336) 
======================================================================
Another submitter:

    http://java.sun.com/j2se/1.3/docs/api/stylesheet.css  references
    font-family: normal in several styles.  This is not correct per 
    w3c spec since normal is not a keyword.  

    I recently added fonts to my system including one named
    "normal" which this stylesheet causes to be used in the javadoc
    left-hand frames.  It is a large and whimsically styled font family
    which is quite annoying in this context.
    Perhaps this should have been
    font-style: normal
    instead.  But in any case please leave off the 
    font-family specification to allow it to default instead of 
    specifying "normal".
    
     ###@###.###

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis mantis-b03
2004-06-14

WORK AROUND Name: boT120536 Date: 02/20/2001 Manually edit the stylesheet.css file each time javadoc is run, and specify the value "medium" for the font-size property. ======================================================================
2004-06-11

SUGGESTED FIX The solution should be backward compatible. There are no valid values that are backward compatible, so: I suggest changing the font-size and font-family values in these lines to these valid values, but then also commenting out these lines. Commenting out the lines gives them the same effect as the formerly illegal values "normal", and so is backward compatible. /* Font used in left-hand frame lists */ /* .FrameTitleFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */ /* .FrameHeadingFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */ /* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */ Also, please remove the two commented lines, which are no longer needed now that the above lines are commented out: /* Example of smaller, sans-serif font in frames */ /* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */ There is no "font-size:" value that can duplicate the illegal value "normal", which apparently allowed the default size to display. (Value "medium" doesn't do it, and relative size of zero "+0" doesn't work.) Likewise, there is no "font-family" value that duplicates the illegal value "normal", which also allowed the default family to display.
2004-06-11

EVALUATION It appears from the workaround that this person is asking us to change "normal" to "medium". However, in Netscape on Solaris, this changes the fonts in the left-hand frame from serif (Times) to sans-serif (Courier). In this example, the default font in Preferences is Times. So this is not an acceptable fix. I'll write to ask him what he suggests. doug.kramer@Eng 2001-02-22 His suggestion is to omit the font-size, since neither normal nor medium work (would "default" work?), and to change font-family to serif. Details under "Comment". My suggested fix is under "Suggested Fix". doug.kramer@Eng 2001-02-23 Assigning to Jamie to implement. The final file should look like the attached file stylesheet.css doug.kramer@Eng 2001-03-28 This bug has been fixed in 1.4.0. The final file now looks like the attached file. Location of fix: StylesheetWriter.java jamie.ho@Eng 2001-05-29 I have to reopen this bug because it was not fixed properly. The new lines in the stylesheet should be commented out (as mentioned in the suggested fix). Also, pts should be pt in the stylesheet. ###@###.### 2001-10-26 In addition to the two bugs mentioned above, the word "sans-serif" is newly misspelled. It is misspelled "san-serif". .FrameTitleFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif } Should read: .FrameTitleFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } ###@###.### 2002-07-08 The point of setting the font size is to make the font in the left-hand frame smaller, so more characters of a long word are visible. I suggest making the font size relative, rather than just choose 10pt. A value of 80% seems good. ###@###.### 2002-08-28 80% was too small for Internet Explorer, so I changed it to 90% No regression test supplied, because the original problem was just a typo in the source. ###@###.### 2002-09-11
2002-09-11

PUBLIC COMMENTS This bug has been fixed. jamie.ho@Eng 2001-05-29 This bug has been fixed again, this time by setting the font size to 80% and correctly spelling "sans-serif": /* Font used in left-hand frame lists */ .FrameTitleFont { font-size: 80%; font-family: Helvetica, Arial, sans-serif } .FrameHeadingFont { font-size: 80%; font-family: Helvetica, Arial, sans-serif } .FrameItemFont { font-size: 80%; font-family: Helvetica, Arial, sans-serif } Also removed the example of making the font size smaller, since it is implemented above: /* Example of smaller, sans-serif font in frames */ /* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */ No need for a regression test, as this was simply a typo fix. ###@###.### 2002-09-05
2002-09-05