Closed Bug 12453 Opened 25 years ago Closed 24 years ago

font-weight lighter cycles around

Categories

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

defect

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: dbaron, Assigned: erik)

References

()

Details

(Keywords: css1, css2, fonts, Whiteboard: WORKSFORME? need to test on Mac)

Attachments

(2 files)

DESCRIPTION:  If you start at weight 900 and do lighter 9 times (on descendants)
you get a bold font again.  It takes 5 times for weight 500 and only 1 for 100.

STEPS TO REPRODUCE:  Load attached testcase

ACTUAL RESULTS:  Words toward the end of lines become bold.

EXPECTED RESULTS:  Only the word "900" should be bold.

DOES NOT WORK CORRECTLY ON:
 * Linux, viewer, 1999-08-24-08-M9
 * Windows, viewer, 1999-08-24-09-M9

WORKS CORRECTLY ON:
 * Windows IE 4.0

WORKS A DIFFERENT INCORRECT WAY ON:
 * Linux NN 4.6
 * Windows NN 4.6

ADDITIONAL INFORMATION:
lighter shouldn't act like a decrease by 100, and here it seems to be (but if
you look at the other cases in the URL in Daniel Glazman's test suite, it
doesn't act that way!).  Lighter should take one step down among the available
weights - if you're at weight 800 (which acts just like 700), lighter should
take you down to 400 (normal).  This is what happens, which is why this bug
puzzles me so much.

(NN 4.6 does just treat lighter as a step by 100.)

See http://www.w3.org/TR/REC-CSS1#font-weight (and the analogous section of
CSS2, really)
The relevant sections of CSS2 are:
http://www.w3.org/TR/REC-CSS2/fonts.html#propdef-font-weight
http://www.w3.org/TR/REC-CSS2/fonts.html#q46

The fact that the "500" is also bold on Windows (not Linux) is covered by bug
972.
Once bug 972 is fixed, the EXPECTED RESULTS should read: Every word "lighter"
should be lighter than the word before it, unless the word before it is the
lightest possible, in which case it should be the same as the word before it
(and not bolder).
Assignee: troy → peterl
Component: Layout → Style System
Peter, I think this is style system, too
Pushing off non-beta 1 issues
Assignee: peterl → kmcclusk
Status: ASSIGNED → NEW
This needs the font-weight stepping logic in the font code like we discussed.
Status: NEW → ASSIGNED
Target Milestone: M15 → M11
Assignee: kmcclusk → ramiro
Status: ASSIGNED → NEW
Add support for font weights on WIN32.
Previously, all fonts displayed as normal if they where below 400 and as bold if
they were greater .

Now the available fonts are queried and the font weight is selected based on
the algorithm provided in the the CSS2 spec.
Also implemented the CSS1 lighter and bolder logic by looking for the next
available weight.
The weights are queried and cached the first time the font is loaded to avoid
having to query the weights multiple times
for the same font.

Fixed in the Sept 20, 1999, 2:30PM build on WIN32.

Ramiro, reassigning to you for Linux. When working under Linux, please reassign
to dcone for Mac.
QA Contact: petersen → chrisd
Assignee: ramiro → dcone
Reassigning to dcone.

dcone: when you are done, reassigning to pavlov@netscape.com for the linux work.
Status: NEW → ASSIGNED
Target Milestone: M11 → M12
Target Milestone: M12 → M13
Target Milestone: M13 → M14
Keywords: css1
Migrating from {css1} to css1 keyword. The {css1}, {css2}, {css3} and {css-moz}
radars should now be considered deprecated in favour of keywords.
I am *really* sorry about the spam...
Summary: {css1}font-weight lighter cycles around → [FONT]{css1}font-weight lighter cycles around
Summary: [FONT]{css1}font-weight lighter cycles around → [FONT]font-weight lighter cycles around
Target Milestone: M14 → M15
Keywords: fonts
Summary: [FONT]font-weight lighter cycles around → font-weight lighter cycles around
Target Milestone: M15 → M17
Target Milestone: M17 → M18
This bug has been marked future because we have determined that it is not 
critical for netscape 6.0.  If you feel this is an error, or if it blocks your 
work in some way -- please attach your concern to the bug for reconsideration.
Target Milestone: M18 → Future
pavlov, dcone is busy, please look into linux. thanks
Assignee: dcone → pavlov
Status: ASSIGNED → NEW
Keywords: css2
Target Milestone: Future → ---
As per meeting with ChrisD yesterday, taking QA.
Keywords: correctness, nsbeta3
QA Contact: chrisd → py8ieh=bugzilla
reassigning to erik, cc ftang
Assignee: pavlov → erik
WORKSFORME with:
   Windows 2000 commercial bits 6.0.17.2000010804.
   Some, um, unixy build, labelled 2000073009.

Should be tested on Mac.
Keywords: qawanted
Whiteboard: WORKSFORME? need to test on Mac
Mark work for me , please test Mac
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
My Mac is not currently able to run Mozilla usably. Chris, do you have a Mac
you could check this on? If you don't, punt it back to me and I'll find someone
who can check it for me. Thanks.
QA Contact: py8ieh=bugzilla → chrisd
Tested on Mac with 9/12 build. Every span is lighter or the same as the parent. 
Additional comments: I am attaching a testcase that expands on David's by 
including font-weights of 100, 200, 300, 400, 500, 600, 700, 800, and 900. In 
this testcase, a default font is used and I am assuming that there are only 2 
font-weights for that font because for each font weight, the first 'lighter' is 
'normal' and remains unchanged. I will verify this bug fixed. Please reopen if 
there are further problems.
Status: RESOLVED → VERIFIED
Keywords: qawanted
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: