jGL
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
jGL::Font Class Reference

#include <font.h>

Inheritance diagram for jGL::Font:
Inheritance graph
[legend]

Public Member Functions

 Font (uint8_t w)
 
virtual ~Font ()
 
const glm::ivec2 getBitmapSize () const
 
std::array< glm::vec4, 6 > getGlyphVertices (float x, float y, float scale, unsigned char c)
 
glm::vec4 getGlyphOffset (unsigned char c)
 
glm::ivec2 getGlyphSize (unsigned char c)
 
float spacing (float scale)
 
void bind (unsigned int b)
 

Protected Attributes

uint8_t width
 
std::map< unsigned char, Glyphglyphs
 
std::map< unsigned char, glm::vec4 > glyphOffset
 
std::shared_ptr< TexturefontBitmap
 
std::vector< std::byte > bitmapPixels
 
uint16_t bw
 
uint16_t bh
 

Constructor & Destructor Documentation

◆ Font()

jGL::Font::Font ( uint8_t  w)

◆ ~Font()

virtual jGL::Font::~Font ( )
inlinevirtual

Member Function Documentation

◆ bind()

void jGL::Font::bind ( unsigned int  b)
inline

◆ getBitmapSize()

const glm::ivec2 jGL::Font::getBitmapSize ( ) const
inline

◆ getGlyphOffset()

glm::vec4 jGL::Font::getGlyphOffset ( unsigned char  c)
inline

◆ getGlyphSize()

glm::ivec2 jGL::Font::getGlyphSize ( unsigned char  c)
inline

◆ getGlyphVertices()

std::array< glm::vec4, 6 > jGL::Font::getGlyphVertices ( float  x,
float  y,
float  scale,
unsigned char  c 
)

◆ spacing()

float jGL::Font::spacing ( float  scale)
inline

Member Data Documentation

◆ bh

uint16_t jGL::Font::bh
protected

◆ bitmapPixels

std::vector<std::byte> jGL::Font::bitmapPixels
protected

◆ bw

uint16_t jGL::Font::bw
protected

◆ fontBitmap

std::shared_ptr<Texture> jGL::Font::fontBitmap
protected

◆ glyphOffset

std::map<unsigned char, glm::vec4> jGL::Font::glyphOffset
protected

◆ glyphs

std::map<unsigned char, Glyph> jGL::Font::glyphs
protected

◆ width

uint8_t jGL::Font::width
protected

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