Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions
nsFontMetricsGTK.h File Reference
#include "nsDeviceContextGTK.h"
#include "nsIFontMetrics.h"
#include "nsIFontEnumerator.h"
#include "nsFont.h"
#include "nsString.h"
#include "nsUnitConversion.h"
#include "nsIDeviceContext.h"
#include "nsCRT.h"
#include "nsCOMPtr.h"
#include "nsRenderingContextGTK.h"
#include "nsICharRepresentable.h"
#include "nsCompressedCharMap.h"
#include "nsIFontMetricsGTK.h"
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  nsFontStretch
struct  nsFontStyle
struct  nsFontWeight
struct  nsFontNode
class  nsFontNodeArray
struct  nsFontLangGroup
struct  nsFontCharSetMap
class  nsFontGTK
struct  nsFontSwitchGTK
class  nsFontMetricsGTK
class  nsFontEnumeratorGTK


#define FONT_HAS_GLYPH(map, char)   IS_REPRESENTABLE(map, char)
#define WEIGHT_INDEX(weight)   (((weight) / 100) - 1)


typedef struct nsFontCharSetInfo
typedef gint(* nsFontCharSetConverter )(nsFontCharSetInfo *aSelf, XFontStruct *aFont, const PRUnichar *aSrcBuf, PRInt32 aSrcLen, char *aDestBuf, PRInt32 aDestLen)
typedef struct nsFontLangGroup nsFontLangGroup
typedef PRBool(* PR_CALLBACK )(const nsFontSwitchGTK *aFontSwitch, const PRUnichar *aSubstring, PRUint32 aSubstringLength, void *aData)


PRBool FreeNode (nsHashKey *aKey, void *aData, void *aClosure)
nsFontCharSetInfoGetCharSetInfo (const char *aCharSetName)
nsFontCharSetMapGetCharSetMap (const char *aCharSetName)

Class Documentation

struct nsFontLangGroup

Definition at line 150 of file nsFontMetricsGTK.h.

Collaboration diagram for nsFontLangGroup:
Class Members
nsIAtom * mFontLangGroupAtom
const char * mFontLangGroupName
struct nsFontCharSetMap

Definition at line 155 of file nsFontMetricsGTK.h.

Collaboration diagram for nsFontCharSetMap:
Class Members
nsFontLangGroup * mFontLangGroup
nsFontCharSetInfo * mInfo
const char * mName
struct nsFontSwitchGTK

Definition at line 215 of file nsFontMetricsGTK.h.

Collaboration diagram for nsFontSwitchGTK:
Class Members
nsFontGTK * mFontGTK

Define Documentation

#define FONT_HAS_GLYPH (   map,
)    IS_REPRESENTABLE(map, char)

Definition at line 62 of file nsFontMetricsGTK.h.

#define WEIGHT_INDEX (   weight)    (((weight) / 100) - 1)

Definition at line 63 of file nsFontMetricsGTK.h.

Typedef Documentation

typedef gint(* nsFontCharSetConverter)(nsFontCharSetInfo *aSelf, XFontStruct *aFont, const PRUnichar *aSrcBuf, PRInt32 aSrcLen, char *aDestBuf, PRInt32 aDestLen)

Definition at line 67 of file nsFontMetricsGTK.h.

typedef struct nsFontCharSetInfo

Definition at line 65 of file nsFontMetricsGTK.h.

Definition at line 222 of file nsFontMetricsGTK.h.

Function Documentation

PRBool FreeNode ( nsHashKey *  aKey,
void aData,
void aClosure 

Definition at line 950 of file nsFontMetricsGTK.cpp.

  nsFontNode* node = (nsFontNode*) aData;
  for (int i = 0; i < 3; i++) {
    if (node->mStyles[i]) {
      for (int j = i + 1; j < 3; j++) {
        if (node->mStyles[j] == node->mStyles[i]) {
          node->mStyles[j] = nsnull;
  delete node;

  return PR_TRUE;

Here is the call graph for this function:

nsFontCharSetInfo* GetCharSetInfo ( const char *  aCharSetName)
nsFontCharSetMap* GetCharSetMap ( const char *  aCharSetName)

Definition at line 6780 of file nsFontMetricsGTK.cpp.

    nsCStringKey charSetKey(aCharSetName);
    nsFontCharSetMap* charSetMap =
      (nsFontCharSetMap*) gCharSetMaps->Get(&charSetKey);
    if (!charSetMap)
      charSetMap = gNoneCharSetMap;
  return charSetMap;

Here is the caller graph for this function: