|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
#include <BitmapFont.hpp>
Classes | |
| struct | TextMetrics |
Public Member Functions | |
| bool | loadFromFntText (const std::string &content, const std::string &basePath, resource::ResourceManager &rm) |
| bool | loadFromFntText (const std::string &content, resource::TextureHandle texture, u32 texWidth, u32 texHeight) |
| void | createLabelAtlas (resource::TextureHandle texture, u32 texWidth, u32 texHeight, const std::string &chars, u32 charWidth, u32 charHeight) |
| TextMetrics | measureText (const std::string &text, f32 fontSize, f32 spacing) const |
| const Glyph * | getGlyph (u32 charCode) const |
| f32 | getKerning (u32 first, u32 second) const |
| resource::TextureHandle | getTexture () const |
| f32 | getLineHeight () const |
| f32 | getBase () const |
| u32 | getTexWidth () const |
| u32 | getTexHeight () const |
Definition at line 25 of file BitmapFont.hpp.
| void esengine::text::BitmapFont::createLabelAtlas | ( | resource::TextureHandle | texture, |
| u32 | texWidth, | ||
| u32 | texHeight, | ||
| const std::string & | chars, | ||
| u32 | charWidth, | ||
| u32 | charHeight ) |
Definition at line 128 of file BitmapFont.cpp.
References ES_LOG_ERROR, esengine::text::Glyph::height, esengine::text::Glyph::id, esengine::text::nextCodepoint(), esengine::text::Glyph::page, esengine::text::Glyph::width, esengine::text::Glyph::x, esengine::text::Glyph::xAdvance, esengine::text::Glyph::xOffset, esengine::text::Glyph::y, and esengine::text::Glyph::yOffset.
|
inline |
Definition at line 51 of file BitmapFont.hpp.
Definition at line 190 of file BitmapFont.cpp.
Referenced by measureText().
Definition at line 195 of file BitmapFont.cpp.
Referenced by measureText().
|
inline |
Definition at line 50 of file BitmapFont.hpp.
|
inline |
Definition at line 53 of file BitmapFont.hpp.
|
inline |
Definition at line 49 of file BitmapFont.hpp.
|
inline |
Definition at line 52 of file BitmapFont.hpp.
| bool esengine::text::BitmapFont::loadFromFntText | ( | const std::string & | content, |
| const std::string & | basePath, | ||
| resource::ResourceManager & | rm ) |
Definition at line 84 of file BitmapFont.cpp.
References ES_LOG_ERROR, esengine::resource::ResourceManager::getTexture(), and esengine::resource::ResourceManager::loadTexture().
| bool esengine::text::BitmapFont::loadFromFntText | ( | const std::string & | content, |
| resource::TextureHandle | texture, | ||
| u32 | texWidth, | ||
| u32 | texHeight ) |
Definition at line 114 of file BitmapFont.cpp.
References ES_LOG_ERROR.
| BitmapFont::TextMetrics esengine::text::BitmapFont::measureText | ( | const std::string & | text, |
| f32 | fontSize, | ||
| f32 | spacing ) const |
Definition at line 170 of file BitmapFont.cpp.
References getGlyph(), getKerning(), and esengine::text::nextCodepoint().