Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
aegis2d::render::GlyphGrid Struct Reference

Layout of a font's atlas: a grid of cells holding consecutive characters. More...

#include <aegis2d/render/bitmap_font.hpp>

Public Attributes

int atlas_width = 0
 Width of the atlas, in pixels.
 
int atlas_height = 0
 Height of the atlas, in pixels.
 
int columns = 16
 Cells per row of the atlas.
 
int cell_width = 0
 Width of a cell, in pixels.
 
int cell_height = 0
 Height of a cell, in pixels.
 
int glyph_width = 0
 Width of the drawn part of a cell, in pixels.
 
int glyph_height = 0
 Height of the drawn part of a cell, in pixels.
 
int advance = 0
 Distance from one character to the next on a line, in pixels.
 
int line_height = 0
 Distance from one line to the next, in pixels.
 
char first = ' '
 Character of the first cell.
 
char last = '~'
 Character of the last cell.
 
char fallback = '?'
 Character drawn for those the font does not have.
 

Detailed Description

Layout of a font's atlas: a grid of cells holding consecutive characters.

Cell i (row by row from the top left) holds the character first + i; its glyph is the glyph_width x glyph_height pixels at the top left of the cell.

Member Data Documentation

◆ advance

int aegis2d::render::GlyphGrid::advance = 0

Distance from one character to the next on a line, in pixels.

◆ atlas_height

int aegis2d::render::GlyphGrid::atlas_height = 0

Height of the atlas, in pixels.

◆ atlas_width

int aegis2d::render::GlyphGrid::atlas_width = 0

Width of the atlas, in pixels.

◆ cell_height

int aegis2d::render::GlyphGrid::cell_height = 0

Height of a cell, in pixels.

◆ cell_width

int aegis2d::render::GlyphGrid::cell_width = 0

Width of a cell, in pixels.

◆ columns

int aegis2d::render::GlyphGrid::columns = 16

Cells per row of the atlas.

◆ fallback

char aegis2d::render::GlyphGrid::fallback = '?'

Character drawn for those the font does not have.

◆ first

char aegis2d::render::GlyphGrid::first = ' '

Character of the first cell.

◆ glyph_height

int aegis2d::render::GlyphGrid::glyph_height = 0

Height of the drawn part of a cell, in pixels.

◆ glyph_width

int aegis2d::render::GlyphGrid::glyph_width = 0

Width of the drawn part of a cell, in pixels.

◆ last

char aegis2d::render::GlyphGrid::last = '~'

Character of the last cell.

◆ line_height

int aegis2d::render::GlyphGrid::line_height = 0

Distance from one line to the next, in pixels.


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