Specifically, I'm interested in the width of characters in the default font assuming that the default font is mono-spaced. From reading the documentation, I got the impression that this should give me the correct value:
(aref (font-info (face-font 'default)) 2)
However, these values are consistently too big. For example, my current default font is
-unknown-DejaVu Sans Mono-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1
and the code above gives me 13. However, when I make a screenshot and measure the characters their width is only 8 pixels.
frame-char-widthgives me 8 pixels but if I change the default font size (using
text-scale-increase) it continues to say 8, so that isn't useful.
I'm working with Emacs 184.108.40.206 on Ubuntu 14.04.