Closed Bug 60412 Opened 25 years ago Closed 25 years ago

case sensitivity of generic font families ("SERIF" becomes "System"?!)

Categories

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

x86
Windows 2000
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: ian, Assigned: pierre)

References

Details

(Keywords: css1, fonts, testcase)

Attachments

(2 files)

STEPS TO REPRODUCE Use a generic font-family followed by another font family in a "font-family" decleration, but don't give the generic font family name in lowercase. For example: p { font-family: SANS-SERIF, Verdana; } ACTUAL RESULTS Assuming the first font that matches is the generic font-family that is not lowercase, then the font chosen will be "System" (on Windows). EXPECTED RESULTS Generic font-families should be case insensitive throughout. It seems we are only case insensitive when parsing, but when applying the font do some funky stuff and pass the generic name to the system. So we realise that we should use the 'sans-serif' font in the example above, but then actually try to set the font to 'SANS-SERIF' instead of finding the actual value.
There is also some extra funky caching stuff happening -- the following: font-family: SERIF ...will then mess up any future use of the 'serif' generic font-family. Or so it seems. This is all very strange from a black-box point of view! ;-)
QA Contact: chrisd → ian
This is a dup of bug 56816, but this one is better explained and has a testcase....
*** Bug 56816 has been marked as a duplicate of this bug. ***
I have put in a patch to fix this.
Keywords: patch, review
Good catch, Mike! We need to apply the same fix to the gtk code. Cc'ing Kevin for his r=. sr=erik
Do we need to apply the same fix to GTK? It looks like GTK already lowercases all font names, and Mac does its own thing which looks (?) like it will work.
Oops, you're right, we don't need to apply this fix to the GTK version, since it already lower-cases font names. I don't know about the Mac. We should have somebody (QA) test the Mac (and Unix, just to be sure).
Fix checked in on Windows and OS/2. Does someone want to sign up for QA on the Mac and GTK? Another good site to test this on is http://www.adobe.com
Unless someone volunteers to verify that this is not a bug on GTK and Mac, I'm going to close this one out.
Fixed.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
verified
Status: RESOLVED → VERIFIED
Madhur: Verified on what platforms and with what test cases? This bug is very platfrom specific and was originally only tested on Windows.
i checked it on winXP, MacOSX and linux 8.0 with with testcase attachment 19365 [details]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: