Closed
Bug 365613
Opened 18 years ago
Closed 18 years ago
[regression] all font-weight are displayed as 'bold' except for the 'normal' keyword and '400'
Categories
(Core :: Graphics, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: phiw2, Assigned: masayuki)
References
Details
Attachments
(3 files, 3 obsolete files)
font-weight: lighter, font-weight: 100 (200, 300, 500) are displayed as bold. Expected: displayed as 'normal', as Mac builds cannot display any of the numerical font-weights correctly (bug 972) This worked correctly up to the Fx 2006122104 build, fails afterwards. regression from bug 364678.
![]() |
Reporter | |
Comment 1•18 years ago
|
||
![]() |
Reporter | |
Comment 2•18 years ago
|
||
![]() |
Reporter | |
Updated•18 years ago
|
Assignee | ||
Comment 3•18 years ago
|
||
there are some bugs: 1. weight of gfxFontStyle is between 100 to 900, not 1 to 9. 2. The weight steps should be processed after force bolding. e.g., if the value is 701. 3. The first converting is always ignored, because it is declared in the if statement. 4. newFont should not be reset after 3.
![]() |
Reporter | |
Comment 4•18 years ago
|
||
(In reply to comment #3) > Created an attachment (id=250159) [details] > Patch rv1.0 This works quite well (10.4.8/ppc). You even have the various font-weights (100/200/...) working correctly for fonts that actually have different font-weights (like Helvetica Neue, Gill Sans). Nice, that is better than what Safari does :-). (see this test case in bug 972: https://bugzilla.mozilla.org/attachment.cgi?id=98263) One problem though: font-weight:600 should map to 'bold' and not 'normal'. Gecko Mac has always been wrong on that. Gecko Windows does it correctly (and Safari, Opera Mac).
![]() |
Reporter | |
Comment 5•18 years ago
|
||
I should add to my comment above: that test was done on a build that also had the latest patch for bug 364785 applied. That patch corrects an incorrect display for the 'Helvetica Neue' font. On a clean build, with only the patch for this bug (365613) applied, all works equally well, except for the 'font-weight: 600' noted above.
Assignee | ||
Comment 6•18 years ago
|
||
(In reply to comment #4) > One problem though: font-weight:600 should map to 'bold' and not 'normal'. > Gecko Mac has always been wrong on that. Gecko Windows does it correctly (and > Safari, Opera Mac). I don't think that the font-weight: 600; text being rendered normal weight is wrong. But that is interesting and important between the browsers of Mac. I think that we should implement same behavior for the compatibility, thanks.
Assignee | ||
Comment 7•18 years ago
|
||
Attachment #250159 -
Attachment is obsolete: true
Attachment #250611 -
Flags: review?(vladimir)
Attachment #250159 -
Flags: review?(vladimir)
Comment on attachment 250611 [details] [diff] [review] Patch rv1.1 Looks good, thanks -- for the 600 issue, the CSS spec says: > If any of the values '600', '700', '800' or '900' remains > unassigned, they are assigned to the same face as the next > darker assigned keyword, if any, or the next lighter one > otherwise. So it sounds like that having 600 map to bold is the correct thing unless the font actually has all 9 weights (and having it be bold isn't just a compat thing).
Attachment #250611 -
Flags: review?(vladimir) → review+
Assignee | ||
Comment 9•18 years ago
|
||
Thank you for the point! I removed the comment.
Attachment #250611 -
Attachment is obsolete: true
Attachment #250615 -
Flags: review+
Assignee | ||
Comment 10•18 years ago
|
||
Oops, sorry. I forgot the weight-offset. We should use following values: #define SHOULD_BE_BOLD_IN_THIS_CSS_WEIGHT(w) ((w) >= 550) #define SHOULD_BE_LIGHT_IN_THIS_CSS_WEIGHT(w) ((w) < 350)
Attachment #250615 -
Attachment is obsolete: true
Attachment #250618 -
Flags: review+
Assignee | ||
Comment 11•18 years ago
|
||
checked-in.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
![]() |
Reporter | |
Comment 12•18 years ago
|
||
Verified with: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a2pre) Gecko/20070105 Minefield/3.0a2pre ID:2007010516 [cairo]
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•