diff --git a/gfx/thebes/gfxDWriteFontList.cpp b/gfx/thebes/gfxDWriteFontList.cpp index d72fb74cf29..da0d5122577 100644 --- a/gfx/thebes/gfxDWriteFontList.cpp +++ b/gfx/thebes/gfxDWriteFontList.cpp @@ -552,13 +552,14 @@ gfxDWriteFontList::LookupLocalFont(const gfxProxyFontEntry *aProxyEntry, { return nsnull; } - gfxFontEntry *fe = + gfxDWriteFontEntry* dwriteLookup = static_cast(lookup); + gfxDWriteFontEntry *fe = new gfxDWriteFontEntry(lookup->Name(), - static_cast(lookup)->mFont, + dwriteLookup->mFont, aProxyEntry->Weight(), aProxyEntry->Stretch(), aProxyEntry->IsItalic()); - + fe->SetForceGDIClassic(dwriteLookup->GetForceGDIClassic()); return fe; }