/*********************************************************************
*                                                                    *          
*                              FLY                                   *
*                           --E#Y#E--				     *
*                         ===MUSCLE===                               *
*                                                                    *
*********************************************************************/
#ifndef FONT_H
#define FONT_H

/* CPP Header Files */
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <fstream>
#include <iostream>
#include <vector>
#include <cmath>
#include <cassert>
#include <limits>
/* OpenGL Header */
#include <GL/glew.h>
#include <GL/gl.h>
#include <GL/glx.h>
#include <GL/glu.h>
#include <GL/glext.h>
#include <GL/glxext.h>
/* Header Files */
#include "../TEX/targa.h"
#include "../TEX/texture.h"
#include "../CONF/config.h"
#include "../CONF/uniform.h"
#include "../CONF/geometry.h"

//---------------------------------------------------------------------------

/* Standard */
using namespace std;

using std::vector;
using std::string;
using std::ifstream;
using std::map;

//---------------------------------------------------------------------

/* Class Font */
class TMFONT 
{
public:
        /* Mono Font */
        bool TMFont(const char* textureName, int screenWidth, int screenHeight, float fontSize);
        void MipmapsImage(const GLint count, int side3, GLubyte *pixel);
        bool initFont();
        void printString(const char* str, float mx, float my);

private:          
        /* Buffer */
        GLuint w_texCoords5[EV];
        GLuint w_vertices5[EV];
        GLuint m_textureID;
        
        /* Texture Name */
        const char* m_textureName;
        float m_fontSize;
        int m_Width;
        int m_Height;
        
        /* Ortho Mode */
	void setOrthoMode();
	void unsetOrthoMode();
};

//---------------------------------------------------------------------------

#endif

