FTGL 2.4.0

FTBufferFont.h
Go to the documentation of this file.
1/*
2 * FTGL - OpenGL font library
3 *
4 * Copyright (c) 2008 Sam Hocevar <sam@hocevar.net>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining
7 * a copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sublicense, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be
15 * included in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 */
25
26#ifndef __ftgl__
27# warning Please use <FTGL/ftgl.h> instead of <FTBufferFont.h>.
28# include <FTGL/ftgl.h>
29#endif
30
31#ifndef __FTBufferFont__
32#define __FTBufferFont__
33
34#ifdef __cplusplus
35
36
43 class FTGL_EXPORT FTBufferFont : public FTFont
44{
45 public:
51 FTBufferFont(const char* fontFilePath);
52
61 FTBufferFont(const unsigned char *pBufferBytes,
62 size_t bufferSizeInBytes);
63
67 ~FTBufferFont();
68
69 protected:
79 virtual FTGlyph* MakeGlyph(FT_GlyphSlot slot);
80};
81
82#endif //__cplusplus
83
84 FTGL_BEGIN_C_DECLS
85
94 FTGL_EXPORT FTGLfont *ftglCreateBufferFont(const char *file);
95
96 FTGL_END_C_DECLS
97
98#endif // __FTBufferFont__
99
ftglCreateBufferFont
FTGLfont * ftglCreateBufferFont(const char *file)
Create a specialised FTGLfont object for handling memory buffer fonts.
FTGLfont
struct _FTGLfont FTGLfont
Definition FTFont.h:414
FTBufferFont::FTBufferFont
FTBufferFont(const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
Open and read a font from a buffer in memory.
FTBufferFont::~FTBufferFont
~FTBufferFont()
Destructor.
FTBufferFont::MakeGlyph
virtual FTGlyph * MakeGlyph(FT_GlyphSlot slot)
Construct a glyph of the correct type.
FTBufferFont::FTBufferFont
FTBufferFont(const char *fontFilePath)
Open and read a font file.
FTFont::FTFont
FTFont(char const *fontFilePath)
Open and read a font file.
FTGlyph
FTGlyph is the base class for FTGL glyphs.
Definition FTGlyph.h:51
ftgl.h
FTGL_BEGIN_C_DECLS
#define FTGL_BEGIN_C_DECLS
Definition ftgl.h:43
FTGL_END_C_DECLS
#define FTGL_END_C_DECLS
Definition ftgl.h:44
FTGL_EXPORT
#define FTGL_EXPORT
Definition ftgl.h:134