Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions | Variables
nsCairoFontMetrics.cpp File Reference
#include "nsCairoFontMetrics.h"
#include "nsFont.h"
#include "nsDirectoryServiceDefs.h"
#include "nsIFile.h"
#include "nsString.h"

Go to the source code of this file.

Defines

#define FONT_FILE   "Vera.ttf"
#define FONT_SIZE   10
#define FT_FLOOR(X)   ((X & -64) >> 6)
#define FT_CEIL(X)   (((X + 63) & -64) >> 6)

Functions

static char * GetFontPath ()

Variables

static FT_Library ftlib = nsnull

Define Documentation

#define FONT_FILE   "Vera.ttf"

Definition at line 47 of file nsCairoFontMetrics.cpp.

#define FONT_SIZE   10

Definition at line 48 of file nsCairoFontMetrics.cpp.

#define FT_CEIL (   X)    (((X + 63) & -64) >> 6)

Definition at line 55 of file nsCairoFontMetrics.cpp.

#define FT_FLOOR (   X)    ((X & -64) >> 6)

Definition at line 54 of file nsCairoFontMetrics.cpp.


Function Documentation

static char* GetFontPath ( ) [static]

Definition at line 80 of file nsCairoFontMetrics.cpp.

{
    return strdup("/tmp/fonts/" FONT_FILE);

    nsCOMPtr<nsIFile> aFile;
    NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR, getter_AddRefs(aFile));
    aFile->Append(NS_LITERAL_STRING(FONT_FILE));
    nsAutoString pathBuf;
    aFile->GetPath(pathBuf);
    NS_LossyConvertUCS2toASCII pathCBuf(pathBuf);

    return strdup(pathCBuf.get());
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

FT_Library ftlib = nsnull [static]

Definition at line 57 of file nsCairoFontMetrics.cpp.