OpenRaider  0.1.4-dev
Open Source Tomb Raider Game Engine implementation
Static Public Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
FontTTF Class Reference

#include <FontTTF.h>

Collaboration diagram for FontTTF:
[legend]

Static Public Member Functions

static int initialize (std::string f)
 
static void shutdown ()
 
static unsigned int widthText (float scale, std::string s)
 
static unsigned int heightText (float scale, unsigned int maxWidth, std::string s)
 
static void drawText (unsigned int x, unsigned int y, float scale, glm::vec4 color, std::string s)
 
static void drawTextWrapped (unsigned int x, unsigned int y, float scale, glm::vec4 color, unsigned int maxWidth, std::string s)
 

Static Private Member Functions

static int charIsMapped (int c)
 
static int getQuad (int c, float *xpos, float *ypos, stbtt_aligned_quad *quad)
 
static void drawTextInternal (unsigned int x, unsigned int y, float scale, glm::vec4 color, unsigned int maxWidth, std::string s, bool drawWrapped)
 

Static Private Attributes

static unsigned char * fontData = nullptr
 
static std::vector< FontMapTTFmaps
 
static ShaderBuffer vertexBuffer
 
static ShaderBuffer uvBuffer
 

Detailed Description

Definition at line 34 of file FontTTF.h.

Member Function Documentation

int FontTTF::initialize ( std::string  f)
static

Definition at line 100 of file FontTTF.cpp.

void FontTTF::shutdown ( )
static

Definition at line 138 of file FontTTF.cpp.

unsigned int FontTTF::widthText ( float  scale,
std::string  s 
)
static

Definition at line 147 of file FontTTF.cpp.

unsigned int FontTTF::heightText ( float  scale,
unsigned int  maxWidth,
std::string  s 
)
static

Definition at line 165 of file FontTTF.cpp.

void FontTTF::drawText ( unsigned int  x,
unsigned int  y,
float  scale,
glm::vec4  color,
std::string  s 
)
static

Definition at line 160 of file FontTTF.cpp.

void FontTTF::drawTextWrapped ( unsigned int  x,
unsigned int  y,
float  scale,
glm::vec4  color,
unsigned int  maxWidth,
std::string  s 
)
static

Definition at line 182 of file FontTTF.cpp.

int FontTTF::charIsMapped ( int  c)
staticprivate

Definition at line 245 of file FontTTF.cpp.

int FontTTF::getQuad ( int  c,
float *  xpos,
float *  ypos,
stbtt_aligned_quad quad 
)
staticprivate
FIXME:
This has nothing to do with proper UTF8 support...

Definition at line 268 of file FontTTF.cpp.

void FontTTF::drawTextInternal ( unsigned int  x,
unsigned int  y,
float  scale,
glm::vec4  color,
unsigned int  maxWidth,
std::string  s,
bool  drawWrapped 
)
staticprivate

Definition at line 187 of file FontTTF.cpp.

Member Data Documentation

unsigned char * FontTTF::fontData = nullptr
staticprivate

Definition at line 54 of file FontTTF.h.

std::vector< FontMapTTF > FontTTF::maps
staticprivate

Definition at line 55 of file FontTTF.h.

ShaderBuffer FontTTF::vertexBuffer
staticprivate

Definition at line 56 of file FontTTF.h.

ShaderBuffer FontTTF::uvBuffer
staticprivate

Definition at line 57 of file FontTTF.h.


The documentation for this class was generated from the following files: