I\'ve seen some posts and answers about how to get the terminal size in numbers of columns and rows. Can I get the terminal size, or equivalently, the size of the font used
The data structure that stores terminal info in linux is terminfo. This is the structure that any general terminal query would be reading from. It does not contain pixel information, since that is not relevant for the text-only terminals it was designed to specify.
If you're running the code in an X compatible terminal, it is probably possible with control codes, but that would very likely not be portable.