[haiku-webkit-commits] r520 - webkit/trunk/WebCore/platform/graphics/haiku

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Fri, 28 May 2010 23:59:04 +0000

Author: stippi
Date: Fri May 28 23:59:03 2010
New Revision: 520
URL: http://mmlr.dyndns.org/changeset/520

Log:
Use correct rounding for determining the ascent/descent of a type face. Fixes
the sometimes missing underscores or other drawing glitches with the bottom-
most line of pixels of a text line.

Modified:
   webkit/trunk/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp

Modified: webkit/trunk/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp
==============================================================================
--- webkit/trunk/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp        
Sun May 23 13:21:43 2010        (r519)
+++ webkit/trunk/WebCore/platform/graphics/haiku/SimpleFontDataHaiku.cpp        
Fri May 28 23:59:03 2010        (r520)
@@ -52,8 +52,8 @@
 
     font_height height;
     font->GetHeight(&height);
-    m_ascent = static_cast<int>(height.ascent);
-    m_descent = static_cast<int>(height.descent);
+    m_ascent = static_cast<int>(ceilf(height.ascent));
+    m_descent = static_cast<int>(ceilf(height.descent));
     m_lineSpacing = m_ascent + m_descent;
     m_xHeight = height.ascent * 0.56f; // Hack taken from the win port.
     m_lineGap = height.leading;

Other related posts:

  • » [haiku-webkit-commits] r520 - webkit/trunk/WebCore/platform/graphics/haiku - webkit