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.
Are you suggesting to do one pass with CG to measure the text, then adjust the GDI rendering to fit the same measurements?
Yes, that would be one way.
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
The vertical metrics could be 'fixed' too :-)
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.
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.