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