Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsDeviceContext.cpp File Reference
#include "nsDeviceContext.h"
#include "nsFont.h"
#include "nsIView.h"
#include "nsGfxCIID.h"
#include "nsVoidArray.h"
#include "nsIFontMetrics.h"
#include "nsHashtable.h"
#include "nsILanguageAtomService.h"
#include "nsIServiceManager.h"
#include "nsUnicharUtils.h"
#include "nsCRT.h"

Go to the source code of this file.


struct  FontEnumData
class  FontAliasKey


static PRBool PR_CALLBACK DeleteValue (nsHashKey *aKey, void *aValue, void *closure)
static PRBool FontEnumCallback (const nsString &aFamily, PRBool aGeneric, void *aData)

Function Documentation

static PRBool PR_CALLBACK DeleteValue ( nsHashKey *  aKey,
void aValue,
void closure 
) [static]

Definition at line 74 of file nsDeviceContext.cpp.

  delete ((nsString*)aValue);
  return PR_TRUE;
static PRBool FontEnumCallback ( const nsString aFamily,
PRBool  aGeneric,
void aData 
) [static]

Definition at line 379 of file nsDeviceContext.cpp.

  FontEnumData* data = (FontEnumData*)aData;
  // XXX for now, all generic fonts are presumed to exist
  //     we may want to actually check if there's an installed conversion
  if (aGeneric) {
    data->mFaceName = aFamily;
    return PR_FALSE; // found one, stop.
  else {
    nsAutoString  local;
    PRBool        aliased;
    data->mDC->GetLocalFontName(aFamily, local, aliased);
    if (aliased || (NS_SUCCEEDED(data->mDC->CheckFontExistence(local)))) {
      data->mFaceName = local;
      return PR_FALSE; // found one, stop.
  return PR_TRUE; // didn't exist, continue looking

Here is the call graph for this function: