[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: text-mode : console : resolution : vga 80x25 : how to set?

On Fri, Oct 06, 2017 at 03:00:50PM +0530, Mayuresh Kathe wrote:
i tried my level best to do it, but have failed.
i used 'dpkg-reconfigure console-setup' and followed the
appropriate steps, but yet my console's screen resolution
is way to high. not that it's a big problem, just an
irritant, the text is usually too tiring to read.

can i be helped?

Yes. Presumably your system is using "kernel mode setting", wherein the kernel is able to set the resolution of the screen. This results, as you note, in a high-resolution console.

You want to display 25 rows of 80 columns in your console, however, console-setup doesn't allow you to set that directly. Instead, you need to choose a font size. I *think* that the sizes here are listed in terms of pixels. So, you need to find an appropriate size.

Let's assume that you have a WUXGA screen (1920x1080). Starting with the vertical resolution, you have 1080 pixels and you want to fit 25 rows of pixels in there. That's 1080/25=43.2 pixels. Let's round that down to 40. Horizontally, you have 1920 pixels and want to fit 80 characters there. That's 1920/80=24. So you're looking for a font that's 24x40 pixels.

Next up, you'll notice that console-setup doesn't offer fonts that go that large, so you'll have to make your own. Start with an OpenType font of your choice and install the 'otf2bdf' and 'bdf2psf' packages.

Finally, this page[1] suggests the following incantations (24 point font at 120 dpi should result in a font 40 dots high):

otf2bdf -r 120 -p 24 -c C /path/to/OpenType.otf | sed -e \

bdf2psf NewFont.bdf /usr/share/bdf2psf/standard.equivalents \
/usr/share/bdf2psf/required.set+/usr/share/bdf2psf/useful.set 256 \

Finally, gzip this to, say /usr/share/consolefonts/Lat15-NewFont-24x40.psf.gz and you should be able to select it with debconf (If not, you may have to manually play with the 'setfont' command)

[1] https://unix.stackexchange.com/questions/161890/how-can-i-make-a-psf-font-for-the-console-from-a-otf-one



For more information, please reread.

Attachment: signature.asc
Description: PGP signature

Reply to: