CoriEngine
Loading...
Searching...
No Matches
Cori::Graphics::Font::Descriptor Class Reference

Font Descriptor meant to be used with AssetManager only. More...

#include <Font.hpp>

Classes

struct  Hasher

Public Types

using AssetType = Font

Public Member Functions

constexpr Descriptor (std::string name, std::filesystem::path fontPath, std::vector< CharsetRange > charsetRanges, const float minimalScale=48.0f, const float miterLimit=1.0f)
 Constructs a descriptor.
uint32_t GetRuntimeID () const
constexpr bool operator== (const Descriptor &other) const

Public Attributes

const std::string m_Name
const std::filesystem::path m_FontPath
const std::vector< CharsetRangem_CharsetRanges
const float m_MinimalScale
const float m_MiterLimit

Detailed Description

Font Descriptor meant to be used with AssetManager only.

Definition at line 42 of file Font.hpp.

Member Typedef Documentation

◆ AssetType

Definition at line 61 of file Font.hpp.

Constructor & Destructor Documentation

◆ Descriptor()

Cori::Graphics::Font::Descriptor::Descriptor ( std::string name,
std::filesystem::path fontPath,
std::vector< CharsetRange > charsetRanges,
const float minimalScale = 48.0f,
const float miterLimit = 1.0f )
inlineconstexpr

Constructs a descriptor.

Parameters
nameName to be used in AssetManager logging.
fontPathPath to the font file.
charsetRangesAn vector with CharsetRanges to be loaded from the font.
minimalScaleMinimal 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.
miterLimitYou shouldn't touch this, the default is good, but you can try to increase it in case you see some significant artifacts.

Definition at line 52 of file Font.hpp.

Member Function Documentation

◆ GetRuntimeID()

uint32_t Cori::Graphics::Font::Descriptor::GetRuntimeID ( ) const
inlinenodiscard

Definition at line 63 of file Font.hpp.

◆ operator==()

bool Cori::Graphics::Font::Descriptor::operator== ( const Descriptor & other) const
inlineconstexpr

Definition at line 65 of file Font.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ m_CharsetRanges

const std::vector<CharsetRange> Cori::Graphics::Font::Descriptor::m_CharsetRanges

Definition at line 77 of file Font.hpp.

◆ m_FontPath

const std::filesystem::path Cori::Graphics::Font::Descriptor::m_FontPath

Definition at line 76 of file Font.hpp.

◆ m_MinimalScale

const float Cori::Graphics::Font::Descriptor::m_MinimalScale

Definition at line 78 of file Font.hpp.

◆ m_MiterLimit

const float Cori::Graphics::Font::Descriptor::m_MiterLimit

Definition at line 79 of file Font.hpp.

◆ m_Name

const std::string Cori::Graphics::Font::Descriptor::m_Name

Definition at line 75 of file Font.hpp.


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