Closed Bug 518746 Opened 15 years ago Closed 15 years ago

CSS font-family "monospace" renders smaller then "unknown font, monospace" but should be the same

Categories

(Core :: Layout: Text and Fonts, defect)

defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 175415

People

(Reporter: abel.online, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14 (.NET CLR 3.5.30729)

When you select a style font-family: monospace, you expect the font-size to be the same as 1em. That this isn't the case it already reported (i.e. https://bugzilla.mozilla.org/show_bug.cgi?id=328621). But when you select font-family: monospace, monospace or when you select font-family: unknown font, monospace, it should render the same (i.e., the same as just monospace). This is not the case, the sizes are different.

Reproducible: Always

Steps to Reproduce:
1. Write the line <p style="font-family:monospace">This is monospace</p>
2. Write the line <p style="font-family:unknownfont, monospace">This is monospace</p>
3. Place both in an HTML without additional CSS
4. Open in the browser
Actual Results:  
The first paragraph will render smaller then the second paragraph

Expected Results:  
Both paragraphs must be equal

The odd thing is that when selecting *only* "monospace" the rendering is smaller then the font size. In all other cases, where either an actual font is selected or when you use a dummy before "monospace" will render in normal size:

font-family: monospace;               /* renders small */
font-family: monospace, monospace;    /* renders normal (!!) */
font-family: courier new, monospace;  /* renders as courier or normal */
font-family: unknown font, monospace; /* renders normal (!!) */
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
> 1. font-family: monospace;               /* renders small */

FYI.
font-size specified at Fonts for: Western(because ISO-8859-1 page), Monospace, Size: looks to be used in this case. If the setting is changed to 20 or 30, result is changed to next. This is observed with SeaMonkey 1.1.8 and Fx 3.5.3 too.
> 1. font-family: monospace; /* rendered large */
Interesting, I read through that bug file and figured it was not related. Reading it once more, I see it does seem to be related. Hmm, the year 2002 and still marked NEW?

Thanks for the follow-up.
You need to log in before you can comment on or make changes to this bug.