Contains all Cogs related functionality.
std::string fontFamily
Font family name, such as "Arial" or "Tahoma".
bool operator==(const FontDefinition &other) const noexcept=default
Compares font definitions.
float fontSize
Size of the font in pixels.
Defines a quad with locations in screen space defined by [x0, y0] and [x1, y1].
Defines a single character from a font resource.
Font resources are used to render text with a specific font and size.
bool sdf
If the font is generated as a distance field.
float ascent
Font ascent given in pixels.
Font()=default
Default construct a new Font resource.
std::vector< uint8_t > bitmap
Bitmap font data storage.
std::vector< Character > characters
Contains all available characters in the font, defining their locations in the cached bitmap.
Font & operator=(Font &&other) noexcept=default
Move assign Font from other.
TextureHandle texture
Handle to the texture used to hold the bitmap font data.
float size
Desired font size given in pixels.
Font(Font &&other) noexcept=default
Move construct Font from other.
float descent
Font descent given in pixels.
int bitmapSize
Bitmap font size in pixels. The font cache bitmap will be bitmapSize * bitmapSize * 4 bytes.
Base class for engine resources.
static const ResourceHandle_t NoHandle
Handle representing a default (or none if default not present) resource.