Go to the documentation of this file.
29 # warning This header is deprecated. Please use <FTGL/ftgl.h> from now.
64 FTFont(
char const *fontFilePath);
74 FTFont(
const unsigned char *pBufferBytes,
size_t bufferSizeInBytes);
106 virtual bool Attach(
const char* fontFilePath);
118 virtual bool Attach(
const unsigned char *pBufferBytes,
119 size_t bufferSizeInBytes);
137 virtual bool CharMap(FT_Encoding encoding);
160 virtual bool FaceSize(
const unsigned int size,
161 const unsigned int res = 72);
168 virtual unsigned int FaceSize()
const;
176 virtual void Depth(
float depth);
184 virtual void Outset(
float outset);
193 virtual void Outset(
float front,
float back);
236 virtual FTBBox BBox(
const char *
string,
const int len = -1,
251 void BBox(
const char*
string,
float& llx,
float& lly,
float& llz,
252 float& urx,
float& ury,
float& urz)
271 virtual FTBBox BBox(
const wchar_t *
string,
const int len = -1,
286 void BBox(
const wchar_t*
string,
float& llx,
float& lly,
float& llz,
287 float& urx,
float& ury,
float& urz)
305 virtual float Advance(
const char*
string,
const int len = -1,
319 virtual float Advance(
const wchar_t*
string,
const int len = -1,
335 virtual FTPoint Render(
const char*
string,
const int len = -1,
353 virtual FTPoint Render(
const wchar_t *
string,
const int len = -1,
363 virtual FT_Error
Error()
const;
367 friend class FTFontImpl;
378 virtual FTGlyph* MakeGlyph(FT_GlyphSlot slot) = 0;
411 FTGLglyph * (*makeglyphCallback) (FT_GlyphSlot,
void *));
553 int len,
float bounds[6]);
FTGlyph is the base class for FTGL glyphs.
virtual FT_Error Error() const
Queries the Font for errors.
void ftglDestroyFont(FTGLfont *font)
Destroy an FTGL font object.
struct _FTGLglyph FTGLglyph
unsigned int ftglGetFontFaceSize(FTGLfont *font)
Get the current face size in points (1/72 inch).
FTPolygonFont is a specialisation of the FTFont class for handling tesselated Polygon Mesh fonts.
virtual float Descender() const
Gets the global descender height for the face.
int ftglAttachFile(FTGLfont *font, const char *path)
Attach auxilliary file to font e.g.
virtual FTPoint Render(const char *string, const int len=-1, FTPoint position=FTPoint(), FTPoint spacing=FTPoint(), int renderMode=FTGL::RENDER_ALL)
Render a string of characters.
void ftglSetFontOutset(FTGLfont *font, float front, float back)
Set the outset distance for the font.
virtual void UseDisplayList(bool useList)
Enable or disable the use of Display Lists inside FTGL.
virtual unsigned int CharMapCount() const
Get the number of character maps in this face.
FTGLfont * ftglCreateCustomFont(char const *fontFilePath, void *data, FTGLglyph *(*makeglyphCallback)(FT_GlyphSlot, void *))
Create a custom FTGL font object.
FTPixmapFont is a specialisation of the FTFont class for handling Pixmap (Grey Scale) fonts.
FTOutlineFont is a specialisation of the FTFont class for handling Vector Outline fonts.
const FTPoint Lower() const
void BBox(const wchar_t *string, float &llx, float &lly, float &llz, float &urx, float &ury, float &urz)
Get the bounding box for a string (deprecated).
FTBBox is a convenience class for handling bounding boxes.
virtual float Advance(const char *string, const int len=-1, FTPoint spacing=FTPoint())
Get the advance for a string.
int ftglSetFontFaceSize(FTGLfont *font, unsigned int size, unsigned int res)
Set the char size for the current face.
FTExtrudeFont is a specialisation of the FTFont class for handling extruded Polygon fonts.
FTPoint class is a basic 3-dimensional point or vector.
void ftglGetFontBBox(FTGLfont *font, const char *string, int len, float bounds[6])
Get the bounding box for a string.
float ftglGetFontAdvance(FTGLfont *font, const char *string)
Get the advance width for a string.
void ftglRenderFont(FTGLfont *font, const char *string, int mode)
Render a string of characters.
void ftglSetFontDepth(FTGLfont *font, float depth)
Set the extrusion distance for the font.
FTTextureFont is a specialisation of the FTFont class for handling Texture mapped fonts.
const FTPoint Upper() const
FTFont(char const *fontFilePath)
Open and read a font file.
struct _FTGLfont FTGLfont
void BBox(const char *string, float &llx, float &lly, float &llz, float &urx, float &ury, float &urz)
Get the bounding box for a string (deprecated).
#define FTGL_BEGIN_C_DECLS
int ftglSetFontCharMap(FTGLfont *font, FT_Encoding encoding)
Set the character map for the face.
float ftglGetFontAscender(FTGLfont *font)
Get the global ascender height for the face.
virtual float LineHeight() const
Gets the line spacing for the font.
virtual void GlyphLoadFlags(FT_Int flags)
Set the glyph loading flags.
FTFont is the public interface for the FTGL library.
virtual bool Attach(const char *fontFilePath)
Attach auxilliary file to font e.g font metrics.
virtual float Ascender() const
Get the global ascender height for the face.
unsigned int ftglGetFontCharMapCount(FTGLfont *font)
Get the number of character maps in this face.
int ftglAttachData(FTGLfont *font, const unsigned char *data, size_t size)
Attach auxilliary data to font, e.g.
virtual FT_Encoding * CharMapList()
Get a list of character maps in this face.
float ftglGetFontDescender(FTGLfont *font)
Gets the global descender height for the face.
virtual unsigned int FaceSize() const
Get the current face size in points (1/72 inch).
void ftglSetFontDisplayList(FTGLfont *font, int useList)
Enable or disable the use of Display Lists inside FTGL.
float ftglGetFontLineHeight(FTGLfont *font)
Gets the line spacing for the font.
FT_Error ftglGetFontError(FTGLfont *font)
Query a font for errors.
virtual void Depth(float depth)
Set the extrusion distance for the font.
FTBufferFont is a specialisation of the FTFont class for handling memory buffer fonts.
FTBitmapFont is a specialisation of the FTFont class for handling Bitmap fonts.
FT_Encoding * ftglGetFontCharMapList(FTGLfont *font)
Get a list of character maps in this face.
virtual bool CharMap(FT_Encoding encoding)
Set the character map for the face.
virtual FTBBox BBox(const char *string, const int len=-1, FTPoint position=FTPoint(), FTPoint spacing=FTPoint())
Get the bounding box for a string.
virtual void Outset(float outset)
Set the outset distance for the font.