Commits

CSBerger committed 8cfc3cc

next attempt at merging by adding inc directory

  • Participants
  • Parent commits 5d40da2

Comments (0)

Files changed (22)

File inc/FTGL/FTBBox.h

+/*
+ * FTGL - OpenGL font library
+ *
+ * Copyright (c) 2001-2004 Henry Maddocks <ftgl@opengl.geek.nz>
+ * Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
+ * Copyright (c) 2008 Sean Morrison <learner@brlcad.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __ftgl__
+#   warning This header is deprecated. Please use <FTGL/ftgl.h> from now.
+#   include <FTGL/ftgl.h>
+#endif
+
+#ifndef __FTBBox__
+#define __FTBBox__
+
+#ifdef __cplusplus
+
+
+/**
+ * FTBBox is a convenience class for handling bounding boxes.
+ */
+class FTGL_EXPORT FTBBox
+{
+    public:
+        /**
+         * Default constructor. Bounding box is set to zero.
+         */
+        FTBBox()
+        :   lower(0.0f, 0.0f, 0.0f),
+            upper(0.0f, 0.0f, 0.0f)
+        {}
+
+        /**
+         * Constructor.
+         */
+        FTBBox(float lx, float ly, float lz, float ux, float uy, float uz)
+        :   lower(lx, ly, lz),
+            upper(ux, uy, uz)
+        {}
+
+        /**
+         * Constructor.
+         */
+        FTBBox(FTPoint l, FTPoint u)
+        :   lower(l),
+            upper(u)
+        {}
+
+        /**
+         * Constructor. Extracts a bounding box from a freetype glyph. Uses
+         * the control box for the glyph. <code>FT_Glyph_Get_CBox()</code>
+         *
+         * @param glyph A freetype glyph
+         */
+        FTBBox(FT_GlyphSlot glyph)
+        :   lower(0.0f, 0.0f, 0.0f),
+            upper(0.0f, 0.0f, 0.0f)
+        {
+            FT_BBox bbox;
+            FT_Outline_Get_CBox(&(glyph->outline), &bbox);
+
+            lower.X(static_cast<float>(bbox.xMin) / 64.0f);
+            lower.Y(static_cast<float>(bbox.yMin) / 64.0f);
+            lower.Z(0.0f);
+            upper.X(static_cast<float>(bbox.xMax) / 64.0f);
+            upper.Y(static_cast<float>(bbox.yMax) / 64.0f);
+            upper.Z(0.0f);
+        }
+
+        /**
+         * Destructor
+         */
+        ~FTBBox()
+        {}
+
+        /**
+         * Mark the bounds invalid by setting all lower dimensions greater
+         * than the upper dimensions.
+         */
+        void Invalidate()
+        {
+            lower = FTPoint(1.0f, 1.0f, 1.0f);
+            upper = FTPoint(-1.0f, -1.0f, -1.0f);
+        }
+
+        /**
+         * Determines if this bounding box is valid.
+         *
+         * @return True if all lower values are <= the corresponding
+         *         upper values.
+         */
+        bool IsValid()
+        {
+            return lower.X() <= upper.X()
+                && lower.Y() <= upper.Y()
+                && lower.Z() <= upper.Z();
+        }
+
+        /**
+         * Move the Bounding Box by a vector.
+         *
+         * @param vector  The vector to move the bbox in 3D space.
+         */
+        FTBBox& operator += (const FTPoint vector)
+        {
+            lower += vector;
+            upper += vector;
+
+            return *this;
+        }
+
+        /**
+         * Combine two bounding boxes. The result is the smallest bounding
+         * box containing the two original boxes.
+         *
+         * @param bbox  The bounding box to merge with the second one.
+         */
+        FTBBox& operator |= (const FTBBox& bbox)
+        {
+            if(bbox.lower.X() < lower.X()) lower.X(bbox.lower.X());
+            if(bbox.lower.Y() < lower.Y()) lower.Y(bbox.lower.Y());
+            if(bbox.lower.Z() < lower.Z()) lower.Z(bbox.lower.Z());
+            if(bbox.upper.X() > upper.X()) upper.X(bbox.upper.X());
+            if(bbox.upper.Y() > upper.Y()) upper.Y(bbox.upper.Y());
+            if(bbox.upper.Z() > upper.Z()) upper.Z(bbox.upper.Z());
+
+            return *this;
+        }
+
+        void SetDepth(float depth)
+        {
+            if(depth > 0)
+                upper.Z(lower.Z() + depth);
+            else
+                lower.Z(upper.Z() + depth);
+        }
+
+
+        inline FTPoint const Upper() const
+        {
+            return upper;
+        }
+
+
+        inline FTPoint const Lower() const
+        {
+            return lower;
+        }
+
+    private:
+        /**
+         * The bounds of the box
+         */
+        FTPoint lower, upper;
+};
+
+#endif //__cplusplus
+
+#endif  //  __FTBBox__
+

File inc/FTGL/FTBitmapGlyph.h

+/*
+ * FTGL - OpenGL font library
+ *
+ * Copyright (c) 2001-2004 Henry Maddocks <ftgl@opengl.geek.nz>
+ * Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
+ * Copyright (c) 2008 Sean Morrison <learner@brlcad.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __ftgl__
+#   warning This header is deprecated. Please use <FTGL/ftgl.h> from now.
+#   include <FTGL/ftgl.h>
+#endif
+
+#ifndef __FTBitmapGlyph__
+#define __FTBitmapGlyph__
+
+#ifdef __cplusplus
+
+
+/**
+ * FTBitmapGlyph is a specialisation of FTGlyph for creating bitmaps.
+ */
+class FTGL_EXPORT FTBitmapGlyph : public FTGlyph
+{
+    public:
+        /**
+         * Constructor
+         *
+         * @param glyph The Freetype glyph to be processed
+         */
+        FTBitmapGlyph(FT_GlyphSlot glyph);
+
+        /**
+         * Destructor
+         */
+        virtual ~FTBitmapGlyph();
+
+        /**
+         * Render this glyph at the current pen position.
+         *
+         * @param pen  The current pen position.
+         * @param renderMode  Render mode to display
+         * @return  The advance distance for this glyph.
+         */
+        virtual const FTPoint& Render(const FTPoint& pen, int renderMode);
+};
+
+#endif //__cplusplus
+
+FTGL_BEGIN_C_DECLS
+
+/**
+ * Create a specialisation of FTGLglyph for creating bitmaps.
+ *
+ * @param glyph The Freetype glyph to be processed
+ * @return  An FTGLglyph* object.
+ */
+FTGL_EXPORT FTGLglyph *ftglCreateBitmapGlyph(FT_GlyphSlot glyph);
+
+FTGL_END_C_DECLS
+
+#endif  //  __FTBitmapGlyph__
+

File inc/FTGL/FTBuffer.h

+/*
+ * FTGL - OpenGL font library
+ *
+ * Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __ftgl__
+#   warning Please use <FTGL/ftgl.h> instead of <FTBuffer.h>.
+#   include <FTGL/ftgl.h>
+#endif
+
+#ifndef __FTBuffer__
+#define __FTBuffer__
+
+#ifdef __cplusplus
+
+/**
+ * FTBuffer is a helper class for pixel buffers.
+ *
+ * It provides the interface between FTBufferFont and FTBufferGlyph to
+ * optimise rendering operations.
+ *
+ * @see FTBufferGlyph
+ * @see FTBufferFont
+ */
+class FTGL_EXPORT FTBuffer
+{
+    public:
+        /**
+         * Default constructor.
+         */
+        FTBuffer();
+
+        /**
+         * Destructor
+         */
+        ~FTBuffer();
+
+        /**
+         * Get the pen's position in the buffer.
+         *
+         * @return  The pen's position as an FTPoint object.
+         */
+        inline FTPoint Pos() const
+        {
+            return pos;
+        }
+
+        /**
+         * Set the pen's position in the buffer.
+         *
+         * @param arg  An FTPoint object with the desired pen's position.
+         */
+        inline void Pos(FTPoint arg)
+        {
+            pos = arg;
+        }
+
+        /**
+         * Set the buffer's size.
+         *
+         * @param w  The buffer's desired width, in pixels.
+         * @param h  The buffer's desired height, in pixels.
+         */
+        void Size(int w, int h);
+
+        /**
+         * Get the buffer's width.
+         *
+         * @return  The buffer's width, in pixels.
+         */
+        inline int Width() const { return width; }
+
+        /**
+         * Get the buffer's height.
+         *
+         * @return  The buffer's height, in pixels.
+         */
+        inline int Height() const { return height; }
+
+        /**
+         * Get the buffer's direct pixel buffer.
+         *
+         * @return  A read-write pointer to the buffer's pixels.
+         */
+        inline unsigned char *Pixels() const { return pixels; }
+
+    private:
+        /**
+         * Buffer's width and height.
+         */
+        int width, height;
+
+        /**
+         * Buffer's pixel buffer.
+         */
+        unsigned char *pixels;
+
+        /**
+         * Buffer's internal pen position.
+         */
+        FTPoint pos;
+};
+
+#endif //__cplusplus
+
+#endif // __FTBuffer__
+

File inc/FTGL/FTBufferFont.h

+/*
+ * FTGL - OpenGL font library
+ *
+ * Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __ftgl__
+#   warning Please use <FTGL/ftgl.h> instead of <FTBufferFont.h>.
+#   include <FTGL/ftgl.h>
+#endif
+
+#ifndef __FTBufferFont__
+#define __FTBufferFont__
+
+#ifdef __cplusplus
+
+
+/**
+ * FTBufferFont is a specialisation of the FTFont class for handling
+ * memory buffer fonts.
+ *
+ * @see     FTFont
+ */
+class FTGL_EXPORT FTBufferFont : public FTFont
+{
+    public:
+        /**
+         * Open and read a font file. Sets Error flag.
+         *
+         * @param fontFilePath  font file path.
+         */
+        FTBufferFont(const char* fontFilePath);
+
+        /**
+         * Open and read a font from a buffer in memory. Sets Error flag.
+         * The buffer is owned by the client and is NOT copied by FTGL. The
+         * pointer must be valid while using FTGL.
+         *
+         * @param pBufferBytes  the in-memory buffer
+         * @param bufferSizeInBytes  the length of the buffer in bytes
+         */
+        FTBufferFont(const unsigned char *pBufferBytes,
+                     size_t bufferSizeInBytes);
+
+        /**
+         * Destructor
+         */
+        ~FTBufferFont();
+
+    protected:
+        /**
+         * Construct a glyph of the correct type.
+         *
+         * Clients must override the function and return their specialised
+         * FTGlyph.
+         *
+         * @param slot  A FreeType glyph slot.
+         * @return  An FT****Glyph or <code>null</code> on failure.
+         */
+        virtual FTGlyph* MakeGlyph(FT_GlyphSlot slot);
+};
+
+#endif //__cplusplus
+
+FTGL_BEGIN_C_DECLS
+
+/**
+ * Create a specialised FTGLfont object for handling memory buffer fonts.
+ *
+ * @param file  The font file name.
+ * @return  An FTGLfont* object.
+ *
+ * @see  FTGLfont
+ */
+FTGL_EXPORT FTGLfont *ftglCreateBufferFont(const char *file);
+
+FTGL_END_C_DECLS
+
+#endif  //  __FTBufferFont__
+

File inc/FTGL/FTBufferGlyph.h

+/*
+ * FTGL - OpenGL font library
+ *
+ * Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __ftgl__
+#   warning Please use <FTGL/ftgl.h> instead of <FTBufferGlyph.h>.
+#   include <FTGL/ftgl.h>
+#endif
+
+#ifndef __FTBufferGlyph__
+#define __FTBufferGlyph__
+
+#ifdef __cplusplus
+
+
+/**
+ * FTBufferGlyph is a specialisation of FTGlyph for memory buffer rendering.
+ */
+class FTGL_EXPORT FTBufferGlyph : public FTGlyph
+{
+    public:
+        /**
+         * Constructor
+         *
+         * @param glyph The Freetype glyph to be processed
+         * @param buffer  An FTBuffer object in which to render the glyph.
+         */
+        FTBufferGlyph(FT_GlyphSlot glyph, FTBuffer *buffer);
+
+        /**
+         * Destructor
+         */
+        virtual ~FTBufferGlyph();
+
+        /**
+         * Render this glyph at the current pen position.
+         *
+         * @param pen  The current pen position.
+         * @param renderMode  Render mode to display
+         * @return  The advance distance for this glyph.
+         */
+        virtual const FTPoint& Render(const FTPoint& pen, int renderMode);
+};
+
+#endif //__cplusplus
+
+#endif  //  __FTBufferGlyph__
+

File inc/FTGL/FTExtrdGlyph.h

+/*
+ * FTGL - OpenGL font library
+ *
+ * Copyright (c) 2001-2004 Henry Maddocks <ftgl@opengl.geek.nz>
+ * Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
+ * Copyright (c) 2008 Sean Morrison <learner@brlcad.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __ftgl__
+#   warning This header is deprecated. Please use <FTGL/ftgl.h> from now.
+#   include <FTGL/ftgl.h>
+#endif
+
+#ifndef __FTExtrudeGlyph__
+#define __FTExtrudeGlyph__
+
+#ifdef __cplusplus
+
+
+/**
+ * FTExtrudeGlyph is a specialisation of FTGlyph for creating tessellated
+ * extruded polygon glyphs.
+ */
+class FTGL_EXPORT FTExtrudeGlyph : public FTGlyph
+{
+    public:
+        /**
+         * Constructor. Sets the Error to Invalid_Outline if the glyph isn't
+         * an outline.
+         *
+         * @param glyph The Freetype glyph to be processed
+         * @param depth The distance along the z axis to extrude the glyph
+         * @param frontOutset outset contour size
+         * @param backOutset outset contour size
+         * @param useDisplayList Enable or disable the use of Display Lists
+         *                       for this glyph
+         *                       <code>true</code> turns ON display lists.
+         *                       <code>false</code> turns OFF display lists.
+         */
+        FTExtrudeGlyph(FT_GlyphSlot glyph, float depth, float frontOutset,
+                       float backOutset, bool useDisplayList);
+
+        /**
+         * Destructor
+         */
+        virtual ~FTExtrudeGlyph();
+
+        /**
+         * Render this glyph at the current pen position.
+         *
+         * @param pen  The current pen position.
+         * @param renderMode  Render mode to display
+         * @return  The advance distance for this glyph.
+         */
+        virtual const FTPoint& Render(const FTPoint& pen, int renderMode);
+};
+
+#define FTExtrdGlyph FTExtrudeGlyph
+
+#endif //__cplusplus
+
+FTGL_BEGIN_C_DECLS
+
+/**
+ * Create a specialisation of FTGLglyph for creating tessellated
+ * extruded polygon glyphs.
+ *
+ * @param glyph The Freetype glyph to be processed
+ * @param depth The distance along the z axis to extrude the glyph
+ * @param frontOutset outset contour size
+ * @param backOutset outset contour size
+ * @param useDisplayList Enable or disable the use of Display Lists
+ *                       for this glyph
+ *                       <code>true</code> turns ON display lists.
+ *                       <code>false</code> turns OFF display lists.
+ * @return  An FTGLglyph* object.
+ */
+FTGL_EXPORT FTGLglyph *ftglCreateExtrudeGlyph(FT_GlyphSlot glyph, float depth,
+                                float frontOutset, float backOutset,
+                                int useDisplayList);
+
+FTGL_END_C_DECLS
+
+#endif  //  __FTExtrudeGlyph__
+

File inc/FTGL/FTFont.h

+/*
+ * FTGL - OpenGL font library
+ *
+ * Copyright (c) 2001-2004 Henry Maddocks <ftgl@opengl.geek.nz>
+ * Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
+ * Copyright (c) 2008 Sean Morrison <learner@brlcad.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __ftgl__
+#   warning This header is deprecated. Please use <FTGL/ftgl.h> from now.
+#   include <FTGL/ftgl.h>
+#endif
+
+#ifndef __FTFont__
+#define __FTFont__
+
+#ifdef __cplusplus
+
+class FTFontImpl;
+
+/**
+ * FTFont is the public interface for the FTGL library.
+ *
+ * Specific font classes are derived from this class. It uses the helper
+ * classes FTFace and FTSize to access the Freetype library. This class
+ * is abstract and deriving classes must implement the protected
+ * <code>MakeGlyph</code> function to create glyphs of the
+ * appropriate type.
+ *
+ * It is good practice after using these functions to test the error
+ * code returned. <code>FT_Error Error()</code>. Check the freetype file
+ * fterrdef.h for error definitions.
+ *
+ * @see     FTFace
+ * @see     FTSize
+ */
+class FTGL_EXPORT FTFont
+{
+    protected:
+        /**
+         * Open and read a font file. Sets Error flag.
+         *
+         * @param fontFilePath  font file path.
+         */
+        FTFont(char const *fontFilePath);
+
+        /**
+         * Open and read a font from a buffer in memory. Sets Error flag.
+         * The buffer is owned by the client and is NOT copied by FTGL. The
+         * pointer must be valid while using FTGL.
+         *
+         * @param pBufferBytes  the in-memory buffer
+         * @param bufferSizeInBytes  the length of the buffer in bytes
+         */
+        FTFont(const unsigned char *pBufferBytes, size_t bufferSizeInBytes);
+
+    private:
+        /* Allow our internal subclasses to access the private constructor */
+        friend class FTBitmapFont;
+        friend class FTBufferFont;
+        friend class FTExtrudeFont;
+        friend class FTOutlineFont;
+        friend class FTPixmapFont;
+        friend class FTPolygonFont;
+        friend class FTTextureFont;
+
+        /**
+         * Internal FTGL FTFont constructor. For private use only.
+         *
+         * @param pImpl  Internal implementation object. Will be destroyed
+         *               upon FTFont deletion.
+         */
+        FTFont(FTFontImpl *pImpl);
+
+    public:
+        virtual ~FTFont();
+
+        /**
+         * Attach auxilliary file to font e.g font metrics.
+         *
+         * Note: not all font formats implement this function.
+         *
+         * @param fontFilePath  auxilliary font file path.
+         * @return          <code>true</code> if file has been attached
+         *                  successfully.
+         */
+        virtual bool Attach(const char* fontFilePath);
+
+        /**
+         * Attach auxilliary data to font e.g font metrics, from memory.
+         *
+         * Note: not all font formats implement this function.
+         *
+         * @param pBufferBytes  the in-memory buffer.
+         * @param bufferSizeInBytes  the length of the buffer in bytes.
+         * @return          <code>true</code> if file has been attached
+         *                  successfully.
+         */
+        virtual bool Attach(const unsigned char *pBufferBytes,
+                            size_t bufferSizeInBytes);
+
+        /**
+         * 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.
+         *
+         * @param flags  The glyph loading flags.
+         */
+        virtual void GlyphLoadFlags(FT_Int flags);
+
+        /**
+         * Set the character map for the face.
+         *
+         * @param encoding      Freetype enumerate for char map code.
+         * @return              <code>true</code> if charmap was valid and
+         *                      set correctly.
+         */
+        virtual bool CharMap(FT_Encoding encoding);
+
+        /**
+         * Get the number of character maps in this face.
+         *
+         * @return character map count.
+         */
+        virtual unsigned int CharMapCount() const;
+
+        /**
+         * Get a list of character maps in this face.
+         *
+         * @return pointer to the first encoding.
+         */
+        virtual FT_Encoding* CharMapList();
+
+        /**
+         * Set the char size for the current face.
+         *
+         * @param size      the face size in points (1/72 inch)
+         * @param res       the resolution of the target device.
+         * @return          <code>true</code> if size was set correctly
+         */
+        virtual bool FaceSize(const unsigned int size,
+                              const unsigned int res = 72);
+
+        /**
+         * Get the current face size in points (1/72 inch).
+         *
+         * @return face size
+         */
+        virtual unsigned int FaceSize() const;
+
+        /**
+         * Set the extrusion distance for the font. Only implemented by
+         * FTExtrudeFont
+         *
+         * @param depth  The extrusion distance.
+         */
+        virtual void Depth(float depth);
+
+        /**
+         * Set the outset distance for the font. Only implemented by
+         * FTOutlineFont, FTPolygonFont and FTExtrudeFont
+         *
+         * @param outset  The outset distance.
+         */
+        virtual void Outset(float outset);
+
+        /**
+         * Set the front and back outset distances for the font. Only
+         * implemented by FTExtrudeFont
+         *
+         * @param front  The front outset distance.
+         * @param back   The back outset distance.
+         */
+        virtual void Outset(float front, float back);
+
+        /**
+         * Enable or disable the use of Display Lists inside FTGL
+         *
+         * @param  useList <code>true</code> turns ON display lists.
+         *                 <code>false</code> turns OFF display lists.
+         */
+        virtual void UseDisplayList(bool useList);
+
+        /**
+         * Get the global ascender height for the face.
+         *
+         * @return  Ascender height
+         */
+        virtual float Ascender() const;
+
+        /**
+         * Gets the global descender height for the face.
+         *
+         * @return  Descender height
+         */
+        virtual float Descender() const;
+
+        /**
+         * Gets the line spacing for the font.
+         *
+         * @return  Line height
+         */
+        virtual float LineHeight() const;
+
+        /**
+         * Get the bounding box for a string.
+         *
+         * @param string  A char buffer.
+         * @param len  The length of the string. If < 0 then all characters
+         *             will be checked until a null character is encountered
+         *             (optional).
+         * @param position  The pen position of the first character (optional).
+         * @param spacing  A displacement vector to add after each character
+         *                 has been checked (optional).
+         * @return  The corresponding bounding box.
+         */
+        virtual FTBBox BBox(const char *string, const int len = -1,
+                            FTPoint position = FTPoint(),
+                            FTPoint spacing = FTPoint());
+
+        /**
+         * Get the bounding box for a string (deprecated).
+         *
+         * @param string  A char buffer.
+         * @param llx  Lower left near x coordinate.
+         * @param lly  Lower left near y coordinate.
+         * @param llz  Lower left near z coordinate.
+         * @param urx  Upper right far x coordinate.
+         * @param ury  Upper right far y coordinate.
+         * @param urz  Upper right far z coordinate.
+         */
+        void BBox(const char* string, float& llx, float& lly, float& llz,
+                  float& urx, float& ury, float& urz)
+        {
+            FTBBox b = BBox(string);
+            llx = b.Lower().Xf(); lly = b.Lower().Yf(); llz = b.Lower().Zf();
+            urx = b.Upper().Xf(); ury = b.Upper().Yf(); urz = b.Upper().Zf();
+        }
+
+        /**
+         * Get the bounding box for a string.
+         *
+         * @param string  A wchar_t buffer.
+         * @param len  The length of the string. If < 0 then all characters
+         *             will be checked until a null character is encountered
+         *             (optional).
+         * @param position  The pen position of the first character (optional).
+         * @param spacing  A displacement vector to add after each character
+         *                 has been checked (optional).
+         * @return  The corresponding bounding box.
+         */
+        virtual FTBBox BBox(const wchar_t *string, const int len = -1,
+                            FTPoint position = FTPoint(),
+                            FTPoint spacing = FTPoint());
+
+        /**
+         * Get the bounding box for a string (deprecated).
+         *
+         * @param string  A wchar_t buffer.
+         * @param llx  Lower left near x coordinate.
+         * @param lly  Lower left near y coordinate.
+         * @param llz  Lower left near z coordinate.
+         * @param urx  Upper right far x coordinate.
+         * @param ury  Upper right far y coordinate.
+         * @param urz  Upper right far z coordinate.
+         */
+        void BBox(const wchar_t* string, float& llx, float& lly, float& llz,
+                  float& urx, float& ury, float& urz)
+        {
+            FTBBox b = BBox(string);
+            llx = b.Lower().Xf(); lly = b.Lower().Yf(); llz = b.Lower().Zf();
+            urx = b.Upper().Xf(); ury = b.Upper().Yf(); urz = b.Upper().Zf();
+        }
+
+        /**
+         * Get the advance for a string.
+         *
+         * @param string  'C' style string to be checked.
+         * @param len  The length of the string. If < 0 then all characters
+         *             will be checked until a null character is encountered
+         *             (optional).
+         * @param spacing  A displacement vector to add after each character
+         *                 has been checked (optional).
+         * @return  The string's advance width.
+         */
+        virtual float Advance(const char* string, const int len = -1,
+                              FTPoint spacing = FTPoint());
+
+        /**
+         * Get the advance for a string.
+         *
+         * @param string  A wchar_t string
+         * @param len  The length of the string. If < 0 then all characters
+         *             will be checked until a null character is encountered
+         *             (optional).
+         * @param spacing  A displacement vector to add after each character
+         *                 has been checked (optional).
+         * @return  The string's advance width.
+         */
+        virtual float Advance(const wchar_t* string, const int len = -1,
+                              FTPoint spacing = FTPoint());
+
+        /**
+         * Render a string of characters.
+         *
+         * @param string  'C' style string to be output.
+         * @param len  The length of the string. If < 0 then all characters
+         *             will be displayed until a null character is encountered
+         *             (optional).
+         * @param position  The pen position of the first character (optional).
+         * @param spacing  A displacement vector to add after each character
+         *                 has been displayed (optional).
+         * @param renderMode  Render mode to use for display (optional).
+         * @return  The new pen position after the last character was output.
+         */
+        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
+         *
+         * @param string    wchar_t string to be output.
+         * @param len  The length of the string. If < 0 then all characters
+         *             will be displayed until a null character is encountered
+         *             (optional).
+         * @param position  The pen position of the first character (optional).
+         * @param spacing  A displacement vector to add after each character
+         *                 has been displayed (optional).
+         * @param renderMode  Render mode to use for display (optional).
+         * @return  The new pen position after the last character was output.
+         */
+        virtual FTPoint Render(const wchar_t *string, const int len = -1,
+                               FTPoint position = FTPoint(),
+                               FTPoint spacing = FTPoint(),
+                               int renderMode = FTGL::RENDER_ALL);
+
+        /**
+         * Queries the Font for errors.
+         *
+         * @return  The current error code.
+         */
+        virtual FT_Error Error() const;
+
+    protected:
+        /* Allow impl to access MakeGlyph */
+        friend class FTFontImpl;
+
+        /**
+         * Construct a glyph of the correct type.
+         *
+         * Clients must override the function and return their specialised
+         * FTGlyph.
+         *
+         * @param slot  A FreeType glyph slot.
+         * @return  An FT****Glyph or <code>null</code> on failure.
+         */
+        virtual FTGlyph* MakeGlyph(FT_GlyphSlot slot) = 0;
+
+    private:
+        /**
+         * Internal FTGL FTFont implementation object. For private use only.
+         */
+        FTFontImpl *impl;
+};
+
+#endif //__cplusplus
+
+FTGL_BEGIN_C_DECLS
+
+/**
+ * FTGLfont is the public interface for the FTGL library.
+ *
+ * It is good practice after using these functions to test the error
+ * code returned. <code>FT_Error Error()</code>. Check the freetype file
+ * fterrdef.h for error definitions.
+ */
+struct _FTGLFont;
+typedef struct _FTGLfont FTGLfont;
+
+/**
+ * Create a custom FTGL font object.
+ *
+ * @param fontFilePath  The font file name.
+ * @param data  A pointer to private data that will be passed to callbacks.
+ * @param makeglyphCallback  A glyph-making callback function.
+ * @return  An FTGLfont* object.
+ */
+FTGL_EXPORT FTGLfont *ftglCreateCustomFont(char const *fontFilePath,
+                                           void *data,
+                   FTGLglyph * (*makeglyphCallback) (FT_GlyphSlot, void *));
+
+/**
+ * Destroy an FTGL font object.
+ *
+ * @param font  An FTGLfont* object.
+ */
+FTGL_EXPORT void ftglDestroyFont(FTGLfont* font);
+
+/**
+ * Attach auxilliary file to font e.g. font metrics.
+ *
+ * Note: not all font formats implement this function.
+ *
+ * @param font  An FTGLfont* object.
+ * @param path  Auxilliary font file path.
+ * @return  1 if file has been attached successfully.
+ */
+FTGL_EXPORT int ftglAttachFile(FTGLfont* font, const char* path);
+
+/**
+ * Attach auxilliary data to font, e.g. font metrics, from memory.
+ *
+ * Note: not all font formats implement this function.
+ *
+ * @param font  An FTGLfont* object.
+ * @param data  The in-memory buffer.
+ * @param size  The length of the buffer in bytes.
+ * @return  1 if file has been attached successfully.
+ */
+FTGL_EXPORT int ftglAttachData(FTGLfont* font, const unsigned char * data,
+                               size_t size);
+
+/**
+ * Set the character map for the face.
+ *
+ * @param font  An FTGLfont* object.
+ * @param encoding  Freetype enumerate for char map code.
+ * @return  1 if charmap was valid and set correctly.
+ */
+FTGL_EXPORT int ftglSetFontCharMap(FTGLfont* font, FT_Encoding encoding);
+
+/**
+ * Get the number of character maps in this face.
+ *
+ * @param font  An FTGLfont* object.
+ * @return character map count.
+ */
+FTGL_EXPORT unsigned int ftglGetFontCharMapCount(FTGLfont* font);
+
+/**
+ * Get a list of character maps in this face.
+ *
+ * @param font  An FTGLfont* object.
+ * @return pointer to the first encoding.
+ */
+FTGL_EXPORT FT_Encoding* ftglGetFontCharMapList(FTGLfont* font);
+
+/**
+ * Set the char size for the current face.
+ *
+ * @param font  An FTGLfont* object.
+ * @param size  The face size in points (1/72 inch).
+ * @param res  The resolution of the target device, or 0 to use the default
+ *             value of 72.
+ * @return  1 if size was set correctly.
+ */
+FTGL_EXPORT int ftglSetFontFaceSize(FTGLfont* font, unsigned int size,
+                                    unsigned int res);
+
+/**
+ * Get the current face size in points (1/72 inch).
+ *
+ * @param font  An FTGLfont* object.
+ * @return face size
+ */
+FTGL_EXPORT unsigned int ftglGetFontFaceSize(FTGLfont* font);
+
+/**
+ * Set the extrusion distance for the font. Only implemented by
+ * FTExtrudeFont.
+ *
+ * @param font  An FTGLfont* object.
+ * @param depth  The extrusion distance.
+ */
+FTGL_EXPORT void ftglSetFontDepth(FTGLfont* font, float depth);
+
+/**
+ * Set the outset distance for the font. Only FTOutlineFont, FTPolygonFont
+ * and FTExtrudeFont implement front outset. Only FTExtrudeFont implements
+ * back outset.
+ *
+ * @param font  An FTGLfont* object.
+ * @param front  The front outset distance.
+ * @param back  The back outset distance.
+ */
+FTGL_EXPORT void ftglSetFontOutset(FTGLfont* font, float front, float back);
+
+/**
+ * Enable or disable the use of Display Lists inside FTGL.
+ *
+ * @param font  An FTGLfont* object.
+ * @param useList  1 turns ON display lists.
+ *                 0 turns OFF display lists.
+ */
+FTGL_EXPORT void ftglSetFontDisplayList(FTGLfont* font, int useList);
+
+/**
+ * Get the global ascender height for the face.
+ *
+ * @param font  An FTGLfont* object.
+ * @return  Ascender height
+ */
+FTGL_EXPORT float ftglGetFontAscender(FTGLfont* font);
+
+/**
+ * Gets the global descender height for the face.
+ *
+ * @param font  An FTGLfont* object.
+ * @return  Descender height
+ */
+FTGL_EXPORT float ftglGetFontDescender(FTGLfont* font);
+
+/**
+ * Gets the line spacing for the font.
+ *
+ * @param font  An FTGLfont* object.
+ * @return  Line height
+ */
+FTGL_EXPORT float ftglGetFontLineHeight(FTGLfont* font);
+
+/**
+ * Get the bounding box for a string.
+ *
+ * @param font  An FTGLfont* object.
+ * @param string  A char buffer
+ * @param len  The length of the string. If < 0 then all characters will be
+ *             checked until a null character is encountered (optional).
+ * @param bounds  An array of 6 float values where the bounding box's lower
+ *                left near and upper right far 3D coordinates will be stored.
+ */
+FTGL_EXPORT void ftglGetFontBBox(FTGLfont* font, const char *string,
+                                 int len, float bounds[6]);
+
+/**
+ * Get the advance width for a string.
+ *
+ * @param font  An FTGLfont* object.
+ * @param string  A char string.
+ * @return  Advance width
+ */
+FTGL_EXPORT float ftglGetFontAdvance(FTGLfont* font, const char *string);
+
+/**
+ * Render a string of characters.
+ *
+ * @param font  An FTGLfont* object.
+ * @param string  Char string to be output.
+ * @param mode  Render mode to display.
+ */
+FTGL_EXPORT void ftglRenderFont(FTGLfont* font, const char *string, int mode);
+
+/**
+ * Query a font for errors.
+ *
+ * @param font  An FTGLfont* object.
+ * @return  The current error code.
+ */
+FTGL_EXPORT FT_Error ftglGetFontError(FTGLfont* font);
+
+FTGL_END_C_DECLS
+
+#endif  //  __FTFont__
+

File inc/FTGL/FTGLBitmapFont.h

+/*
+ * FTGL - OpenGL font library
+ *
+ * Copyright (c) 2001-2004 Henry Maddocks <ftgl@opengl.geek.nz>
+ * Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
+ * Copyright (c) 2008 Sean Morrison <learner@brlcad.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __ftgl__
+#   warning This header is deprecated. Please use <FTGL/ftgl.h> from now.
+#   include <FTGL/ftgl.h>
+#endif
+
+#ifndef __FTBitmapFont__
+#define __FTBitmapFont__
+
+#ifdef __cplusplus
+
+
+/**
+ * FTBitmapFont is a specialisation of the FTFont class for handling
+ * Bitmap fonts
+ *
+ * @see     FTFont
+ */
+class FTGL_EXPORT FTBitmapFont : public FTFont
+{
+    public:
+        /**
+         * Open and read a font file. Sets Error flag.
+         *
+         * @param fontFilePath  font file path.
+         */
+        FTBitmapFont(const char* fontFilePath);
+
+        /**
+         * Open and read a font from a buffer in memory. Sets Error flag.
+         * The buffer is owned by the client and is NOT copied by FTGL. The
+         * pointer must be valid while using FTGL.
+         *
+         * @param pBufferBytes  the in-memory buffer
+         * @param bufferSizeInBytes  the length of the buffer in bytes
+         */
+        FTBitmapFont(const unsigned char *pBufferBytes,
+                     size_t bufferSizeInBytes);
+
+        /**
+         * Destructor
+         */
+        ~FTBitmapFont();
+
+    protected:
+        /**
+         * Construct a glyph of the correct type.
+         *
+         * Clients must override the function and return their specialised
+         * FTGlyph.
+         *
+         * @param slot  A FreeType glyph slot.
+         * @return  An FT****Glyph or <code>null</code> on failure.
+         */
+        virtual FTGlyph* MakeGlyph(FT_GlyphSlot slot);
+};
+
+#define FTGLBitmapFont FTBitmapFont
+
+#endif //__cplusplus
+
+FTGL_BEGIN_C_DECLS
+
+/**
+ * Create a specialised FTGLfont object for handling bitmap fonts.
+ *
+ * @param file  The font file name.
+ * @return  An FTGLfont* object.
+ *
+ * @see  FTGLfont
+ */
+FTGL_EXPORT FTGLfont *ftglCreateBitmapFont(const char *file);
+
+FTGL_END_C_DECLS
+
+#endif  //  __FTBitmapFont__
+

File inc/FTGL/FTGLExtrdFont.h

+/*
+ * FTGL - OpenGL font library
+ *
+ * Copyright (c) 2001-2004 Henry Maddocks <ftgl@opengl.geek.nz>
+ * Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
+ * Copyright (c) 2008 Sean Morrison <learner@brlcad.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __ftgl__
+#   warning This header is deprecated. Please use <FTGL/ftgl.h> from now.
+#   include <FTGL/ftgl.h>
+#endif
+
+#ifndef __FTExtrudeFont__
+#define __FTExtrudeFont__
+
+#ifdef __cplusplus
+
+
+/**
+ * FTExtrudeFont is a specialisation of the FTFont class for handling
+ * extruded Polygon fonts
+ *
+ * @see FTFont
+ * @see FTPolygonFont
+ */
+class FTGL_EXPORT FTExtrudeFont : public FTFont
+{
+    public:
+        /**
+         * Open and read a font file. Sets Error flag.
+         *
+         * @param fontFilePath  font file path.
+         */
+        FTExtrudeFont(const char* fontFilePath);
+
+        /**
+         * Open and read a font from a buffer in memory. Sets Error flag.
+         * The buffer is owned by the client and is NOT copied by FTGL. The
+         * pointer must be valid while using FTGL.
+         *
+         * @param pBufferBytes  the in-memory buffer
+         * @param bufferSizeInBytes  the length of the buffer in bytes
+         */
+        FTExtrudeFont(const unsigned char *pBufferBytes,
+                      size_t bufferSizeInBytes);
+
+        /**
+         * Destructor
+         */
+        ~FTExtrudeFont();
+
+    protected:
+        /**
+         * Construct a glyph of the correct type.
+         *
+         * Clients must override the function and return their specialised
+         * FTGlyph.
+         *
+         * @param slot  A FreeType glyph slot.
+         * @return  An FT****Glyph or <code>null</code> on failure.
+         */
+        virtual FTGlyph* MakeGlyph(FT_GlyphSlot slot);
+};
+
+#define FTGLExtrdFont FTExtrudeFont
+
+#endif //__cplusplus
+
+FTGL_BEGIN_C_DECLS
+
+/**
+ * Create a specialised FTGLfont object for handling extruded poygon fonts.
+ *
+ * @param file  The font file name.
+ * @return  An FTGLfont* object.
+ *
+ * @see  FTGLfont
+ * @see  ftglCreatePolygonFont
+ */
+FTGL_EXPORT FTGLfont *ftglCreateExtrudeFont(const char *file);
+
+FTGL_END_C_DECLS
+
+#endif // __FTExtrudeFont__
+

File inc/FTGL/FTGLOutlineFont.h

+/*
+ * FTGL - OpenGL font library
+ *
+ * Copyright (c) 2001-2004 Henry Maddocks <ftgl@opengl.geek.nz>
+ * Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
+ * Copyright (c) 2008 Sean Morrison <learner@brlcad.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __ftgl__
+#   warning This header is deprecated. Please use <FTGL/ftgl.h> from now.
+#   include <FTGL/ftgl.h>
+#endif
+
+#ifndef __FTOutlineFont__
+#define __FTOutlineFont__
+
+#ifdef __cplusplus
+
+
+/**
+ * FTOutlineFont is a specialisation of the FTFont class for handling
+ * Vector Outline fonts
+ *
+ * @see     FTFont
+ */
+class FTGL_EXPORT FTOutlineFont : public FTFont
+{
+    public:
+        /**
+         * Open and read a font file. Sets Error flag.
+         *
+         * @param fontFilePath  font file path.
+         */
+        FTOutlineFont(const char* fontFilePath);
+
+        /**
+         * Open and read a font from a buffer in memory. Sets Error flag.
+         * The buffer is owned by the client and is NOT copied by FTGL. The
+         * pointer must be valid while using FTGL.
+         *
+         * @param pBufferBytes  the in-memory buffer
+         * @param bufferSizeInBytes  the length of the buffer in bytes
+         */
+        FTOutlineFont(const unsigned char *pBufferBytes,
+                      size_t bufferSizeInBytes);
+
+        /**
+         * Destructor
+         */
+        ~FTOutlineFont();
+
+    protected:
+        /**
+         * Construct a glyph of the correct type.
+         *
+         * Clients must override the function and return their specialised
+         * FTGlyph.
+         *
+         * @param slot  A FreeType glyph slot.
+         * @return  An FT****Glyph or <code>null</code> on failure.
+         */
+        virtual FTGlyph* MakeGlyph(FT_GlyphSlot slot);
+};
+
+#define FTGLOutlineFont FTOutlineFont
+
+#endif //__cplusplus
+
+FTGL_BEGIN_C_DECLS
+
+/**
+ * Create a specialised FTGLfont object for handling vector outline fonts.
+ *
+ * @param file  The font file name.
+ * @return  An FTGLfont* object.
+ *
+ * @see  FTGLfont
+ */
+FTGL_EXPORT FTGLfont *ftglCreateOutlineFont(const char *file);
+
+FTGL_END_C_DECLS
+
+#endif // __FTOutlineFont__
+

File inc/FTGL/FTGLPixmapFont.h

+/*
+ * FTGL - OpenGL font library
+ *
+ * Copyright (c) 2001-2004 Henry Maddocks <ftgl@opengl.geek.nz>
+ * Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
+ * Copyright (c) 2008 Sean Morrison <learner@brlcad.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __ftgl__
+#   warning This header is deprecated. Please use <FTGL/ftgl.h> from now.
+#   include <FTGL/ftgl.h>
+#endif
+
+#ifndef __FTPixmapFont__
+#define __FTPixmapFont__
+
+#ifdef __cplusplus
+
+
+/**
+ * FTPixmapFont is a specialisation of the FTFont class for handling
+ * Pixmap (Grey Scale) fonts
+ *
+ * @see     FTFont
+ */
+class FTGL_EXPORT FTPixmapFont : public FTFont
+{
+    public:
+        /**
+         * Open and read a font file. Sets Error flag.
+         *
+         * @param fontFilePath  font file path.
+         */
+        FTPixmapFont(const char* fontFilePath);
+
+        /**
+         * Open and read a font from a buffer in memory. Sets Error flag.
+         * The buffer is owned by the client and is NOT copied by FTGL. The
+         * pointer must be valid while using FTGL.
+         *
+         * @param pBufferBytes  the in-memory buffer
+         * @param bufferSizeInBytes  the length of the buffer in bytes
+         */
+        FTPixmapFont(const unsigned char *pBufferBytes,
+                     size_t bufferSizeInBytes);
+
+        /**
+         * Destructor
+         */
+        ~FTPixmapFont();
+
+    protected:
+        /**
+         * Construct a glyph of the correct type.
+         *
+         * Clients must override the function and return their specialised
+         * FTGlyph.
+         *
+         * @param slot  A FreeType glyph slot.
+         * @return  An FT****Glyph or <code>null</code> on failure.
+         */
+        virtual FTGlyph* MakeGlyph(FT_GlyphSlot slot);
+};
+
+#define FTGLPixmapFont FTPixmapFont
+
+#endif // __cplusplus
+
+FTGL_BEGIN_C_DECLS
+
+/**
+ * Create a specialised FTGLfont object for handling pixmap (grey scale) fonts.
+ *
+ * @param file  The font file name.
+ * @return  An FTGLfont* object.
+ *
+ * @see  FTGLfont
+ */
+FTGL_EXPORT FTGLfont *ftglCreatePixmapFont(const char *file);
+
+FTGL_END_C_DECLS
+
+#endif  //  __FTPixmapFont__
+

File inc/FTGL/FTGLPolygonFont.h

+/*
+ * FTGL - OpenGL font library
+ *
+ * Copyright (c) 2001-2004 Henry Maddocks <ftgl@opengl.geek.nz>
+ * Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
+ * Copyright (c) 2008 Sean Morrison <learner@brlcad.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __ftgl__
+#   warning This header is deprecated. Please use <FTGL/ftgl.h> from now.
+#   include <FTGL/ftgl.h>
+#endif
+
+#ifndef __FTPolygonFont__
+#define __FTPolygonFont__
+
+#ifdef __cplusplus
+
+
+/**
+ * FTPolygonFont is a specialisation of the FTFont class for handling
+ * tesselated Polygon Mesh fonts
+ *
+ * @see     FTFont
+ */
+class FTGL_EXPORT FTPolygonFont : public FTFont
+{
+    public:
+        /**
+         * Open and read a font file. Sets Error flag.
+         *
+         * @param fontFilePath  font file path.
+         */
+        FTPolygonFont(const char* fontFilePath);
+
+        /**
+         * Open and read a font from a buffer in memory. Sets Error flag.
+         * The buffer is owned by the client and is NOT copied by FTGL. The
+         * pointer must be valid while using FTGL.
+         *
+         * @param pBufferBytes  the in-memory buffer
+         * @param bufferSizeInBytes  the length of the buffer in bytes
+         */
+        FTPolygonFont(const unsigned char *pBufferBytes,
+                      size_t bufferSizeInBytes);
+
+        /**
+         * Destructor
+         */
+        ~FTPolygonFont();
+
+    protected:
+        /**
+         * Construct a glyph of the correct type.
+         *
+         * Clients must override the function and return their specialised
+         * FTGlyph.
+         *
+         * @param slot  A FreeType glyph slot.
+         * @return  An FT****Glyph or <code>null</code> on failure.
+         */
+        virtual FTGlyph* MakeGlyph(FT_GlyphSlot slot);
+};
+
+#define FTGLPolygonFont FTPolygonFont
+
+#endif //__cplusplus
+
+FTGL_BEGIN_C_DECLS
+
+/**
+ * Create a specialised FTGLfont object for handling tesselated polygon
+ * mesh fonts.
+ *
+ * @param file  The font file name.
+ * @return  An FTGLfont* object.
+ *
+ * @see  FTGLfont
+ */
+FTGL_EXPORT FTGLfont *ftglCreatePolygonFont(const char *file);
+
+FTGL_END_C_DECLS
+
+#endif  //  __FTPolygonFont__
+

File inc/FTGL/FTGLTextureFont.h

+/*
+ * FTGL - OpenGL font library
+ *
+ * Copyright (c) 2001-2004 Henry Maddocks <ftgl@opengl.geek.nz>
+ * Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
+ * Copyright (c) 2008 Sean Morrison <learner@brlcad.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __ftgl__
+#   warning This header is deprecated. Please use <FTGL/ftgl.h> from now.
+#   include <FTGL/ftgl.h>
+#endif
+
+#ifndef __FTTextureFont__
+#define __FTTextureFont__
+
+#ifdef __cplusplus
+
+
+/**
+ * FTTextureFont is a specialisation of the FTFont class for handling
+ * Texture mapped fonts
+ *
+ * @see     FTFont
+ */
+class  FTGL_EXPORT FTTextureFont : public FTFont
+{
+    public:
+        /**
+         * Open and read a font file. Sets Error flag.
+         *
+         * @param fontFilePath  font file path.
+         */
+        FTTextureFont(const char* fontFilePath);
+
+        /**
+         * Open and read a font from a buffer in memory. Sets Error flag.
+         * The buffer is owned by the client and is NOT copied by FTGL. The
+         * pointer must be valid while using FTGL.
+         *
+         * @param pBufferBytes  the in-memory buffer
+         * @param bufferSizeInBytes  the length of the buffer in bytes
+         */
+        FTTextureFont(const unsigned char *pBufferBytes,
+                      size_t bufferSizeInBytes);
+
+        /**
+         * Destructor
+         */
+        virtual ~FTTextureFont();
+
+    protected:
+        /**
+         * Construct a glyph of the correct type.
+         *
+         * Clients must override the function and return their specialised
+         * FTGlyph.
+         *
+         * @param slot  A FreeType glyph slot.
+         * @return  An FT****Glyph or <code>null</code> on failure.
+         */
+        virtual FTGlyph* MakeGlyph(FT_GlyphSlot slot);
+};
+
+#define FTGLTextureFont FTTextureFont
+
+#endif //__cplusplus
+
+FTGL_BEGIN_C_DECLS
+
+/**
+ * Create a specialised FTGLfont object for handling texture-mapped fonts.
+ *
+ * @param file  The font file name.
+ * @return  An FTGLfont* object.
+ *
+ * @see  FTGLfont
+ */
+FTGL_EXPORT FTGLfont *ftglCreateTextureFont(const char *file);
+
+FTGL_END_C_DECLS
+
+#endif // __FTTextureFont__
+

File inc/FTGL/FTGlyph.h

+/*
+ * FTGL - OpenGL font library
+ *
+ * Copyright (c) 2001-2004 Henry Maddocks <ftgl@opengl.geek.nz>
+ * Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
+ * Copyright (c) 2008 Sean Morrison <learner@brlcad.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __ftgl__
+#   warning This header is deprecated. Please use <FTGL/ftgl.h> from now.
+#   include <FTGL/ftgl.h>
+#endif
+
+#ifndef __FTGlyph__
+#define __FTGlyph__
+
+#ifdef __cplusplus
+
+class FTGlyphImpl;
+
+/**
+ * FTGlyph is the base class for FTGL glyphs.
+ *
+ * It provides the interface between Freetype glyphs and their openGL
+ * renderable counterparts. This is an abstract class and derived classes
+ * must implement the <code>Render</code> function.
+ *
+ * @see FTBBox
+ * @see FTPoint
+ */
+class FTGL_EXPORT FTGlyph
+{
+    protected:
+        /**
+         * Create a glyph.
+         *
+         * @param glyph  The Freetype glyph to be processed
+         */
+        FTGlyph(FT_GlyphSlot glyph);
+
+    private:
+        /**
+         * Internal FTGL FTGlyph constructor. For private use only.
+         *
+         * @param pImpl  Internal implementation object. Will be destroyed
+         *               upon FTGlyph deletion.
+         */
+        FTGlyph(FTGlyphImpl *pImpl);
+
+        /* Allow our internal subclasses to access the private constructor */
+        friend class FTBitmapGlyph;
+        friend class FTBufferGlyph;
+        friend class FTExtrudeGlyph;
+        friend class FTOutlineGlyph;
+        friend class FTPixmapGlyph;
+        friend class FTPolygonGlyph;
+        friend class FTTextureGlyph;
+
+    public:
+        /**
+          * Destructor
+          */
+        virtual ~FTGlyph();
+
+        /**
+         * Renders this glyph at the current pen position.
+         *
+         * @param pen  The current pen position.
+         * @param renderMode  Render mode to display
+         * @return  The advance distance for this glyph.
+         */
+        virtual const FTPoint& Render(const FTPoint& pen, int renderMode) = 0;
+
+        /**
+         * Return the advance width for this glyph.
+         *
+         * @return  advance width.
+         */
+        virtual float Advance() const;
+
+        /**
+         * Return the bounding box for this glyph.
+         *
+         * @return  bounding box.
+         */
+        virtual const FTBBox& BBox() const;
+
+        /**
+         * Queries for errors.
+         *
+         * @return  The current error code.
+         */
+        virtual FT_Error Error() const;
+
+    private:
+        /**
+         * Internal FTGL FTGlyph implementation object. For private use only.
+         */
+        FTGlyphImpl *impl;
+};
+
+#endif //__cplusplus
+
+FTGL_BEGIN_C_DECLS
+
+/**
+ * FTGLglyph is the base class for FTGL glyphs.
+ *
+ * It provides the interface between Freetype glyphs and their openGL
+ * renderable counterparts. This is an abstract class and derived classes
+ * must implement the ftglRenderGlyph() function.
+ */
+struct _FTGLGlyph;
+typedef struct _FTGLglyph FTGLglyph;
+
+/**
+ * Create a custom FTGL glyph object.
+ * FIXME: maybe get rid of "base" and have advanceCallback etc. functions
+ *
+ * @param base  The base FTGLglyph* to subclass.
+ * @param data  A pointer to private data that will be passed to callbacks.
+ * @param renderCallback  A rendering callback function.
+ * @param destroyCallback  A callback function to be called upon destruction.
+ * @return  An FTGLglyph* object.
+ */
+FTGL_EXPORT FTGLglyph *ftglCreateCustomGlyph(FTGLglyph *base, void *data,
+    void (*renderCallback) (FTGLglyph *, void *, FTGL_DOUBLE, FTGL_DOUBLE,
+                             int, FTGL_DOUBLE *, FTGL_DOUBLE *),
+    void (*destroyCallback) (FTGLglyph *, void *));
+
+/**
+ * Destroy an FTGL glyph object.
+ *
+ * @param glyph  An FTGLglyph* object.
+ */
+FTGL_EXPORT void ftglDestroyGlyph(FTGLglyph *glyph);
+
+/**
+ * Render a glyph at the current pen position and compute the corresponding
+ * advance.
+ *
+ * @param glyph  An FTGLglyph* object.
+ * @param penx  The current pen's X position.
+ * @param peny  The current pen's Y position.
+ * @param renderMode  Render mode to display
+ * @param advancex  A pointer to an FTGL_DOUBLE where to write the advance's X
+ *                  component.
+ * @param advancey  A pointer to an FTGL_DOUBLE where to write the advance's Y
+ *                  component.
+ */
+FTGL_EXPORT void ftglRenderGlyph(FTGLglyph *glyph, FTGL_DOUBLE penx,
+                                 FTGL_DOUBLE peny, int renderMode,
+                                 FTGL_DOUBLE *advancex, FTGL_DOUBLE *advancey);
+/**
+ * Return the advance for a glyph.
+ *
+ * @param glyph  An FTGLglyph* object.
+ * @return  The advance's X component.
+ */
+FTGL_EXPORT float ftglGetGlyphAdvance(FTGLglyph *glyph);
+
+/**
+ * Return the bounding box for a glyph.
+ *
+ * @param glyph  An FTGLglyph* object.
+ * @param bounds  An array of 6 float values where the bounding box's lower
+ *                left near and upper right far 3D coordinates will be stored.
+ */
+FTGL_EXPORT void ftglGetGlyphBBox(FTGLglyph *glyph, float bounds[6]);
+
+/**
+ * Query a glyph for errors.
+ *
+ * @param glyph  An FTGLglyph* object.
+ * @return  The current error code.
+ */
+FTGL_EXPORT FT_Error ftglGetGlyphError(FTGLglyph* glyph);
+
+FTGL_END_C_DECLS
+
+#endif  //  __FTGlyph__
+

File inc/FTGL/FTLayout.h

+/*
+ * FTGL - OpenGL font library
+ *
+ * Copyright (c) 2001-2004 Henry Maddocks <ftgl@opengl.geek.nz>
+ * Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
+ * Copyright (c) 2008 Sean Morrison <learner@brlcad.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __ftgl__
+#   warning This header is deprecated. Please use <FTGL/ftgl.h> from now.
+#   include <FTGL/ftgl.h>
<