Re: [webkit-dev] Why does Ahem have different vertical metrics in Qt?

2011-04-06 Thread Andreas Kling

On 02/08/2011 08:42 PM, ext Dan Bernstein wrote:

What is causing this difference? How does it affect other fonts and real
websites? Is there a way to fix this?


This is caused by the behavior of QFontMetricsF::descent() which returns 
the descent minus one for historical reasons.


I've opened https://bugs.webkit.org/show_bug.cgi?id=57954 to fix it. :-)

-Kling
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


[webkit-dev] Why does Ahem have different vertical metrics in Qt?

2011-02-08 Thread Dan Bernstein
In an attempt to give layout tests consistent results across platforms, I ofter 
use the Ahem font. However, I’ve noticed that Qt still requires 
platform-specific results when I do that. One recent example is 
fast/dynamic/unicode-bidi.html

$ diff -u LayoutTests/platform/qt/fast/dynamic/unicode-bidi-expected.txt  
LayoutTests/fast/dynamic/unicode-bidi-expected.txt 
--- LayoutTests/platform/qt/fast/dynamic/unicode-bidi-expected.txt  
2011-02-03 09:02:59.0 -0800
+++ LayoutTests/fast/dynamic/unicode-bidi-expected.txt  2011-01-28 
10:46:32.0 -0800
@@ -3,14 +3,14 @@
 layer at (0,0) size 800x600 layerType: background only
 layer at (8,8) size 100x50
   RenderBlock (positioned) zI: -1 {DIV} at (8,8) size 100x50 [color=#FF]
-RenderInline {SPAN} at (0,0) size 50x49 [color=#008000]
-  RenderText {#text} at (0,0) size 50x49
+RenderInline {SPAN} at (0,0) size 50x50 [color=#008000]
+  RenderText {#text} at (0,0) size 50x50
 text run at (0,0) width 50: x
-RenderText zI: -1 {#text} at (50,0) size 50x49
+RenderText zI: -1 {#text} at (50,0) size 50x50
   text run at (50,0) width 50: x
 layer at (0,0) size 800x600 layerType: foreground only
   RenderBlock {HTML} at (0,0) size 800x600
 RenderBody {BODY} at (8,8) size 784x584
   RenderBlock {DIV} at (0,0) size 784x50 [color=#008000]
-RenderText {#text} at (0,0) size 100x49
+RenderText {#text} at (0,0) size 100x50
   text run at (0,0) width 100 RTL override: xp

Here, all the 50px Ahem text has a height of 49 pixels on Qt. The pixel 
results, though, show it having the same height it does in Mac OS X (and 
presumably other platforms).

What is causing this difference? How does it affect other fonts and real 
websites? Is there a way to fix this?

Thanks,
—Dan___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev