Bug 36532 - [Qt] Use integer pixel metric QFont API to fix rounding errors in text rendering on the Mac
Summary: [Qt] Use integer pixel metric QFont API to fix rounding errors in text render...
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P3 Normal
Assignee: Simon Hausmann
URL:
Keywords: Qt
Depends on: 93263
Blocks: 35784
  Show dependency treegraph
 
Reported: 2010-03-24 06:55 PDT by Simon Hausmann
Modified: 2013-03-12 06:21 PDT (History)
4 users (show)

See Also:


Attachments
Turns off fractional metrics for fonts used in WebKit, since WebKit expects font engine to be integer-based (1.14 KB, patch)
2010-03-25 02:42 PDT, Eskil
no flags Details | Formatted Diff | Diff
Patch (1.70 KB, patch)
2010-04-13 07:54 PDT, Jesus Sanchez-Palencia
no flags Details | Formatted Diff | Diff
Patch (1.67 KB, patch)
2010-04-13 08:00 PDT, Jesus Sanchez-Palencia
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Hausmann 2010-03-24 06:55:47 PDT
On Qt/Mac font metrics do have fractions. WebKit's text layouting is integer based, therefore visual rounding issues appear when using QtWebKit with Qt/Mac.

Eskil is adding new API to Qt 4.7 to disable fractions in pixel metrics. We should use this API.

Patch is coming soon.
Comment 1 Eskil 2010-03-25 02:42:24 PDT
Created attachment 51612 [details]
Turns off fractional metrics for fonts used in WebKit, since WebKit expects font engine to be integer-based

Compiles against Qt 4.7 as soon as the Oslo2 staging branch integrates.
Comment 2 Tor Arne Vestbø 2010-03-29 09:27:49 PDT
I'll land this when the required changes in Qt have been integrated from oslo-staging-2
Comment 3 Jesus Sanchez-Palencia 2010-04-07 06:07:05 PDT
I think that oslo-staging-2 was integrated recently.
Has this been landed yet?
Comment 4 Jesus Sanchez-Palencia 2010-04-13 07:54:40 PDT
Created attachment 53250 [details]
Patch
Comment 5 Jesus Sanchez-Palencia 2010-04-13 08:00:16 PDT
Created attachment 53251 [details]
Patch
Comment 6 WebKit Commit Bot 2010-04-13 08:21:45 PDT
Comment on attachment 53251 [details]
Patch

Clearing flags on attachment: 53251

Committed r57516: <http://trac.webkit.org/changeset/57516>
Comment 7 WebKit Commit Bot 2010-04-13 08:21:51 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Simon Hausmann 2010-04-20 13:03:42 PDT
Revision r57516 cherry-picked into qtwebkit-2.0 with commit 692f59b5496489f88a49b4af6749b9b45df090ab
Comment 9 Allan Sandfeld Jensen 2013-03-12 06:21:07 PDT
I am not sure this hack is necesary. While WebKit still uses integer coordinates for layout (until we enable SUBPIXEL_LAYOUT). Text is not layed out using integers, but using floats. Or maybe the bug is that advances are being rounded when they shouldn't be?