diff --git a/gfx/src/thebes/nsThebesFontMetrics.cpp b/gfx/src/thebes/nsThebesFontMetrics.cpp index 624979b25a86..62eccbcc10e1 100644 --- a/gfx/src/thebes/nsThebesFontMetrics.cpp +++ b/gfx/src/thebes/nsThebesFontMetrics.cpp @@ -117,7 +117,7 @@ nsThebesFontMetrics::Destroy() gfxFont::Metrics nsThebesFontMetrics::GetMetrics() { - return mFontGroup->GetFontList()[0]->GetMetrics(); + return mFontGroup->GetFontAt(0)->GetMetrics(); } NS_IMETHODIMP diff --git a/gfx/thebes/public/gfxFont.h b/gfx/thebes/public/gfxFont.h index 532558677dbe..691eef23866b 100644 --- a/gfx/thebes/public/gfxFont.h +++ b/gfx/thebes/public/gfxFont.h @@ -160,7 +160,6 @@ protected: const gfxFontStyle *mStyle; }; -typedef nsTArray< nsRefPtr > gfxFontVector; class NS_EXPORT gfxFontGroup { public: @@ -170,7 +169,13 @@ public: mFonts.Clear(); } - gfxFontVector GetFontList() { return mFonts; } + gfxFont *GetFontAt(PRInt32 i) { + return NS_STATIC_CAST(gfxFont*, mFonts[i]); + } + PRUint32 FontListLength() const { + return mFonts.Length(); + } + const gfxFontStyle *GetStyle() const { return &mStyle; } /* unicode method */ @@ -189,7 +194,7 @@ protected: nsString mFamilies; gfxFontStyle mStyle; - gfxFontVector mFonts; + nsTArray< nsRefPtr > mFonts; };