Bug 425662 - Scaled SVG content can get the wrong metrics and poison the cache. r+sr=roc,a1.9=beltzner

This commit is contained in:
longsonr@gmail.com 2008-04-08 06:12:04 -07:00
Родитель d5a1dc86da
Коммит 3960d8eed6
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -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();