[Webkit-unassigned] [Bug 65035] [Cairo] Text extent of shadowed text is calculated incorrectly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 25 04:43:59 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=65035


Onne Gorter <o.gorter at activevideo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |o.gorter at activevideo.com




--- Comment #1 from Onne Gorter <o.gorter at activevideo.com>  2012-01-25 04:43:59 PST ---
I confirm and have a patch:

--- a/Source/WebCore/platform/graphics/cairo/FontCairo.cpp
+++ b/Source/WebCore/platform/graphics/cairo/FontCairo.cpp
@@ -85,7 +85,7 @@ static void drawGlyphsShadow(GraphicsContext* graphicsContext, const FloatPoint&

     cairo_text_extents_t extents;
     cairo_scaled_font_glyph_extents(font->platformData().scaledFont(), glyphs, numGlyphs, &extents);
-    FloatRect fontExtentsRect(point.x(), point.y() - extents.height, extents.width, extents.height);
+    FloatRect fontExtentsRect(point.x(), point.y() + extents.y_bearing, extents.width, extents.height);
     if (GraphicsContext* shadowContext = shadow.beginShadowLayer(graphicsContext, fontExtentsRect)) {
         drawGlyphsToContext(shadowContext->platformContext()->cr(), font, glyphs, numGlyphs);
         shadow.endShadowLayer(graphicsContext);

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list