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

FTFont.h

00001 #ifndef FTFONT_H
00002 #define FTFONT_H
00003 #include <qpoint.h>
00004 #include <qstring.h>
00005 #include <ft2build.h>
00006 #include FT_FREETYPE_H
00007 #include <qimage.h>
00008 #include "QCoordsRect.h"
00009 #include <qfile.h>
00010 #include  <freetype/ftglyph.h>
00011 #include "../config.h"
00020 class FTFont
00021 {
00022   FT_Library library;
00023   FT_Face face;
00024   int enc;
00025   int size;
00026   int resX;
00027   int resY;
00028   uchar* imagemap;
00029   int imagemapSize;
00030   int ready;
00031   FT_GlyphSlot glyphSlot;
00032   QRgb colortable[256];
00033   //static FTFont *instance, *instance2;
00034 
00035 public:
00036 #ifdef OPTIM
00037 static int getBoundingBoxEncCall;
00038 static int getBoundingBoxCall;
00039 #endif
00040 FTFont (QString path);
00041 //static FTFont *getInstance ();
00042 QString getPath(QString, QString);
00043 QPoint getFTOrg (int);
00044 int error;
00045 void setFTFontSize (int size);
00046 QImage getImage (int nglyph);
00047 QImage getImageTransformed (int nglyph,double x00,double x01,double x10,double x11);
00048 QString getPath(QString);
00049 uchar * getUmap(int );
00050 uchar * getUmap(FT_Glyph );
00051 FT_Bitmap renderBmp(int );
00052 FT_Bitmap renderBmp(FT_Glyph );
00053 QImage getImageEnc (unsigned long nglyph,int );
00054 QBitmap getMonoImage (int nglyph);
00055 int getFTSize ();
00056 int getFirstChar();
00057 int getNextChar(int );
00058 int getGlyphEnc(unsigned long  int ,int enc);
00059 void displayASCII(FT_Bitmap);
00060 void displayASCII(uchar *);
00061 FT_Glyph transformGlyph(int,double x00,double x01,double x10,double x11);
00062 
00063 QCoordsRect getBoundingBox (int nglyph);
00064 QCoordsRect getBoundingBoxEnc (unsigned long  i,int enc);
00065 
00066 FT_GlyphSlot slot ();
00067 void setRez (int);
00068 void setRez (int,int);
00069 };
00070 
00071 #endif

Generated on Tue Jun 1 21:13:29 2004 for Alternate Take by doxygen 1.3.6