FTGL 2.4.0

FTGLTriangleExtractorFont.h
Go to the documentation of this file.
1/*
2 * FTGL - OpenGL font library
3 *
4 * Copyright (c) 2011 Richard Ulrich <richi@paraeasy.ch>
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 This header is deprecated. Please use <FTGL/ftgl.h> from now.
28# include <FTGL/ftgl.h>
29#endif
30
31#ifndef __FTTriangleExtractorFont__
32#define __FTTriangleExtractorFont__
33
34#ifdef __cplusplus
35
36#include <vector>
37
44 class FTGL_EXPORT FTTriangleExtractorFont : public FTFont
45{
46 public:
53 FTTriangleExtractorFont(const char* fontFilePath, std::vector<float>& triangles);
54
64 FTTriangleExtractorFont(const unsigned char *pBufferBytes,
65 size_t bufferSizeInBytes, std::vector<float>& triangles);
66
70 ~FTTriangleExtractorFont();
71
72 protected:
82 virtual FTGlyph* MakeGlyph(FT_GlyphSlot slot);
83};
84
85#define FTGLTriangleExtractorFont FTTriangleExtractorFont
86
87#endif //__cplusplus
88
89 FTGL_BEGIN_C_DECLS
90
100 FTGL_EXPORT FTGLfont *ftglCreateTriangleExtractorFont(const char *file);
101
112 FTGL_EXPORT FTGLfont *ftglCreateTriangleExtractorFontFromMem(const unsigned char *bytes,
113 size_t len);
114
115 FTGL_END_C_DECLS
116
117#endif // __FTTriangleExtractorFont__
118
FTGLfont
struct _FTGLfont FTGLfont
Definition FTFont.h:414
ftglCreateTriangleExtractorFont
FTGLfont * ftglCreateTriangleExtractorFont(const char *file)
Create a specialised FTGLfont object for handling tesselated polygon mesh fonts.
ftglCreateTriangleExtractorFontFromMem
FTGLfont * ftglCreateTriangleExtractorFontFromMem(const unsigned char *bytes, size_t len)
Create a specialised FTGLfont object for handling tesselated polygon mesh fonts from a buffer in memo...
FTFont
FTFont is the public interface for the FTGL library.
Definition FTFont.h:57
FTGlyph
FTGlyph is the base class for FTGL glyphs.
Definition FTGlyph.h:51
FTTriangleExtractorFont
FTPolygonFont is a specialisation of the FTFont class for handling tesselated Polygon Mesh fonts.
Definition FTGLTriangleExtractorFont.h:45
FTTriangleExtractorFont::FTTriangleExtractorFont
FTTriangleExtractorFont(const unsigned char *pBufferBytes, size_t bufferSizeInBytes, std::vector< float > &triangles)
Open and read a font from a buffer in memory.
FTTriangleExtractorFont::MakeGlyph
virtual FTGlyph * MakeGlyph(FT_GlyphSlot slot)
Construct a glyph of the correct type.
FTTriangleExtractorFont::~FTTriangleExtractorFont
~FTTriangleExtractorFont()
Destructor.
FTTriangleExtractorFont::FTTriangleExtractorFont
FTTriangleExtractorFont(const char *fontFilePath, std::vector< float > &triangles)
Open and read a font file.
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