I am working on an ncurses application that creates some very blocky graphics using alphanum characters. I'd like to be able to detect the dimensions (specifically the aspect ratio) of the font glyphs so that I can correct for it by changing how I render my graphics (such that a square always looks like a square).
I am able to use the
void getmaxyx(WINDOW *win, int y, int x);
function in ncurses to get the size of the screen/window, but since many windows can be freely resized, it, it's not reliable. Is there a similar function (or external mechanism) for retrieving the font dimensions?