Last Comment Bug 419962 - CSS font-weight:bolder support
: CSS font-weight:bolder support
Status: RESOLVED WONTFIX
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: x86 Linux
: -- normal with 1 vote (vote)
: ---
Assigned To: Karl Tomlinson (:karlt)
:
Mentors:
Depends on: 449356
Blocks: 419963
  Show dependency treegraph
 
Reported: 2008-02-27 14:48 PST by Karl Tomlinson (:karlt)
Modified: 2010-10-15 16:39 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Karl Tomlinson (:karlt) 2008-02-27 14:48:55 PST
Currently ThebesStyleToPangoWeight maps font-weight bolder to an absolute weight, but the absolute weight should depend on the actual weights supported by the font.

One issue with this is that currently two of the steps in the 5-entry absolute weight table (649 and 749) correspond to semibold and bold weights but I haven't found a family with both of these weights.   Merging these two steps into one
would make <b>A<b>B</b></b> provide a bolder B than A for family "Arial" (if
the newer versions of Arial were available).

Attachment 300711 [details] [diff] has much of what is required to select the weight based on the first existing family in the group.
Comment 1 John Daggett (:jtd) 2008-02-27 16:41:12 PST
Don't know much about the Pango code but both Windows and Mac use similar logic to handle this.  The weights on the style come in as "relative" ones like 698 (i.e. two faces lighter than bold):

http://mxr.mozilla.org/mozilla/source/gfx/thebes/src/gfxQuartzFontCache.mm#507

See bug 411891 for testcase, the second testcase uses js to autogenerate test samples so it would be fairly easy to set it up for fonts on your Linux system.

I'm assuming you're also checking lighter with this work?
Comment 2 Karl Tomlinson (:karlt) 2008-06-04 22:12:34 PDT

*** This bug has been marked as a duplicate of bug 93725 ***
Comment 3 Karl Tomlinson (:karlt) 2008-08-05 18:33:26 PDT
I'm reopening this as this as the bug for Linux-specific implementation of face selection using relative steps of available weights, leaving bug 93725 for XP discussion on whether a sequence or count of relative steps is appropriate
(http://lists.w3.org/Archives/Public/www-style/2008Jun/0151.html).
Comment 4 John Daggett (:jtd) 2009-07-22 01:30:11 PDT
Another testcase using downloadable fonts:

http://people.mozilla.org/~jdaggett/font-face/synthetic-variations.html

Expected result: normal column text is always rendered with the regular face, italic with regular italic, etc.
Comment 5 David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch) 2010-10-15 14:55:47 PDT
Spec changes (currently in the W3C-confidential editor's draft of CSS 2.1) make this bug obsolete.
Comment 6 David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch) 2010-10-15 16:39:40 PDT
The new approach (with patch in bug 93725) make this unnecessary.

Note You need to log in before you can comment on or make changes to this bug.