On a system with VGA graphics, like a VirtualBox:
Boot to X.
ctrl-alt-F1 back to text mode.
As root:
wsfontload -h 8 -e ibm /usr/share/misc/pcvtfonts/vt220l.808
wsconscfg -dF 1
wsconscfg -t 80x50 1
ctrl-alt-F2 to see the second screen in 80x50 mode
(takes a while for the getty to restart).
ctrl-alt-F5 to go back to graphics mode with X.
ctrl-alt-F2 to go back to the 80x50 text mode.
The custom font has not been reloaded, so the screen is full of trash.
Inserting a restore in vga.c:824 fixes it:
vga_setfont(vc, scr);
+ vga_restore_fonts(vc);
vga_restore_palette(vc);
This does cause the font to be uploaded on every virtual screen switch,
but it is only there if a custom font has already been loaded, and is
tiny in any case.
The vga_restore_fonts() function is currently only called in vga_ioctl()
for WSDISPLAYIO_SMODE when going from graphics to WSDISPLAYIO_MODE_EMUL,
which should be optimal, but this never happens -- that vga_ioctl()
happens once after boot to go into graphics mode, but never gets called
again when switching back to text mode. Maybe something with the
integration of kms drivers changed the call semantics?