Font asset to be used when rendering text. Pretty expensive to create if not cached, always preload it.
More...
#include <Font.hpp>
|
| static std::shared_ptr< Font > | Create (const std::filesystem::path &path, const std::vector< CharsetRange > &charsets, const float minimalScale=48.0f, const float miterLimit=1.0f) |
| | Creates a Font object.
|
Font asset to be used when rendering text. Pretty expensive to create if not cached, always preload it.
Definition at line 15 of file Font.hpp.
◆ Font()
| Cori::Graphics::Font::Font |
( |
| ) |
|
◆ ~Font()
| Cori::Graphics::Font::~Font |
( |
| ) |
|
◆ Create()
| std::shared_ptr< Font > Cori::Graphics::Font::Create |
( |
const std::filesystem::path & | path, |
|
|
const std::vector< CharsetRange > & | charsets, |
|
|
const float | minimalScale = 48.0f, |
|
|
const float | miterLimit = 1.0f ) |
|
staticnodiscard |
Creates a Font object.
- Parameters
-
| path | Path to the font file. |
| charsets | An vector with CharsetRanges to be loaded from the font. |
| minimalScale | Minimal glyph scale, the higher the value, the slower generation time, higher memory usage, but smoother glyphs when using high font size. Default is a good middle-ground, increase only if your glyphs looks choppy or have slight imperfections. |
| miterLimit | You shouldn't touch this, the default is good, but you can try to increase it in case you see some significant artifacts. |
- Returns
- Shared pointer to the loaded Font asset.
Definition at line 9 of file Font.cpp.
◆ GetStatus()
◆ Renderer2D
The documentation for this class was generated from the following files: