Bug 16586 - GDI text rendering should preserve line length
Summary: GDI text rendering should preserve line length
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2007-12-23 12:55 PST by Nicholas Shanks
Modified: 2008-01-09 16:05 PST (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
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.