| FTGL
    2.4.0
    | 
#include <FTGL/ftgl.h>Go to the source code of this file.
| Data Structures | |
| class | FTFont | 
| FTFont is the public interface for the FTGL library.  More... | |
| Typedefs | |
| typedef struct _FTGLfont | FTGLfont | 
| Functions | |
| FTGLfont * | ftglCreateCustomFont (char const *fontFilePath, void *data, FTGLglyph *(*makeglyphCallback)(FT_GlyphSlot, void *)) | 
| Create a custom FTGL font object.  More... | |
| 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.  More... | |
| void | ftglDestroyFont (FTGLfont *font) | 
| Destroy an FTGL font object.  More... | |
| int | ftglAttachFile (FTGLfont *font, const char *path) | 
| Attach auxilliary file to font e.g.  More... | |
| int | ftglAttachData (FTGLfont *font, const unsigned char *data, size_t size) | 
| Attach auxilliary data to font, e.g.  More... | |
| void | ftglSetFontGlyphLoadFlags (FTGLfont *font, FT_Int flags) | 
| Set the glyph loading flags.  More... | |
| int | ftglSetFontCharMap (FTGLfont *font, FT_Encoding encoding) | 
| Set the character map for the face.  More... | |
| unsigned int | ftglGetFontCharMapCount (FTGLfont *font) | 
| Get the number of character maps in this face.  More... | |
| FT_Encoding * | ftglGetFontCharMapList (FTGLfont *font) | 
| Get a list of character maps in this face.  More... | |
| int | ftglSetFontFaceSize (FTGLfont *font, unsigned int size, unsigned int res) | 
| Set the char size for the current face.  More... | |
| unsigned int | ftglGetFontFaceSize (FTGLfont *font) | 
| Get the current face size in points (1/72 inch).  More... | |
| void | ftglSetFontDepth (FTGLfont *font, float depth) | 
| Set the extrusion distance for the font.  More... | |
| void | ftglSetFontOutset (FTGLfont *font, float front, float back) | 
| Set the outset distance for the font.  More... | |
| void | ftglSetFontDisplayList (FTGLfont *font, int useList) | 
| Enable or disable the use of Display Lists inside FTGL.  More... | |
| float | ftglGetFontAscender (FTGLfont *font) | 
| Get the global ascender height for the face.  More... | |
| float | ftglGetFontDescender (FTGLfont *font) | 
| Gets the global descender height for the face.  More... | |
| float | ftglGetFontLineHeight (FTGLfont *font) | 
| Gets the line spacing for the font.  More... | |
| void | ftglGetFontBBox (FTGLfont *font, const char *string, int len, float bounds[6]) | 
| Get the bounding box for a string.  More... | |
| float | ftglGetFontAdvance (FTGLfont *font, const char *string) | 
| Get the advance width for a string.  More... | |
| void | ftglRenderFont (FTGLfont *font, const char *string, int mode) | 
| Render a string of characters.  More... | |
| FT_Error | ftglGetFontError (FTGLfont *font) | 
| Query a font for errors.  More... | |
| int ftglAttachData | ( | FTGLfont * | font, | 
| const unsigned char * | data, | ||
| size_t | size | ||
| ) | 
Attach auxilliary data to font, e.g.
font metrics, from memory.
Note: not all font formats implement this function.
| font | An FTGLfont* object. | 
| data | The in-memory buffer. | 
| size | The length of the buffer in bytes. | 
| int ftglAttachFile | ( | FTGLfont * | font, | 
| const char * | path | ||
| ) | 
Attach auxilliary file to font e.g.
font metrics.
Note: not all font formats implement this function.
| font | An FTGLfont* object. | 
| path | Auxilliary font file path. | 
| FTGLfont* ftglCreateCustomFont | ( | char const * | fontFilePath, | 
| void * | data, | ||
| FTGLglyph *(*)(FT_GlyphSlot, void *) | makeglyphCallback | ||
| ) | 
Create a custom FTGL font object.
| fontFilePath | The font file name. | 
| data | A pointer to private data that will be passed to callbacks. | 
| makeglyphCallback | A glyph-making callback function. | 
| FTGLfont* ftglCreateCustomFontFromMem | ( | const unsigned char * | bytes, | 
| size_t | len, | ||
| void * | data, | ||
| FTGLglyph *(*)(FT_GlyphSlot, void *) | makeglyphCallback | ||
| ) | 
Create a custom FTGL font object from a buffer in memory.
| bytes | the in-memory buffer | 
| len | the length of the buffer in bytes | 
| data | A pointer to private data that will be passed to callbacks. | 
| makeglyphCallback | A glyph-making callback function. | 
| void ftglDestroyFont | ( | FTGLfont * | font | ) | 
Destroy an FTGL font object.
| font | An FTGLfont* object. | 
| float ftglGetFontAdvance | ( | FTGLfont * | font, | 
| const char * | string | ||
| ) | 
Get the advance width for a string.
| font | An FTGLfont* object. | 
| string | A char string. | 
| float ftglGetFontAscender | ( | FTGLfont * | font | ) | 
Get the global ascender height for the face.
| font | An FTGLfont* object. | 
| void ftglGetFontBBox | ( | FTGLfont * | font, | 
| const char * | string, | ||
| int | len, | ||
| float | bounds[6] | ||
| ) | 
Get the bounding box for a string.
| font | An FTGLfont* object. | 
| string | A char buffer | 
| len | The length of the string. If < 0 then all characters will be checked until a null character is encountered (optional). | 
| bounds | An array of 6 float values where the bounding box's lower left near and upper right far 3D coordinates will be stored. | 
| unsigned int ftglGetFontCharMapCount | ( | FTGLfont * | font | ) | 
Get the number of character maps in this face.
| font | An FTGLfont* object. | 
| FT_Encoding* ftglGetFontCharMapList | ( | FTGLfont * | font | ) | 
Get a list of character maps in this face.
| font | An FTGLfont* object. | 
| float ftglGetFontDescender | ( | FTGLfont * | font | ) | 
Gets the global descender height for the face.
| font | An FTGLfont* object. | 
| FT_Error ftglGetFontError | ( | FTGLfont * | font | ) | 
Query a font for errors.
| font | An FTGLfont* object. | 
| unsigned int ftglGetFontFaceSize | ( | FTGLfont * | font | ) | 
Get the current face size in points (1/72 inch).
| font | An FTGLfont* object. | 
| float ftglGetFontLineHeight | ( | FTGLfont * | font | ) | 
Gets the line spacing for the font.
| font | An FTGLfont* object. | 
| void ftglRenderFont | ( | FTGLfont * | font, | 
| const char * | string, | ||
| int | mode | ||
| ) | 
Render a string of characters.
| font | An FTGLfont* object. | 
| string | Char string to be output. | 
| mode | Render mode to display. | 
| int ftglSetFontCharMap | ( | FTGLfont * | font, | 
| FT_Encoding | encoding | ||
| ) | 
Set the character map for the face.
| font | An FTGLfont* object. | 
| encoding | Freetype enumerate for char map code. | 
| void ftglSetFontDepth | ( | FTGLfont * | font, | 
| float | depth | ||
| ) | 
Set the extrusion distance for the font.
Only implemented by FTExtrudeFont.
| font | An FTGLfont* object. | 
| depth | The extrusion distance. | 
| void ftglSetFontDisplayList | ( | FTGLfont * | font, | 
| int | useList | ||
| ) | 
Enable or disable the use of Display Lists inside FTGL.
| font | An FTGLfont* object. | 
| useList | 1 turns ON display lists. 0 turns OFF display lists. | 
| int ftglSetFontFaceSize | ( | FTGLfont * | font, | 
| unsigned int | size, | ||
| unsigned int | res | ||
| ) | 
Set the char size for the current face.
| font | An FTGLfont* object. | 
| size | The face size in points (1/72 inch). | 
| res | The resolution of the target device, or 0 to use the default value of 72. | 
| void ftglSetFontGlyphLoadFlags | ( | FTGLfont * | font, | 
| FT_Int | flags | ||
| ) | 
Set the glyph loading flags.
By default, fonts use the most sensible flags when loading a font's glyph using FT_Load_Glyph(). This function allows to override the default flags.
| font | An FTGLfont* object. | 
| flags | The glyph loading flags. | 
| void ftglSetFontOutset | ( | FTGLfont * | font, | 
| float | front, | ||
| float | back | ||
| ) | 
Set the outset distance for the font.
Only FTOutlineFont, FTPolygonFont and FTExtrudeFont implement front outset. Only FTExtrudeFont implements back outset.
| font | An FTGLfont* object. | 
| front | The front outset distance. | 
| back | The back outset distance. | 
 1.8.15
 1.8.15