Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | Related Pages

FTFont Class Reference

#include <FTFont.h>

List of all members.

Public Member Functions

 FTFont (QString path)
QString getPath (QString, QString)
QPoint getFTOrg (int)
void setFTFontSize (int size)
QImage getImage (int nglyph)
QImage getImageTransformed (int nglyph, double x00, double x01, double x10, double x11)
QString getPath (QString)
uchar * getUmap (int)
uchar * getUmap (FT_Glyph)
FT_Bitmap renderBmp (int)
FT_Bitmap renderBmp (FT_Glyph)
QImage getImageEnc (unsigned long nglyph, int)
QBitmap getMonoImage (int nglyph)
int getFTSize ()
int getFirstChar ()
int getNextChar (int)
int getGlyphEnc (unsigned long int,int enc)
void displayASCII (FT_Bitmap)
void displayASCII (uchar *)
FT_Glyph transformGlyph (int, double x00, double x01, double x10, double x11)
QCoordsRect getBoundingBox (int nglyph)
QCoordsRect getBoundingBoxEnc (unsigned long i, int enc)
FT_GlyphSlot slot ()
void setRez (int)
void setRez (int, int)

Public Attributes

int error


Detailed Description

This class manage the font library.

As a music notation program has a very particuliar way of usig font I choose to use my own font manager (Freetype)

*


Constructor & Destructor Documentation

FTFont::FTFont (  QString  fontPath  ) 
 

Constructor of a freetype font.

Initialization of the lib


Member Function Documentation

void FTFont::displayASCII (  uchar *  tab  ) 
 

This is an overloaded method provided for convinience

void FTFont::displayASCII (  FT_Bitmap  ft  ) 
 

Display the ASCII representation of a symbol

int FTFont::getFirstChar (   ) 
 

Returns:
the first code of the font
Deprecated:

QPoint FTFont::getFTOrg (  int  nglyph  ) 
 

Retrouve l'origine d'un point

int FTFont::getFTSize (   ) 
 

Returns:
the size of the glyph

int FTFont::getGlyphEnc (  unsigned long  code,
int  enc
) 
 

Returns:
the glyph number expressed in a encoding
Parameters:
enc the encoding used
Todo:
treat the parameter enc

QImage FTFont::getImage (  int  nglyph  ) 
 

Compute the render of a glyph

*

QImage FTFont::getImageEnc (  unsigned long  code,
int  enc
) 
 

Compute the rendering of a glyph in the current encoding

Parameters:
enc the encoding used to compute the glyph changer la charmap.
*

QImage FTFont::getImageTransformed (  int  nglyph,
double  x00,
double  x01,
double  x10,
double  x11
) 
 

Returns:
a glyph and transformed with the transform matrix x00,x01,x10,x11
Parameters:
x00 
x01 
x10 
x01 *

destroy the image map. Later we will think about a hash not to destroy this beautiful work of allocation and rendering

int FTFont::getNextChar (  int  code  ) 
 

Returns:
next character in font

QString FTFont::getPath (  QString  fontname  ) 
 

Returns:
the path used for the font

uchar * FTFont::getUmap (  FT_Glyph  glyph  ) 
 

Compute the umap of a glyph

Parameters:
glyph a glyph

uchar * FTFont::getUmap (  int  nglyph  ) 
 

/return the umap for building an image

FT_Bitmap FTFont::renderBmp (  FT_Glyph  glyph  ) 
 

Returns:
a bitmap

FT_Bitmap FTFont::renderBmp (  int  nglyph  ) 
 

Returns:
a FTBitmap.

void FTFont::setFTFontSize (  int  s  ) 
 

Warning this function is very tied to the set res fonction. Since they have the same effect. Every change ont the font size finally cause a change on the resolution. This could be wrong in the case of non proportionnal font. But I hope we never meet it in music notation.

void FTFont::setRez (  int  rx,
int  ry
) 
 

set the resolution. We give the precedence to the resolution. So

Parameters:
rx the x resolution
ry the y resolution

void FTFont::setRez (  int  r  ) 
 

This set the resX and resY to r this is porvide for convenience because in most case we are in isometric resolution

Parameters:
r the isometric resolution

FT_Glyph FTFont::transformGlyph (  int  nglyph,
double  x00,
double  x01,
double  x10,
double  x11
) 
 

Returns:
a glyph and transformed with the transform matrix x00,x01,x10,x11
Parameters:
x00 
x01 
x10 
x01 *


The documentation for this class was generated from the following files:
Generated on Tue Jun 1 21:13:32 2004 for Alternate Take by doxygen 1.3.6