# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CFontGenerator Class Reference

Generate bitmap based on a true type font (using freetype2). More...

#include <font_generator.h>

List of all members.

Public Methods

 CFontGenerator (const std::string &fontFileName, const std::string &fontExFileName = "")
 Constructor. More...

uint8getBitmap (ucchar c, uint32 size, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex)
 generate and return a bitmap. More...

void getKerning (ucchar left, ucchar right, sint32 &kernx)
uint32 getCharIndex (ucchar c)

Public Attributes

std::string FontFileName

Private Methods

const char* getFT2Error (FT_Error fte)

Private Attributes

FT_Face _Face

Static Private Attributes

FT_Library _Library
bool _LibraryInit = false


Detailed Description

Generate bitmap based on a true type font (using freetype2).

Author(s):
Vianney Lecroart , Nevrax France
Date:
2000

Definition at line 49 of file font_generator.h.


Constructor & Destructor Documentation

NL3D::CFontGenerator::CFontGenerator ( const std::string & fontFileName,
const std::string & fontExFileName = "" )
 

Constructor.

Parameters:
fontFileName   path+filename (ex: "c:\winnt\fonts\arial.ttf")

Definition at line 85 of file font_generator.cpp.


Member Function Documentation

uint8 * NL3D::CFontGenerator::getBitmap ( ucchar c,
uint32 size,
uint32 & width,
uint32 & height,
uint32 & pitch,
sint32 & left,
sint32 & top,
sint32 & advx,
uint32 & glyphIndex )
 

generate and return a bitmap.

Parameters:
c   the unicode char
size   size of the generated font in ??? format
width   width of the generated bitmap, this value is set by this function
height   height of the generated bitmap, this value is set by this function
pitch   pitch of the generated bitmap (+ or - the number of bytes per row), this value is set by this function

Definition at line 117 of file font_generator.cpp.

uint32 NL3D::CFontGenerator::getCharIndex ( ucchar c )
 

Definition at line 192 of file font_generator.cpp.

const char * NL3D::CFontGenerator::getFT2Error ( FT_Error fte ) [private]
 

Definition at line 67 of file font_generator.cpp.

void NL3D::CFontGenerator::getKerning ( ucchar left,
ucchar right,
sint32 & kernx )
 

Definition at line 172 of file font_generator.cpp.


Member Data Documentation

std::string NL3D::CFontGenerator::FontFileName
 

Definition at line 71 of file font_generator.h.

FT_Face NL3D::CFontGenerator::_Face [private]
 

Definition at line 79 of file font_generator.h.

FT_Library NL3D::CFontGenerator::_Library [static, private]
 

Definition at line 61 of file font_generator.cpp.

bool NL3D::CFontGenerator::_LibraryInit = false [static, private]
 

Definition at line 62 of file font_generator.cpp.


The documentation for this class was generated from the following files: