#ifndef _FONTCLASS_H_ #define _FONTCLASS_H_ ////////////// // INCLUDES // ////////////// #include #include #include "macro.h" using namespace DirectX; /////////////////////// // MY CLASS INCLUDES // /////////////////////// #include "texture_class.h" //////////////////////////////////////////////////////////////////////////////// // Class name: font_class //////////////////////////////////////////////////////////////////////////////// class font_class { private: struct FontType { float left, right; int size; }; struct VertexType { XMFLOAT3 position; XMFLOAT2 texture; }; public: font_class(); font_class(const font_class&); ~font_class(); bool Initialize(ID3D11Device*, ID3D11DeviceContext*, int); void Shutdown(); ID3D11ShaderResourceView* GetTexture(); void BuildVertexArray(void*, char*, float, float); int GetSentencePixelLength(char*); int GetFontHeight(); private: bool LoadFontData(char*); void ReleaseFontData(); bool LoadTexture(ID3D11Device*, ID3D11DeviceContext*, char*); void ReleaseTexture(); private: FontType* m_Font; texture_class* m_Texture; float m_fontHeight; int m_spaceSize; }; #endif