how to change console font type and size ?

Polytropon freebsd at edvax.de
Thu Feb 22 14:59:32 UTC 2018


On Thu, 22 Feb 2018 15:48:40 +0800, 李周华 wrote:
> I'm now working on freebsd 11.1 .  
> Sometimes i no need to login X, just veiw some source code
> after boot completely.
> 
> On boot process after invoke 'kldload i915kms'  console font
> becomes small and difficult to distinguish. 

Welcome to the "wonderful" world of sc. ;-)

No, seriously: With vt, the new console subsystem, the selection
of a readable font is still something that needs development.
While sc defaulted to 80x25 (and you could switch to something
bigger if you wanted), vt does not directly allow you to select
a size on <columns>x<lines>. Instead, you need to experiment
with the screen size (in pixels) and the font.



> If i not invoke 'kldload i915kms' the font size becomes too big to read.

How can anything be too big to read? :-)



> Is there any way to change font type and size ?

Yes. At least the font can be changed, its size will depend on
many parameters quite hard to discover. Use

	# vidcontrol -f <fontname>

to experiment with the fonts. The available fonts are stored in
the system directory /usr/share/vt/fonts.

You can make the setting permanent using the corresponding entries
in /etc/rc.conf, for example:

	allscreens_flags="-f gallant"

This would choose the font "gallant" during multi-user boot.

In /boot/loader.conf, you can set those:

	kern.vty=vt
	hw.vga.textmode=1
	i915kms_load="YES"

Note that the 1st entry - if I remember correctly - is optional
in FreeBSD 11 because vt has obsoleted sc as the default console
driver. But it doesn't hurt. :-)

The 2nd entry is for experimenting.

The 3rd entry is required if you want to run X.

You can also experiment with a 4th entry:

	kern.vt.fb.default_mode="1280x800"

which should be the physical size (in pixels) of your screen; I
assume you have a flatscreen display (no CRT), so you can provide
that value accordingly.

Please also check this list's archive for font settings related
to the new vt console subsystem. I have the same problem (font
too small to read, no way back to standard 80x25 except with sc,
but then, no X). One of the threads is called "Restoring sc console
look and feel with vt" from september 2017, but there are others
equally full of information and disappointment...


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list