[Bug 3512] Implement font-stretch property

bugzilla-daemon at mozilla.org bugzilla-daemon at mozilla.org
Fri Aug 26 22:35:29 UTC 2011


Do not reply to this email.  You can add comments to this bug at
https://bugzilla.mozilla.org/show_bug.cgi?id=3512

Jonathan Kew <jfkthame at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #556151|                            |review?(jdaggett at mozilla.co
              Flags|                            |m)
         AssignedTo|jdaggett at mozilla.com        |jfkthame at gmail.com

--- Comment #72 from Jonathan Kew <jfkthame at gmail.com> 2011-08-26 15:35:29 PDT ---
Created attachment 556151
  --> https://bugzilla.mozilla.org/attachment.cgi?id=556151&action=edit
patch to fix computation of StyleDistance to account for font-stretch more
accurately

(Reassigning this bug to me, as I'm hoping to actually make progress here.)

Testing showed somewhat erratic results with @font-face families, because the
style-matching code didn't differentiate among font-stretch mismatches - it
would use the matching width if available, but if there was no exact match, you
could get any of the available widths.

To fix this, we need to improve the calculation of "style distance" so as to
prefer the closest available width if no exact match is available.

This gives the expected behavior (as per CSS3 Fonts draft, I believe) for
@font-face families, and should apply to platform fonts on OS X and Windows as
well (not yet tested with those - I think Windows will need further work). Note
that we get slightly different behavior with platform fonts on Linux, because
apparently fontconfig uses a different matching algorithm. This may need
further investigation.

-- 
Configure bugmail: https://bugzilla.mozilla.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the fonts-bugs mailing list