5#include <J3ML/LinearAlgebra.hpp>
11extern "C" typedef struct FT_FaceRec_*
FT_Face;
26 Font(
const std::filesystem::path& path);
29 static Font LoadTTF(
const std::filesystem::path& filepath);
35 Vector2
MeasureString(
const std::string& text,
unsigned int ptSize);
struct FT_FaceRec_ * FT_Face
Defines external C references to FreeType Data Structures.
Definition: Font.h:11
struct FT_LibraryRec_ * FT_Library
Definition: Font.h:12
A Font class implementation.
Definition: Font.h:22
FT_Face face
Definition: Font.h:38
static std::vector< Font > GetLoadedFonts()
Definition: Font.cpp:90
Vector2 MeasureString(const std::string &text, unsigned int ptSize)
Returns the bounding-box the given string would occupy at the given point-size, assuming normal (1) s...
Definition: Font.cpp:100
static Font LoadTTF(const std::filesystem::path &filepath)
Definition: Font.cpp:95
int index
Definition: Font.h:37
~Font()
Destructor handles freeing of the underlying asset handle.
Definition: Font.cpp:85
Font()=default
Default constructor does not initialize any members.
OpenGL Wrapper for rendering 2D & 3D graphics in both a 2D and 3D context.
Definition: JGL.h:31
bool InitTextEngine()
Initializes FreeType engine. Remember to call this during program initialization.
Definition: Font.cpp:58