# Khaotic Engine Reborn: enginecustom/src/inc/system/font_class.h Source File

Loading...
Searching...
No Matches
font_class.h
#ifndef _FONTCLASS_H_
#define _FONTCLASS_H_
// INCLUDES //
#include <directxmath.h>
#include <fstream>
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
font_class
Definition font_class.h:23
texture_class
Definition texture_class.h:17