Go to the documentation of this file.
29 # warning This header is deprecated. Please use <FTGL/ftgl.h> from now.
74 FTFont(
const unsigned char *pBufferBytes,
size_t bufferSizeInBytes);
107 virtual bool Attach(
const char* fontFilePath);
119 virtual bool Attach(
const unsigned char *pBufferBytes,
120 size_t bufferSizeInBytes);
162 const unsigned int res = 72);
194 virtual void Outset(
float front,
float back);
252 void BBox(
const char*
string,
float& llx,
float& lly,
float& llz,
253 float& urx,
float& ury,
float& urz)
272 virtual FTBBox BBox(
const wchar_t *
string,
const int len = -1,
287 void BBox(
const wchar_t*
string,
float& llx,
float& lly,
float& llz,
288 float& urx,
float& ury,
float& urz)
306 virtual float Advance(
const char*
string,
const int len = -1,
320 virtual float Advance(
const wchar_t*
string,
const int len = -1,
382 friend class FTFontImpl;
426 FTGLglyph * (*makeglyphCallback) (FT_GlyphSlot,
void *));
438 size_t len,
void *data,
439 FTGLglyph * (*makeglyphCallback) (FT_GlyphSlot,
void *));
591 int len,
float bounds[6]);
FTGlyph is the base class for FTGL glyphs.
virtual FT_Error Error() const
Queries the Font for errors.
FTGLfont * ftglCreateCustomFontFromMem(const unsigned char *bytes, size_t len, void *data, FTGLglyph *(*makeglyphCallback)(FT_GlyphSlot, void *))
Create a custom FTGL font object from a buffer in memory.
void ftglDestroyFont(FTGLfont *font)
Destroy an FTGL font object.
struct _FTGLglyph FTGLglyph
FTFont(const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
Open and read a font from a buffer in memory.
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.
virtual FTBBox BBox(const wchar_t *string, const int len=-1, FTPoint position=FTPoint(), FTPoint spacing=FTPoint())
Get the bounding box for a string.
FTOutlineFont is a specialisation of the FTFont class for handling Vector Outline fonts.
virtual void Outset(float front, float back)
Set the front and back outset distances for the font.
FTPoint const Upper() 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).
virtual FTPoint Render(const wchar_t *string, const int len=-1, FTPoint position=FTPoint(), FTPoint spacing=FTPoint(), int renderMode=FTGL::RENDER_ALL)
Render a string of characters.
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.
virtual FTGlyph * MakeGlyph(FT_GlyphSlot slot)=0
Construct a glyph of the correct type.
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.
FTFont(char const *fontFilePath)
Open and read a font file.
struct _FTGLfont FTGLfont
void ftglSetFontGlyphLoadFlags(FTGLfont *font, FT_Int flags)
Set the glyph loading flags.
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 bool Attach(const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
Attach auxilliary data to font e.g font metrics, from memory.
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.
FTPoint const Lower() const
float ftglGetFontDescender(FTGLfont *font)
Gets the global descender height for the face.
virtual bool FaceSize(const unsigned int size, const unsigned int res=72)
Set the char size for the current 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.
virtual float Advance(const wchar_t *string, const int len=-1, FTPoint spacing=FTPoint())
Get the advance for a string.
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.