FTGL: FTGLOutlineFont.h Source File

FTGL 2.4.0

FTGLOutlineFont.h
Go to the documentation of this file.
1 /*
2 * FTGL - OpenGL font library
3 *
4 * Copyright (c) 2001-2004 Henry Maddocks <ftgl@opengl.geek.nz>
5 * Copyright (c) 2008 Sam Hocevar <sam@hocevar.net>
6 * Copyright (c) 2008 Sean Morrison <learner@brlcad.org>
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining
9 * a copy of this software and associated documentation files (the
10 * "Software"), to deal in the Software without restriction, including
11 * without limitation the rights to use, copy, modify, merge, publish,
12 * distribute, sublicense, and/or sell copies of the Software, and to
13 * permit persons to whom the Software is furnished to do so, subject to
14 * the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be
17 * included in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 */
27
28 #ifndef __ftgl__
29 # warning This header is deprecated. Please use <FTGL/ftgl.h> from now.
30 # include <FTGL/ftgl.h>
31 #endif
32
33 #ifndef __FTOutlineFont__
34 #define __FTOutlineFont__
35
36 #ifdef __cplusplus
37
38
45 class FTGL_EXPORT FTOutlineFont : public FTFont
46 {
47 public:
53 FTOutlineFont(const char* fontFilePath);
54
63 FTOutlineFont(const unsigned char *pBufferBytes,
64 size_t bufferSizeInBytes);
65
69 ~FTOutlineFont();
70
71 protected:
81 virtual FTGlyph* MakeGlyph(FT_GlyphSlot slot);
82 };
83
84 #define FTGLOutlineFont FTOutlineFont
85
86 #endif //__cplusplus
87
88 FTGL_BEGIN_C_DECLS
89
98 FTGL_EXPORT FTGLfont *ftglCreateOutlineFont(const char *file);
99
109 FTGL_EXPORT FTGLfont *ftglCreateOutlineFontFromMem(const unsigned char *bytes,
110 size_t len);
111
112 FTGL_END_C_DECLS
113
114 #endif // __FTOutlineFont__
115
FTGlyph
FTGlyph is the base class for FTGL glyphs.
Definition: FTGlyph.h:51
FTOutlineFont
FTOutlineFont is a specialisation of the FTFont class for handling Vector Outline fonts.
Definition: FTGLOutlineFont.h:46
FTGL_END_C_DECLS
#define FTGL_END_C_DECLS
Definition: ftgl.h:44
ftglCreateOutlineFontFromMem
FTGLfont * ftglCreateOutlineFontFromMem(const unsigned char *bytes, size_t len)
Create a specialised FTGLfont object for handling vector outline fonts from a buffer in memory.
ftglCreateOutlineFont
FTGLfont * ftglCreateOutlineFont(const char *file)
Create a specialised FTGLfont object for handling vector outline fonts.
FTOutlineFont::MakeGlyph
virtual FTGlyph * MakeGlyph(FT_GlyphSlot slot)
Construct a glyph of the correct type.
ftgl.h
FTGLfont
struct _FTGLfont FTGLfont
Definition: FTFont.h:414
FTGL_BEGIN_C_DECLS
#define FTGL_BEGIN_C_DECLS
Definition: ftgl.h:43
FTFont
FTFont is the public interface for the FTGL library.
Definition: FTFont.h:57
FTOutlineFont::~FTOutlineFont
~FTOutlineFont()
Destructor.
FTOutlineFont::FTOutlineFont
FTOutlineFont(const char *fontFilePath)
Open and read a font file.
FTOutlineFont::FTOutlineFont
FTOutlineFont(const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
Open and read a font from a buffer in memory.
FTGL_EXPORT
#define FTGL_EXPORT
Definition: ftgl.h:134