[webkit-dev] Increasing the number of cross-platform/port expected results

Tor Arne Vestbø tor.arne.vestbo at nokia.com
Tue Feb 23 05:57:37 PST 2010

On 23/2/10 14:15 , Evan Martin wrote:
> On Tue, Feb 23, 2010 at 2:00 PM, Tor Arne Vestbø
> <tor.arne.vestbo at nokia.com>  wrote:
>> Lately we've been playing with the idea of using SVG fonts for the Qt port
>> to get the same set of expected results for qt-mac, qt-linux and qt-win, by
>> injecting new @font-face rules using a user-stylesheet and preventing
>> platform-fonts from being loaded, but this approach/hack has proven to be
>> quite fragile, and we will also miss out on those tests that actually test
>> font loading/rendering.
> For Chromium on Linux, we try to insulate ourselves from the platform
> settings by injecting a custom fontconfig file and font list that
> makes things match Windows behavior.  (Matching Windows is important
> because many sites will hardcode a pixel width on a div then fill it
> with text and expect the text not to wrap.)

We do the same thing for the Qt DRT on Linux, but I was hoping to get 
something that would work for Windows and Mac OS X too, since we don't 
use FreeType on those platforms, etc. That's where the idea of using SVG 
fonts spawned, since if we force the Qt DRT to use the raster paint 
engine those SVG fonts should be rendered the same way regardless of 

But then we would have the problem of not being able to test actual font 
loading (without adding lots of exceptions) and the trick would not work 
for other ports, just the Qt port.

That's why I was playing with the idea of using hard-coded metrics for 
fonts and themes on a global basis in WebKit (if running under the DRT), 
and letting those tests that actually test font loading/rendering or 
theming override this using the layoutTestController.

Does that sound achievable/desirable at all? :)

tor arne

More information about the webkit-dev mailing list