Bug 3231

Summary: CSS1: synthesize bold and oblique when those font variations are unavailable
Product: WebKit Reporter: Dave Hyatt <hyatt>
Component: CSSAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, daniel, mitz, nickshanks
Priority: P2    
Version: 412   
Hardware: All   
OS: All   
Attachments:
Description Flags
add synthesized bold and oblique, other related renderer improvements
hyatt: review-
revised patch fixing bug Mitz noticed, and with RTL back to rtl as requested hyatt: review+

Description Dave Hyatt 2005-06-01 14:38:00 PDT
If a bold version of a particular font is requested but none exists on the system, Web Kit does not properly 
synthesize a font.  Instead it honors the weight but falls back to another font.  Instead it should synthesize 
a font with the appropriate weight.
Comment 1 Nicholas Shanks 2005-06-07 07:32:36 PDT
If the font has an fvar weight axis, this can be used instead of synthesizing a heavier typeface.
Possibly another bug should be opened to track this though, as fvar can be used for features other than 
just weight. Test case at http://web.nickshanks.com/safari/fvar
Comment 2 Dave Hyatt 2005-06-12 23:24:53 PDT
*** Bug 3494 has been marked as a duplicate of this bug. ***
Comment 3 Mark Rowe (bdash) 2005-09-08 21:17:38 PDT
Nick, the test case mentioned in comment #1 doesn't appear to be accessible at present.  Would it be 
possible to attach it to the bug so that it will always be available?
Comment 4 Darin Adler 2005-09-10 09:39:31 PDT
Yes, the fvar possibility should be a separate bug.
Comment 5 Darin Adler 2005-09-10 09:41:04 PDT
Created attachment 3844 [details]
add synthesized bold and oblique, other related renderer improvements
Comment 6 Darin Adler 2005-09-10 12:58:22 PDT
In Radar as <rdar://problem/3256269>.
Comment 7 mitz 2005-09-12 15:02:26 PDT
I think you have a problem in your order-swapping loop in _CG_drawRun:style:geometry:. You're 
decrementing end by 3 in each iteration.
Comment 8 Darin Adler 2005-09-12 17:50:27 PDT
Oops! You're right. I have to move that -- out!

I'll have to make sure to run pixel tests rather than just layout tests.

I'm leaving this patch in review? anyway so that Dave Hyatt can review it -- but he should review- it due to 
that bad mistake.
Comment 9 Dave Hyatt 2005-09-27 13:46:26 PDT
Comment on attachment 3844 [details]
add synthesized bold and oblique, other related renderer improvements

Just a personal preference, but I like style.rtl over style.RTL.  Unless you
feel really strongly, I'd rather this just stay the way it is currently.

Looks good, but fix the mistake already pointed out, and I'll re-review.
Comment 10 Nicholas Shanks 2005-09-28 10:38:53 PDT
Opened bug #5168 to cover fvar
Comment 11 Darin Adler 2005-09-30 08:18:06 PDT
Created attachment 4106 [details]
revised patch fixing bug Mitz noticed, and with RTL back to rtl as requested
Comment 12 Dave Hyatt 2005-10-03 14:44:56 PDT
Comment on attachment 4106 [details]
revised patch fixing bug Mitz noticed, and with RTL back to rtl as requested

r=me, make sure to run perf tests and layout tests to make sure we have no
regressions.