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]);
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.
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.
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).