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?
konsole
?xterm
? Something else?getmaxyx
). The font size could be larger or smaller, but it doesn't affect the display, only the lines and columns do. If you resize the window, the font will remain the same, but the number of lines and columns change so you'll need to redraw your graphics anyway.