cangine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
cangine::Font Struct Reference

A loaded font face plus its cache of rasterized glyphs. More...

#include <text_renderer.hpp>

Public Member Functions

 Font (FT_Face f, int h, const std::string &p)
 Constructs a font wrapper around a FreeType face.
 

Public Attributes

FT_Face face
 Underlying FreeType face handle.
 
std::unordered_map< uint32_t, Character > glyphs
 Cache of glyphs keyed by codepoint.
 
int height
 Pixel height the face is set to.
 
std::string path
 Path the font was loaded from.
 

Detailed Description

A loaded font face plus its cache of rasterized glyphs.

Constructor & Destructor Documentation

◆ Font()

cangine::Font::Font ( FT_Face  f,
int  h,
const std::string &  p 
)
inline

Constructs a font wrapper around a FreeType face.

Parameters
fFreeType face handle.
hPixel height the face is set to.
pPath the font was loaded from.

Member Data Documentation

◆ face

FT_Face cangine::Font::face

Underlying FreeType face handle.

◆ glyphs

std::unordered_map<uint32_t, Character> cangine::Font::glyphs

Cache of glyphs keyed by codepoint.

◆ height

int cangine::Font::height

Pixel height the face is set to.

◆ path

std::string cangine::Font::path

Path the font was loaded from.


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