That appears to be two questions:
- how to start
urxvt, making it automatically select an appropriate fontsize provided that urxvt uses 80 columns, and - how to keep
urxvt using 80 columns (and automatically adjusting the fontsize) as one resizes its window.
X applications may ask for a given window size, but the window manager tells the application which size it will use. Terminal emulators usually ask for window sizes which are multiples (rows) of the font height, and (columns) of the font width. Doing that makes it possible for the window manager to cooperate (a little...) when resizing the window, as well as providing visual feedback for the rows-and-columns layout.
When urxvt is using a TrueType font, it can (in principle) use any scaled size. When it opens a font, it obtains the height and width of a character cell from that. You could use the same values along with the screensize and compute an appropriate scale to ask for, to keep the window no wider than 80 columns.
But the hard part is that if the window manager disagrees, it will change that request, possibly changing both the window's height and width. Either dimension could be increased or decreased independently of the other. In a tiling window manager, you cannot even assume that the window is allowed to shrink to maintain a suitable aspect ratio. The end result is that urxvt gets a window size, and then has to decide how to chop it up into character cells.
The window manager's initial layout changes are usually detected by the terminal emulator, which passes this on to the (possibly not yet started) shell as a window size change event SIGWINCH.
Likewise, window resizing after startup is passed on as SIGWINCH.
Given that, you could write an application in the shell which catches SIGWINCH and modifies the font size used by urxvt (which may then ask the window manager for a better layout).
This is doable, but out-of-the-box, urxvt provides no direct way to do it. It would require some scripting/programming:
extend dynamic colors control sequences to allow users to determine the colors and font which are currently active.
which refers to this feature documented in XTerm Control Sequences:
If a "?" is given rather than a name or RGB specification, xterm replies with a control sequence of the same form which can be used to set the corresponding dynamic color. Because more than one pair of color number and specification can be given in one control sequence, xterm can make more than one reply.
and
Ps = 5 0 -> Set Font to Pt.
So an application could do
printf '\033]50;?\007'
and get back the current font — up to 250 characters, at any rate (see the source code)
- after making suitable calculations, your application could update the font (same control sequence).
Oddly, in a quick check the copy of urxvt (Debian 7) does not work for the test-script in xterm for the feature. But if the feature could be made to work for you, that's the means by which you could implement automatic font rescaling.
urxvtrequests a certain window size based on your default font size, and your tiling WM ignores it.stty columns 80?