Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions
nsFontMetricsXlib.h File Reference
#include "nsIFontMetrics.h"
#include "nsIFontEnumerator.h"
#include "nsIDeviceContext.h"
#include "nsDeviceContextXlib.h"
#include "nsFont.h"
#include "nsString.h"
#include "nsUnitConversion.h"
#include "nsCRT.h"
#include "nsCOMPtr.h"
#include "nsRenderingContextXlib.h"
#include "nsICharRepresentable.h"
#include "nsCompressedCharMap.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  nsX11FontNormal
struct  nsFontStretchXlib
struct  nsFontStyleXlib
struct  nsFontWeightXlib
struct  nsFontNodeXlib
class  nsFontNodeArrayXlib
struct  nsFontLangGroupXlib
struct  nsFontCharSetMapXlib
class  nsFontXlib
struct  nsFontSwitchXlib
class  nsFontMetricsXlib
class  nsFontEnumeratorXlib

Defines

#define nsXFont   nsX11FontNormal
#define nsXFontNormal   nsX11FontNormal
#define FONT_HAS_GLYPH(map, char)   IS_REPRESENTABLE(map, char)
#define WEIGHT_INDEX(weight)   (((weight) / 100) - 1)
#define NS_FONT_DEBUG_LOAD_FONT   0x01
#define NS_FONT_DEBUG_CALL_TRACE   0x02
#define NS_FONT_DEBUG_FIND_FONT   0x04
#define NS_FONT_DEBUG_SIZE_FONT   0x08
#define NS_FONT_DEBUG_SCALED_FONT   0x10
#define NS_FONT_DEBUG_BANNED_FONT   0x20
#define NS_FONT_DEBUG_FONT_CATALOG   0x100
#define NS_FONT_DEBUG_FONT_SCAN   0x200
#define NS_FONT_DEBUG_FREETYPE_FONT   0x400
#define NS_FONT_DEBUG_FREETYPE_GRAPHICS   0x800
#define NS_FONT_DEBUG   1
#define DEBUG_PRINTF(x)   DEBUG_PRINTF_MACRO(x, 0xFFFF)
#define DEBUG_PRINTF_MACRO(x, type)
#define FIND_FONT_PRINTF(x)   DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_FIND_FONT)
#define SIZE_FONT_PRINTF(x)   DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_SIZE_FONT)
#define SCALED_FONT_PRINTF(x)   DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_SCALED_FONT)
#define BANNED_FONT_PRINTF(x)   DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_BANNED_FONT)
#define FONT_CATALOG_PRINTF(x)   DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_FONT_CATALOG)
#define FONT_SCAN_PRINTF(x)
#define FREETYPE_FONT_PRINTF(x)   DEBUG_PRINTF_MACRO(x, NS_FONT_DEBUG_FREETYPE_FONT)
#define TT_OS2_CPR1_LATIN1   (0x00000001) /* Latin 1 */
#define TT_OS2_CPR1_LATIN2   (0x00000002) /* Latin 2: Eastern Europe */
#define TT_OS2_CPR1_CYRILLIC   (0x00000004) /* Cyrillic */
#define TT_OS2_CPR1_GREEK   (0x00000008) /* Greek */
#define TT_OS2_CPR1_TURKISH   (0x00000010) /* Turkish */
#define TT_OS2_CPR1_HEBREW   (0x00000020) /* Hebrew */
#define TT_OS2_CPR1_ARABIC   (0x00000040) /* Arabic */
#define TT_OS2_CPR1_BALTIC   (0x00000080) /* Windows Baltic */
#define TT_OS2_CPR1_VIETNAMESE   (0x00000100) /* Vietnamese */
#define TT_OS2_CPR1_THAI   (0x00010000) /* Thai */
#define TT_OS2_CPR1_JAPANESE   (0x00020000) /* JIS/Japan */
#define TT_OS2_CPR1_CHINESE_SIMP   (0x00040000) /* Chinese: Simplified */
#define TT_OS2_CPR1_KO_WANSUNG   (0x00080000) /* Korean Wansung */
#define TT_OS2_CPR1_CHINESE_TRAD   (0x00100000) /* Chinese: Traditional */
#define TT_OS2_CPR1_KO_JOHAB   (0x00200000) /* Korean Johab */
#define TT_OS2_CPR1_MAC_ROMAN   (0x20000000) /* Mac (US Roman) */
#define TT_OS2_CPR1_OEM   (0x40000000) /* OEM Character Set */
#define TT_OS2_CPR1_SYMBOL   (0x80000000) /* Symbol Character Set */
#define TT_OS2_CPR2_GREEK   (0x00010000) /* IBM Greek */
#define TT_OS2_CPR2_RUSSIAN   (0x00020000) /* MS-DOS Russian */
#define TT_OS2_CPR2_NORDIC   (0x00040000) /* MS-DOS Nordic */
#define TT_OS2_CPR2_ARABIC   (0x00080000) /* Arabic */
#define TT_OS2_CPR2_CA_FRENCH   (0x00100000) /* MS-DOS Canadian French */
#define TT_OS2_CPR2_HEBREW   (0x00200000) /* Hebrew */
#define TT_OS2_CPR2_ICELANDIC   (0x00400000) /* MS-DOS Icelandic */
#define TT_OS2_CPR2_PORTUGESE   (0x00800000) /* MS-DOS Portuguese */
#define TT_OS2_CPR2_TURKISH   (0x01000000) /* IBM Turkish */
#define TT_OS2_CPR2_CYRILLIC   (0x02000000)/*IBM Cyrillic; primarily Russian*/
#define TT_OS2_CPR2_LATIN2   (0x04000000) /* Latin 2 */
#define TT_OS2_CPR2_BALTIC   (0x08000000) /* MS-DOS Baltic */
#define TT_OS2_CPR2_GREEK_437G   (0x10000000) /* Greek; former 437 G */
#define TT_OS2_CPR2_ARABIC_708   (0x20000000) /* Arabic; ASMO 708 */
#define TT_OS2_CPR2_WE_LATIN1   (0x40000000) /* WE/Latin 1 */
#define TT_OS2_CPR2_US   (0x80000000) /* US */

Typedefs

typedef struct nsFontCharSetInfoXlib
typedef int(* nsFontCharSetConverterXlib )(nsFontCharSetInfoXlib *aSelf, XFontStruct *aFont, const PRUnichar *aSrcBuf, PRInt32 aSrcLen, char *aDestBuf, PRInt32 aDestLen)
typedef struct nsFontLangGroupXlib nsFontLangGroup
typedef PRBool(* PR_CALLBACK )(const nsFontSwitchXlib *aFontSwitch, const PRUnichar *aSubstring, PRUint32 aSubstringLength, void *aData)

Functions

nsresult CreateFontMetricsXlibContext (nsIDeviceContext *aDevice, PRBool printermode, nsFontMetricsXlibContext **aFontMetricsXlibContext)
void DeleteFontMetricsXlibContext (nsFontMetricsXlibContext *aFontMetricsXlibContext)

Class Documentation

struct nsFontLangGroupXlib

Definition at line 260 of file nsFontMetricsXlib.h.

Collaboration diagram for nsFontLangGroupXlib:
Class Members
nsIAtom * mFontLangGroupAtom
const char * mFontLangGroupName
struct nsFontCharSetMapXlib

Definition at line 265 of file nsFontMetricsXlib.h.

Collaboration diagram for nsFontCharSetMapXlib:
Class Members
nsFontLangGroupXlib * mFontLangGroup
nsFontCharSetInfoXlib * mInfo
const char * mName
struct nsFontSwitchXlib

Definition at line 331 of file nsFontMetricsXlib.h.

Collaboration diagram for nsFontSwitchXlib:
Class Members
nsFontXlib * mFontXlib

Define Documentation

Definition at line 158 of file nsFontMetricsXlib.h.

#define DEBUG_PRINTF (   x)    DEBUG_PRINTF_MACRO(x, 0xFFFF)

Definition at line 133 of file nsFontMetricsXlib.h.

Value:
PR_BEGIN_MACRO \
              if (gFontDebug & (type)) { \
                printf x ; \
                printf(", %s %d\n", __FILE__, __LINE__); \
              } \
            PR_END_MACRO

Definition at line 136 of file nsFontMetricsXlib.h.

Definition at line 149 of file nsFontMetricsXlib.h.

Definition at line 161 of file nsFontMetricsXlib.h.

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

Definition at line 115 of file nsFontMetricsXlib.h.

Value:
PR_BEGIN_MACRO \
              if (gFontDebug & NS_FONT_DEBUG_FONT_SCAN) { \
                printf x ; \
                fflush(stdout); \
              } \
            PR_END_MACRO

Definition at line 164 of file nsFontMetricsXlib.h.

Definition at line 172 of file nsFontMetricsXlib.h.

Definition at line 130 of file nsFontMetricsXlib.h.

Definition at line 123 of file nsFontMetricsXlib.h.

Definition at line 119 of file nsFontMetricsXlib.h.

Definition at line 120 of file nsFontMetricsXlib.h.

Definition at line 124 of file nsFontMetricsXlib.h.

Definition at line 125 of file nsFontMetricsXlib.h.

Definition at line 126 of file nsFontMetricsXlib.h.

Definition at line 127 of file nsFontMetricsXlib.h.

Definition at line 118 of file nsFontMetricsXlib.h.

Definition at line 122 of file nsFontMetricsXlib.h.

Definition at line 121 of file nsFontMetricsXlib.h.

Definition at line 100 of file nsFontMetricsXlib.h.

Definition at line 101 of file nsFontMetricsXlib.h.

Definition at line 155 of file nsFontMetricsXlib.h.

Definition at line 152 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_ARABIC   (0x00000040) /* Arabic */

Definition at line 493 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_BALTIC   (0x00000080) /* Windows Baltic */

Definition at line 494 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_CHINESE_SIMP   (0x00040000) /* Chinese: Simplified */

Definition at line 499 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_CHINESE_TRAD   (0x00100000) /* Chinese: Traditional */

Definition at line 501 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_CYRILLIC   (0x00000004) /* Cyrillic */

Definition at line 489 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_GREEK   (0x00000008) /* Greek */

Definition at line 490 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_HEBREW   (0x00000020) /* Hebrew */

Definition at line 492 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_JAPANESE   (0x00020000) /* JIS/Japan */

Definition at line 498 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_KO_JOHAB   (0x00200000) /* Korean Johab */

Definition at line 502 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_KO_WANSUNG   (0x00080000) /* Korean Wansung */

Definition at line 500 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_LATIN1   (0x00000001) /* Latin 1 */

Definition at line 487 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_LATIN2   (0x00000002) /* Latin 2: Eastern Europe */

Definition at line 488 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_MAC_ROMAN   (0x20000000) /* Mac (US Roman) */

Definition at line 504 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_OEM   (0x40000000) /* OEM Character Set */

Definition at line 505 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_SYMBOL   (0x80000000) /* Symbol Character Set */

Definition at line 506 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_THAI   (0x00010000) /* Thai */

Definition at line 497 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_TURKISH   (0x00000010) /* Turkish */

Definition at line 491 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR1_VIETNAMESE   (0x00000100) /* Vietnamese */

Definition at line 495 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR2_ARABIC   (0x00080000) /* Arabic */

Definition at line 514 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR2_ARABIC_708   (0x20000000) /* Arabic; ASMO 708 */

Definition at line 524 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR2_BALTIC   (0x08000000) /* MS-DOS Baltic */

Definition at line 522 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR2_CA_FRENCH   (0x00100000) /* MS-DOS Canadian French */

Definition at line 515 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR2_CYRILLIC   (0x02000000)/*IBM Cyrillic; primarily Russian*/

Definition at line 520 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR2_GREEK   (0x00010000) /* IBM Greek */

Definition at line 511 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR2_GREEK_437G   (0x10000000) /* Greek; former 437 G */

Definition at line 523 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR2_HEBREW   (0x00200000) /* Hebrew */

Definition at line 516 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR2_ICELANDIC   (0x00400000) /* MS-DOS Icelandic */

Definition at line 517 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR2_LATIN2   (0x04000000) /* Latin 2 */

Definition at line 521 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR2_NORDIC   (0x00040000) /* MS-DOS Nordic */

Definition at line 513 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR2_PORTUGESE   (0x00800000) /* MS-DOS Portuguese */

Definition at line 518 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR2_RUSSIAN   (0x00020000) /* MS-DOS Russian */

Definition at line 512 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR2_TURKISH   (0x01000000) /* IBM Turkish */

Definition at line 519 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR2_US   (0x80000000) /* US */

Definition at line 526 of file nsFontMetricsXlib.h.

#define TT_OS2_CPR2_WE_LATIN1   (0x40000000) /* WE/Latin 1 */

Definition at line 525 of file nsFontMetricsXlib.h.

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

Definition at line 116 of file nsFontMetricsXlib.h.


Typedef Documentation

typedef int(* nsFontCharSetConverterXlib)(nsFontCharSetInfoXlib *aSelf, XFontStruct *aFont, const PRUnichar *aSrcBuf, PRInt32 aSrcLen, char *aDestBuf, PRInt32 aDestLen)

Definition at line 177 of file nsFontMetricsXlib.h.

typedef struct nsFontCharSetInfoXlib

Definition at line 175 of file nsFontMetricsXlib.h.

typedef PRBool(* PR_CALLBACK)(const nsFontSwitchXlib *aFontSwitch, const PRUnichar *aSubstring, PRUint32 aSubstringLength, void *aData)

Definition at line 338 of file nsFontMetricsXlib.h.


Function Documentation

nsresult CreateFontMetricsXlibContext ( nsIDeviceContext aDevice,
PRBool  printermode,
nsFontMetricsXlibContext **  aFontMetricsXlibContext 
)

Definition at line 1252 of file nsFontMetricsXlib.cpp.

{
  nsresult                  rv;
  nsFontMetricsXlibContext *fmctx;
  
  *aFontMetricsXlibContext = nsnull;
  
  fmctx = new nsFontMetricsXlibContext();
  if (!fmctx)
    return NS_ERROR_OUT_OF_MEMORY;
  
  rv = fmctx->Init(aDevice, aPrintermode);
  if ((NS_FAILED(rv))) {
    delete fmctx;
    return rv;
  }
  
  *aFontMetricsXlibContext = fmctx;
  
  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1274 of file nsFontMetricsXlib.cpp.

{
  if (aFontMetricsXlibContext) {
    delete aFontMetricsXlibContext;
  }
}

Here is the caller graph for this function: