From dfc76e70ad884e6e4606b2fafa57dcc73a764e48 Mon Sep 17 00:00:00 2001 From: "longsonr%gmail.com" Date: Mon, 7 Apr 2008 23:18:12 +0000 Subject: [PATCH] Bug 425662 - Scaled SVG content can get the wrong font size and poison the font cache. r+sr=roc,a1.9=beltzner git-svn-id: svn://10.0.0.236/trunk@249751 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/gfx/thebes/src/gfxFont.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mozilla/gfx/thebes/src/gfxFont.cpp b/mozilla/gfx/thebes/src/gfxFont.cpp index 1184ffc9796..96b130a4809 100644 --- a/mozilla/gfx/thebes/src/gfxFont.cpp +++ b/mozilla/gfx/thebes/src/gfxFont.cpp @@ -515,12 +515,15 @@ void gfxFont::SetupGlyphExtents(gfxContext *aContext, PRUint32 aGlyphID, PRBool aNeedTight, gfxGlyphExtents *aExtents) { + gfxMatrix matrix = aContext->CurrentMatrix(); + aContext->IdentityMatrix(); cairo_glyph_t glyph; glyph.index = aGlyphID; glyph.x = 0; glyph.y = 0; cairo_text_extents_t extents; cairo_glyph_extents(aContext->GetCairo(), &glyph, 1, &extents); + aContext->SetMatrix(matrix); const Metrics& fontMetrics = GetMetrics(); PRUint32 appUnitsPerDevUnit = aExtents->GetAppUnitsPerDevUnit();