Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions | Variables
nsAFMObject.cpp File Reference
#include "nsAFMObject.h"
#include "Helvetica.h"
#include "Helvetica-Bold.h"
#include "Helvetica-BoldOblique.h"
#include "Helvetica-Oblique.h"
#include "Times-Roman.h"
#include "Times-Bold.h"
#include "Times-BoldItalic.h"
#include "Times-Italic.h"
#include "Courier.h"
#include "Courier-Bold.h"
#include "Courier-BoldOblique.h"
#include "Courier-Oblique.h"
#include "Symbol.h"
#include "nsReadableUtils.h"
#include "nsVoidArray.h"

Go to the source code of this file.


struct  SubstituteMap
struct  keyname_st
A static structure initialized AFM font keyword definitions 3/12/99 dwc More...


#define NS_IS_BOLD(weight)   ((weight) >= 401 ? 1 : 0)
#define ISSPACE(ch)   ((ch)==' '||(ch)=='\n'||(ch)=='\r'||(ch)=='\t'||(ch)==';')
#define CORRECTSTRING(d)   (d?d:"")
#define BOOLOUT(B)   (mPSFontInfo->mIsBaseFont==PR_TRUE?"PR_TRUE":"PR_FALSE")


static PRBool PR_CALLBACK GenericFontEnumCallback (const nsString &aFamily, PRBool aGeneric, void *aData)
helper callback function


static SubstituteMap gSubstituteMap []
static const PRUint32 gNumSubstituteMap = sizeof(gSubstituteMap)/sizeof(SubstituteMap)
DefFonts gSubstituteFonts []
static struct keyname_st keynames []

Class Documentation

struct SubstituteMap

Definition at line 55 of file nsAFMObject.cpp.

Class Members
PRBool bold
PRInt16 index
PRUint8 italic
const char * name
struct keyname_st

A static structure initialized AFM font keyword definitions 3/12/99 dwc

Definition at line 105 of file nsAFMObject.cpp.

Class Members
AFMKey key
const char * name

Define Documentation

#define BOOLOUT (   B)    (mPSFontInfo->mIsBaseFont==PR_TRUE?"PR_TRUE":"PR_FALSE")

Definition at line 903 of file nsAFMObject.cpp.

#define CORRECTSTRING (   d)    (d?d:"")

Definition at line 902 of file nsAFMObject.cpp.

#define ISSPACE (   ch)    ((ch)==' '||(ch)=='\n'||(ch)=='\r'||(ch)=='\t'||(ch)==';')

Definition at line 195 of file nsAFMObject.cpp.

#define NS_IS_BOLD (   weight)    ((weight) >= 401 ? 1 : 0)

Definition at line 80 of file nsAFMObject.cpp.

Function Documentation

static PRBool PR_CALLBACK GenericFontEnumCallback ( const nsString aFamily,
PRBool  aGeneric,
void aData 
) [static]

helper callback function

Definition at line 302 of file nsAFMObject.cpp.

  nsVoidArray* array = NS_STATIC_CAST(nsVoidArray*, aData);
  char* name = ToNewCString(aFamily);
  if (name) {
    return PR_TRUE; // don't stop
  return PR_FALSE;

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

Definition at line 78 of file nsAFMObject.cpp.

DefFonts gSubstituteFonts[]
Initial value:

Definition at line 83 of file nsAFMObject.cpp.

Initial value:
  { "serif", 0,0,0},
  { "serif", 0,1,1},
  { "serif", 1,1,2},
  { "serif", 1,0,3},
  { "sans-serif", 0,0,4},
  { "sans-serif", 0,1,5},
  { "sans-serif", 1,1,6},
  { "sans-serif", 1,0,7},
  { "monospace", 0,0,8},
  { "monospace", 0,1,9},
  { "monospace", 1,1,10},
  { "monospace", 1,0,11},

Definition at line 62 of file nsAFMObject.cpp.

struct keyname_st keynames[] [static]