diff --git a/gfx/thebes/gfxDWriteFontList.cpp b/gfx/thebes/gfxDWriteFontList.cpp index 66dc00fe5d0..cee077d3482 100644 --- a/gfx/thebes/gfxDWriteFontList.cpp +++ b/gfx/thebes/gfxDWriteFontList.cpp @@ -1102,6 +1102,17 @@ gfxFontFamily* gfxDWriteFontList::FindFamily(const nsAString& aFamily) return gfxPlatformFontList::FindFamily(aFamily); } +void +gfxDWriteFontList::GetFontFamilyList(nsTArray >& aFamilyArray) +{ + if (!mInitialized) { + mInitialized = PR_TRUE; + DelayedInitFontList(); + } + + return gfxPlatformFontList::GetFontFamilyList(aFamilyArray); +} + PRBool gfxDWriteFontList::ResolveFontName(const nsAString& aFontName, nsAString& aResolvedFontName) diff --git a/gfx/thebes/gfxDWriteFontList.h b/gfx/thebes/gfxDWriteFontList.h index fa9cb0609ac..ed2d309f884 100644 --- a/gfx/thebes/gfxDWriteFontList.h +++ b/gfx/thebes/gfxDWriteFontList.h @@ -225,6 +225,8 @@ public: virtual gfxFontFamily* FindFamily(const nsAString& aFamily); + virtual void GetFontFamilyList(nsTArray >& aFamilyArray); + private: friend class gfxDWriteFontFamily; diff --git a/gfx/thebes/gfxPlatformFontList.h b/gfx/thebes/gfxPlatformFontList.h index 3c51a1de47d..0f1f7ecad81 100644 --- a/gfx/thebes/gfxPlatformFontList.h +++ b/gfx/thebes/gfxPlatformFontList.h @@ -93,7 +93,7 @@ public: void ClearPrefFonts() { mPrefFonts.Clear(); } - void GetFontFamilyList(nsTArray >& aFamilyArray); + virtual void GetFontFamilyList(nsTArray >& aFamilyArray); gfxFontEntry* FindFontForChar(const PRUint32 aCh, gfxFont *aPrevFont);