Closed Bug 32252 Opened 24 years ago Closed 24 years ago

Small Caps font too small

Categories

(Core :: CSS Parsing and Computation, defect, P3)

x86
Windows 2000
defect

Tracking

()

VERIFIED INVALID
blocking-b2g 2.2?
Tracking Status
b2g-v2.1S --- ?

People

(Reporter: mozilla, Assigned: pierre)

References

Details

Attachments

(3 files)

This simple HTML/CSS is rendered way too small by Mozilla:

<p style="font-family: Verdana, Arial, sans-serif; font-size: 
x-small;font-weight: bold;font-variant: small-caps;">Here is some text</p>

I will attach a screenshot comparing IE5, NC 4.x and Mozilla's rendering of 
this.
Sounds more like a style system issue.
Assignee: troy → pierre
Component: Layout → Style System
QA Contact: petersen → chrisd
Attached image Same HTML/CSS for each
IE doesn't support small-caps: it displays everything in caps.
Nav doesn't support small-caps either: it displays the string as-is.
Moz renders correctly:
- The upper-case letters (A-CNC-P-S) are identical to what we have in IE and Nav.
- The lower-case letter are scaled and rendered as small upper-case letters. If 
you think these letters are too small, increase the font-size: according to your 
code snippet, you are using 'x-small' which by definition isn't very big, 
especially when you shrink it even more. Closed as Invalid.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
Umm. This is a problem. Are you suggesting that any sites that use this should 
now have to sniff browsers because Mozilla's "correctness" overrides the need to 
be somewhat compatible? If I set the font larger, it is going to be HUGE in IE5 
and NC 4.X. That is not acceptable.
You are apparently mistaken about IE5. I have created an attachment showing how 
IE5 renders small-caps versus letters actually typed IN ALL CAPS. Both 
paragraphs were defined to have the same text size. This is the code used to 
produce the picture in the attachment:

-----HTML-----
<html>
<head>
<style type="text/css">
.test {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; 
font-weight: bold}
</style>
</head>

<body>
<p class="test" style="font-variant: small-caps;">this is some text </p>
<p class="test">THIS IS SOME TEXT</p>
<p>Theoretically P1 will be identical to P2.</p>
</body>
</html>
-----HTML-----
It depends on the platform and the version number. The beta version of IE5 on 
Macintosh is the only one which supports small-caps correctly, like Mozilla and 
according to the spec (see http://www.w3.org/TR/REC-CSS2/fonts.html#propdef-font-
variant). As a summary, the spec says for small-caps:
- Display upper-case as usual.
- Display lower-case as upper-case but smaller than normal upper-case (it doesn't 
say how much smaller).

IE5 on Windows converts lower-case letters to upper-case and displays the 
resulting string one size smaller than the normal size. Both things are wrong:
1) You cannot tell upper-case letters from lower-case anymore.
2) Upper-case letters shouldn't be smaller than normal text.

IE4.5 on Mac simply convert lower-case to upper-case.

Nav4x doesn't support small-caps at all. The attribute is ignored.

Since the behaviors of currently available browsers are all different and all 
wrong in their own way, we can't do a quirk that satisfies everybody and we just 
follow the spec. However I agree that Moz small-caps are a bit too small. I 
changed the ratio from 0.7 to 0.8, the same as MacIE5.
FYI with the fix above, Moz and MacIE5 have the exact same display for small-caps 
which is not surprising since they share Todd Fahrner's font sizing algorithm. 
Hopefully WinIE5.5 will support it too.
Verified invalid
Status: RESOLVED → VERIFIED
*** Bug 1516 has been marked as a duplicate of this bug. ***
*** Bug 1516 has been marked as a duplicate of this bug. ***
Mass removing self from CC list.
Now I feel sumb because I have to add back. Sorry for the spam.
[Tracking Requested - why for this release]:
blocking-b2g: --- → 2.2?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: