Gorgon Game Engine
Font.cpp File Reference
Include dependency graph for Font.cpp:

Namespaces

 Gorgon
 Root namespace for Gorgon Game Engine.
 
 Gorgon::Graphics
 Contains generic 2D graphics related data structures and functions.
 
 Gorgon::Graphics::internal
 Functions inside this namespace is designed for internal use, however, they might be used externally and will not have any impact on inner workings of the system.
 

Typedefs

using markvecit = std::vector< glyphmark >::iterator
 

Functions

void boundedlayout (const GlyphRenderer &renderer, std::string::const_iterator begin, std::string::const_iterator end, int width, std::function< bool(Glyph, markvecit, markvecit, int, int)> doline, std::function< int(Glyph, Glyph)> spacing, std::function< int(Glyph)> advance, std::function< void(int &)> dotab)
 
void boundedprint (const GlyphRenderer &renderer, std::string::const_iterator begin, std::string::const_iterator end, int width, std::function< void(Glyph, markvecit, markvecit, int)> doline, std::function< int(Glyph, Glyph)> spacing, std::function< int(Glyph)> advance, std::function< void(int &)> dotab)
 
Glyph decode (std::string::const_iterator &it, std::string::const_iterator end)
 Decodes a utf-8 character from the given iterator. More...
 
float defaultspace (Glyph g, const GlyphRenderer &renderer)
 
template<class T_ >
void dodefaulttab (T_ s, T_ &x, T_ w)
 
bool isadjustablespace (Glyph g)
 
bool isbreaking (Glyph g)
 
bool isnewline (Glyph g)
 
bool isspace (Glyph g)
 
bool isspaced (Glyph g)
 
void simplelayout (const GlyphRenderer &renderer, std::string::const_iterator begin, std::string::const_iterator end, std::function< int(Glyph, Glyph)> spacing, std::function< int(Glyph)> advance, std::function< bool(Glyph, int, float)> process, std::function< void()> dotab, std::function< void(Glyph)> donewline)
 helps with the simple layouts, decodes and executes unicode instructions. More...
 
void simpleprint (const GlyphRenderer &renderer, std::string::const_iterator begin, std::string::const_iterator end, std::function< int(Glyph, Glyph)> spacing, std::function< int(Glyph)> advance, std::function< void(Glyph, int, float)> render, std::function< void()> dotab, std::function< void(Glyph)> donewline)
 helps with the simple layouts, decodes and executes unicode instructions. More...