Bug 16586

Summary: GDI text rendering should preserve line length
Product: WebKit Reporter: Nicholas Shanks <nickshanks>
Component: TextAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: mitz
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   

Description Nicholas Shanks 2007-12-23 12:55:39 PST
The metrics of ClearType-rendered text are different to those calculated by CoreGraphics, due to inaccuracies introduced when ClearType moves glyphs around so they fit better on the pixel grid. In order to maintain line length and avoid different paragraph flow from what would result with CG or at higher DPI, additional integer pixel whitespace may have to be introduced/eliminated between words. This would also apply if WPF were to be used at some date instead of GDI.
Comment 1 mitz 2007-12-23 13:46:38 PST
Are you suggesting to do one pass with CG to measure the text, then adjust the GDI rendering to fit the same measurements?
Comment 2 Nicholas Shanks 2008-01-07 17:04:03 PST
Yes, that would be one way.
Comment 3 Dave Hyatt 2008-01-07 17:51:07 PST
I think this would be a bit difficult to accomplish without making GDI mode look funny.  One oddity I noticed is that vertical metrics are significantly different between the two modes
Comment 4 Nicholas Shanks 2008-01-09 14:16:22 PST
The vertical metrics could be 'fixed' too :-)
Comment 5 Dave Hyatt 2008-01-09 14:49:10 PST
I think the point of GDI text rendering should be to render exactly the way other browsers that use GDI rendering would (and the way other Windows apps would).  So IMO this bug should be closed as WONTFIX or INVALID.
Comment 6 Nicholas Shanks 2008-01-09 16:05:32 PST
Oh. I thought the point was so that Windows users, used to reading ClearType, could do so with Safari. I also thought the purpose of Safari on Windows was to reproduce what Safari on the Mac did so people could test their web/iphone sites against it. For this purpose the text metrics would have to be the same in GDI rendering mode.