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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 16 19:51:50 PDT 2012


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





--- Comment #4 from Martin Robinson <mrobinson at webkit.org>  2012-03-16 19:51:50 PST ---
(In reply to comment #1)
> 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);

It seems that we also need to look at the x_bearing here as well. Will make this change and land this patch. Thanks for the contribution!

-- 
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