JMGraphics
Loading...
Searching...
No Matches
JMGraphics::Font Class Reference

object that loads and stores a font. More...

#include <JMGraphics.h>

Public Member Functions

 Font (JMGraphics *parentObject)
 the parent object must be the graphics object that the font will be used in.
 Font (const Font &)=delete
Fontoperator= (const Font &)=delete
 Font (Font &&)=default
Fontoperator= (Font &&)=default
bool load (std::string FilePath, int size)
 loads the font from a file and generates image textures for each character at the specified size.
glm::vec2 render (Shader *shader, std::string text, float x, float y, float scale, bool leftJust)
 renderes the font to the window. Use JMGraphics.setFont, then JMGraphics.text() insdead whenever possible. Only use this if you have created a custom shader program.

Public Attributes

JMGraphicsparent = nullptr

Detailed Description

object that loads and stores a font.


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