tech-userlevel archive

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

Features missing in wscons/wsfont userland utilities



Hey folks,

I would like to be able (e.g. on an install DVD/USB image) to make the
text console auto-scale the font it uses so we get somewhat close to
old vga 80x25 screens (even if booting x86 with drmkmsfb on a full HD
monitor or a common notebook screen).

We have nearly all things there, but a few bits seem to be missing or
I am overlooking something.

Ideal state, from my POV:

 - we install something like /usr/pkg/share/fonts/X11/TTF/UbuntuMono-R.ttf
   into /usr/share/wscons/fonts/TTF

 - we add support in the rc scripts to auto-handle something like

	screen 4       >=80x25,UbuntuMono-R.ttf vt100

   in /etc/wscons.conf, meaning: figure out the current frame buffer
   resolution, calc $height, run "ttf2wsfont Ubuntu-R.ttf $height",
   and wsfontload the output, then configure a screen with that font.


However, several other variants are ok, like pre-generating a variety of
wsfonts (so we don't need the actual ttf file nor ttf2wsfont on the install
medium) with different heights and have the script pick the best size
and load it.

But I fail to find the details that make it fit together, starting with
a way to change the font / test resolution of an exisiting screen or an
easy way to guess the output filename of ttf2wsfont (in the above example
and $height = 42 it would be: Ubuntu_Mono_19x38.wsf, but how would the script
guess that? Of course it could do a temporary directory and look for *.wsf,
but that sounds like a hack).

Any tricks I am overlooking?

This sounds like a few hours of hacking overall, but I am not quite
sure where to start.


Martin


Home | Main Index | Thread Index | Old Index