public |
Inheritance Graph
graph BT
FontRenderer
click FontRenderer "classUtil_1_1FontRenderer"
Description
Font rendering.
Create a bitmap that contains specific glyphs of a font.
Author: Benjamin Eikel
Date: 2013-07-10
Public Functions
FontRenderer(const std::string & fontFile) Load the font given as parameter. |
|
~FontRenderer() Release the allocated font resources. |
|
Reference < Bitmap > | renderText(unsigned int size, const std::u32string & text) |
std::pair< Reference < Bitmap >, FontInfo > | createGlyphBitmap(unsigned int size, const std::u32string & chars) |
std::map< std::pair< uint32_t, uint32_t >, float > | createKerningMap(const std::u32string & chars) |
Documentation
function
Util::FontRenderer::FontRenderer
public |
FontRenderer( | const std::string & | fontFile ) |
Load the font given as parameter.
Defined in Util/Graphics/FontRenderer.h:63
function
Util::FontRenderer::~FontRenderer
public |
~FontRenderer( | ) |
Release the allocated font resources.
Defined in Util/Graphics/FontRenderer.h:66
function
Util::FontRenderer::renderText
public |
Reference < Bitmap > renderText( | unsigned int | size, |
const std::u32string & | text | |
) |
Render the given text into a bitmap.
Parameters
- size
- Font size in pixels
- text
- Text to render
Returns
Bitmap containing the rendered text
Defined in Util/Graphics/FontRenderer.h:75
function
Util::FontRenderer::createGlyphBitmap
public |
std::pair< Reference < Bitmap >, FontInfo > createGlyphBitmap( | unsigned int | size, |
const std::u32string & | chars | |
) |
Render the given characters into a bitmap. Create a map from the characters to a description of their glyph images inside the bitmap.
Parameters
- size
- Font size in pixels
- chars
- Characters to render
Returns
Bitmap containing the rendered characters and a structure containing metrics of the font together with a mapping from the characters to their glyph information.
Defined in Util/Graphics/FontRenderer.h:87
function
Util::FontRenderer::createKerningMap
public |
std::map< std::pair< uint32_t, uint32_t >, float > createKerningMap( | const std::u32string & | chars ) |
Defined in Util/Graphics/FontRenderer.h:90