|
JMGraphics
|
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 | |
| Font & | operator= (const Font &)=delete |
| Font (Font &&)=default | |
| Font & | operator= (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 | |
| JMGraphics * | parent = nullptr |
object that loads and stores a font.