Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes

gfxFontGroup Class Reference

#include <gfxFont.h>

Inheritance diagram for gfxFontGroup:
Collaboration diagram for gfxFontGroup:

List of all members.

Public Types

enum  { UNDERLINE_OFFSET_NOT_SET = 32767 }
typedef PRBool(* FontCreationCallback )(const nsAString &aName, const nsACString &aGenericName, void *closure)

Public Member Functions

 gfxFontGroup (const nsAString &aFamilies, const gfxFontStyle *aStyle, gfxUserFontSet *aUserFontSet=0)
virtual ~gfxFontGroup ()
virtual gfxFontGetFontAt (PRInt32 i)
virtual PRUint32 FontListLength () const
PRBool Equals (const gfxFontGroup &other) const
const gfxFontStyleGetStyle () const
virtual gfxFontGroupCopy (const gfxFontStyle *aStyle)
gfxTextRunMakeEmptyTextRun (const Parameters *aParams, PRUint32 aFlags)
 Make a textrun for an empty string.
gfxTextRunMakeSpaceTextRun (const Parameters *aParams, PRUint32 aFlags)
 Make a textrun for a single ASCII space.
virtual gfxTextRunMakeTextRun (const PRUnichar *aString, PRUint32 aLength, const Parameters *aParams, PRUint32 aFlags)
 Make a textrun for a given string.
virtual gfxTextRunMakeTextRun (const PRUint8 *aString, PRUint32 aLength, const Parameters *aParams, PRUint32 aFlags)
 Make a textrun for a given string.
PRBool ForEachFont (const nsAString &aFamilies, const nsACString &aLangGroup, FontCreationCallback fc, void *closure)
PRBool ForEachFont (FontCreationCallback fc, void *closure)
PRBool HasFont (const gfxFontEntry *aFontEntry)
 Check whether a given font (specified by its gfxFontEntry) is already in the fontgroup's list of actual fonts.
const nsString_externalGetFamilies ()
virtual gfxFloat GetUnderlineOffset ()
already_AddRefed< gfxFontFindFontForChar (PRUint32 ch, PRUint32 prevCh, PRUint32 nextCh, gfxFont *aPrevMatchedFont)
virtual already_AddRefed< gfxFontWhichPrefFontSupportsChar (PRUint32 aCh)
virtual already_AddRefed< gfxFontWhichSystemFontSupportsChar (PRUint32 aCh)
void ComputeRanges (nsTArray< gfxTextRange > &mRanges, const PRUnichar *aString, PRUint32 begin, PRUint32 end)
gfxUserFontSetGetUserFontSet ()
PRUint64 GetGeneration ()
virtual void UpdateFontList ()

Static Public Member Functions

static PRBool IsInvalidChar (PRUnichar ch)
 The listed characters should not be passed in to MakeTextRun and should be treated as invisible and zero-width.

Protected Member Functions

void SetUserFontSet (gfxUserFontSet *aUserFontSet)
void InitMetricsForBadFont (gfxFont *aBadFont)
void InitTextRun (gfxTextRun *aTextRun, const PRUnichar *aString, PRUint32 aLength)
PRBool ForEachFontInternal (const nsAString &aFamilies, const nsACString &aLangGroup, PRBool aResolveGeneric, PRBool aResolveFontName, FontCreationCallback fc, void *closure)
gfxFontWhichFontSupportsChar (nsTArray< nsRefPtr< gfxFont > > &aFontList, PRUint32 aCh)

Static Protected Member Functions

static PRBool FontResolverProc (const nsAString &aName, void *aClosure)
static PRBool FindPlatformFont (const nsAString &aName, const nsACString &aGenericName, void *closure)

Protected Attributes

nsString_external mFamilies
gfxFontStyle mStyle
nsTArray< nsRefPtr< gfxFont > > mFonts
gfxFloat mUnderlineOffset
gfxUserFontSetmUserFontSet
PRUint64 mCurrGeneration
nsRefPtr< gfxFontFamilymLastPrefFamily
nsRefPtr< gfxFontmLastPrefFont
eFontPrefLang mLastPrefLang
PRBool mLastPrefFirstFont
eFontPrefLang mPageLang

Member Typedef Documentation

typedef PRBool(* gfxFontGroup::FontCreationCallback)(const nsAString &aName, const nsACString &aGenericName, void *closure)

Member Enumeration Documentation

anonymous enum
Enumerator:
UNDERLINE_OFFSET_NOT_SET 

Constructor & Destructor Documentation

gfxFontGroup::gfxFontGroup ( const nsAString aFamilies,
const gfxFontStyle aStyle,
gfxUserFontSet aUserFontSet = 0 
)
virtual gfxFontGroup::~gfxFontGroup (  )  [virtual]

Member Function Documentation

void gfxFontGroup::ComputeRanges ( nsTArray< gfxTextRange > &  mRanges,
const PRUnichar aString,
PRUint32  begin,
PRUint32  end 
)
virtual gfxFontGroup* gfxFontGroup::Copy ( const gfxFontStyle aStyle  )  [virtual]

Reimplemented in gfxPangoFontGroup.

PRBool gfxFontGroup::Equals ( const gfxFontGroup other  )  const [inline]
already_AddRefed<gfxFont> gfxFontGroup::FindFontForChar ( PRUint32  ch,
PRUint32  prevCh,
PRUint32  nextCh,
gfxFont aPrevMatchedFont 
)
static PRBool gfxFontGroup::FindPlatformFont ( const nsAString aName,
const nsACString aGenericName,
void *  closure 
) [static, protected]
virtual PRUint32 gfxFontGroup::FontListLength (  )  const [inline, virtual]
static PRBool gfxFontGroup::FontResolverProc ( const nsAString aName,
void *  aClosure 
) [static, protected]
PRBool gfxFontGroup::ForEachFont ( const nsAString aFamilies,
const nsACString aLangGroup,
FontCreationCallback  fc,
void *  closure 
)
PRBool gfxFontGroup::ForEachFont ( FontCreationCallback  fc,
void *  closure 
)
PRBool gfxFontGroup::ForEachFontInternal ( const nsAString aFamilies,
const nsACString aLangGroup,
PRBool  aResolveGeneric,
PRBool  aResolveFontName,
FontCreationCallback  fc,
void *  closure 
) [protected]
const nsString_external& gfxFontGroup::GetFamilies (  )  [inline]
virtual gfxFont* gfxFontGroup::GetFontAt ( PRInt32  i  )  [inline, virtual]

Reimplemented in gfxPangoFontGroup.

PRUint64 gfxFontGroup::GetGeneration (  ) 
const gfxFontStyle* gfxFontGroup::GetStyle (  )  const [inline]
virtual gfxFloat gfxFontGroup::GetUnderlineOffset (  )  [inline, virtual]
gfxUserFontSet* gfxFontGroup::GetUserFontSet (  ) 
PRBool gfxFontGroup::HasFont ( const gfxFontEntry aFontEntry  ) 

Check whether a given font (specified by its gfxFontEntry) is already in the fontgroup's list of actual fonts.

void gfxFontGroup::InitMetricsForBadFont ( gfxFont aBadFont  )  [protected]
void gfxFontGroup::InitTextRun ( gfxTextRun aTextRun,
const PRUnichar aString,
PRUint32  aLength 
) [protected]
static PRBool gfxFontGroup::IsInvalidChar ( PRUnichar  ch  )  [static]

The listed characters should not be passed in to MakeTextRun and should be treated as invisible and zero-width.

gfxTextRun* gfxFontGroup::MakeEmptyTextRun ( const Parameters aParams,
PRUint32  aFlags 
)

Make a textrun for an empty string.

This is fast; if you call it, don't bother caching the result.

gfxTextRun* gfxFontGroup::MakeSpaceTextRun ( const Parameters aParams,
PRUint32  aFlags 
)

Make a textrun for a single ASCII space.

This is fast; if you call it, don't bother caching the result.

virtual gfxTextRun* gfxFontGroup::MakeTextRun ( const PRUnichar aString,
PRUint32  aLength,
const Parameters aParams,
PRUint32  aFlags 
) [virtual]

Make a textrun for a given string.

If aText is not persistent (aFlags & TEXT_IS_PERSISTENT), the textrun will copy it. This calls FetchGlyphExtents on the textrun.

Reimplemented in gfxPangoFontGroup.

virtual gfxTextRun* gfxFontGroup::MakeTextRun ( const PRUint8 *  aString,
PRUint32  aLength,
const Parameters aParams,
PRUint32  aFlags 
) [virtual]

Make a textrun for a given string.

If aText is not persistent (aFlags & TEXT_IS_PERSISTENT), the textrun will copy it. This calls FetchGlyphExtents on the textrun.

Reimplemented in gfxPangoFontGroup.

void gfxFontGroup::SetUserFontSet ( gfxUserFontSet aUserFontSet  )  [protected]
virtual void gfxFontGroup::UpdateFontList (  )  [virtual]

Reimplemented in gfxPangoFontGroup.

gfxFont* gfxFontGroup::WhichFontSupportsChar ( nsTArray< nsRefPtr< gfxFont > > &  aFontList,
PRUint32  aCh 
) [inline, protected]
virtual already_AddRefed<gfxFont> gfxFontGroup::WhichPrefFontSupportsChar ( PRUint32  aCh  )  [virtual]
virtual already_AddRefed<gfxFont> gfxFontGroup::WhichSystemFontSupportsChar ( PRUint32  aCh  )  [virtual]

Member Data Documentation


The documentation for this class was generated from the following file: