30 lines
541 B
C++
30 lines
541 B
C++
#pragma once
|
|
#include <map>
|
|
#include <SDL_stdinc.h>
|
|
|
|
class FontFace {
|
|
public:
|
|
FontFace(const char* filename_ttf);
|
|
void RenderGlyph(int chr);
|
|
void RenderString(const char* str);
|
|
void RenderMarkup(const char* str);
|
|
|
|
/* Of Ms. */
|
|
float GetHeight(void) { return m_height; }
|
|
float GetWidth(void) { return m_width; }
|
|
|
|
private:
|
|
float m_height;
|
|
float m_width;
|
|
|
|
struct glfglyph_t {
|
|
float* varray;
|
|
Uint16* iarray;
|
|
int numidx;
|
|
float advx, advy;
|
|
};
|
|
std::map<int, glfglyph_t> m_glyphs;
|
|
};
|
|
void GLFTInit(void);
|
|
|