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