The gallant console font got supercharged

In short, unzip(1) the file in this thread into /boot/fonts/, gzip(1) it. Edit /boot/fonts/INDEX.fonts, to comment out the fonts you want to replace, and insert the Gallant font entries. Then, choose that font style and size by using the size listed in that file for it, and put that entry into /boot/loader.conf. The exact commands to do that are already in this thread.

screen.font="16x32", because that's font size is listed with gallant for 16x32 in my INDEX.fonts file.
Code:
16x32.fnt:en:Gallant BSD Console, size 32
The other 16x32 font is commented out in that file. The same INDEX.fonts file sets the language of fonts it chooses.
 
In short, unzip(1) the file in this thread into /boot/fonts/, gzip(1) it. Edit /boot/fonts/INDEX.fonts, to comment out the fonts you want to replace, and insert the Gallant font entries. Then, choose that font style and size by using the size listed in that file for it, and put that entry into /boot/loader.conf. The exact commands to do that are already in this thread.

screen.font=16x32, because that's font size is listed with gallant for 16x32 in my INDEX.fonts file.
Code:
16x32.fnt:en:Gallant BSD Console, size 32
The other 16x32 font is commented out in that file. I might have to comment all 16x32 fonts, aside from en, unless I don't need to specify en in loader.conf.

Hmm, gallant and 16x32 does not look right. Are you sure you did not mean Terminus? Also, you should not have to delete anything in INDEX.fonts. Just augment it with the 3 entries for gallant after the 11x22 entries, install /boot/fonts/12x22.fnt.gz and in /boot/loader.conf add screen.font="12x22"
12x22.fnt:en:Gallant BSD Console, size 22
12x22.fnt:da:Gallant BSD-konsol, størrelse 22
12x22.fnt:de:Gallant BSD Console, Größe 22
 
I have started a Contributors.md file and mentioned your work under "vmisev". If you want to be known under a different name (or not at all), let me know. Credit where credit is due.
Oh, that so kind of you, I’m humbled – thank you! 🙏
My full name is Vladimir Mišev, but vmisev is my handle on all platforms, so that’s perfectly fine.
 
I did some reading and testing, and unfortunately teken.[fg|bg]_color=* supports only 8 values, not 16 which we can see with vidcontrol show. teken.fg_color=0 is actually 'lightwhite', it’s too bright and 'yellow' is very hard to see.
We can remedy this with adding allscreens_flags="black white" to /etc/rc.conf which will use 'white' as is defined in vidcontrol for the background, and not 'lightwhite'. Switch will happen just before login prompt. Illustration:
White-LightWhite.png


This used to be possible to fine tune in the kernel with options TERMINAL_NORM_ATTR, so that regular, darker 'white' could be used for background, but AFAIK that’s depreciated now.

P.S. edit: there is another solution, we can dim white early in the boot process with swapping values of kern.vt.color.7.rgb and kern.vt.color.15.rgb, so that 'white' will be 'lightwhite' and 'lightwhite' becomes 'white':
kern.vt.color.7.rgb="#ffffff"
kern.vt.color.15.rgb="#cccccc"
Note that vidcontrol show will reset background to bright, but vidcontrol black lightwhite will return fg/bg to normal. Shell changing ANSI colors using ESC sequences works okay, I tested with mewbies bash and perl scripts. Also, mouse cursor will stay bright white (with black outline), so much easier to see on darker white. Swapping kern.vt.color values will dim white from here:
White-LightWhite-EarlyBoot.png


BTW, man vidcontrol(1) needs updating, it mentions few non existing options, like -d, -e, -E, -p, -P, -H
 
The vidcontrol utility is used to set various options for the syscons(4)
or vt(4) console driver, such as video mode, colors, cursor shape, screen
output map, font, and screen saver timeout. Only a small subset of
options is supported by vt(4).
Unsupported options lead to error
messages, typically including the text "Inappropriate ioctl for device".

the rest may need sc(4)
 
The vidcontrol utility is used to set various options for the syscons(4)
or vt(4) console driver, such as video mode, colors, cursor shape, screen
output map, font, and screen saver timeout. Only a small subset of
options is supported by vt(4).
Unsupported options lead to error
messages, typically including the text "Inappropriate ioctl for device".

the rest may need sc(4)
Response from vidcontrol on using any of the options that I mentioned is: illegal option and none of them are mentioned in the usage: . How one binary can have different set of options depending is sc or vt used?
Code:
> vidcontrol -d
vidcontrol: illegal option -- d
usage: vidcontrol [-Cx] [-b color] [-c appearance] [-f [[size] file]]
                  [-g geometry] [-h size] [-i active | adapter | mode]
                  [-M char] [-m on | off]
                  [-r foreground background] [-S on | off] [-s number]
                  [-T xterm | cons25] [-t N | off] [mode]
                  [foreground [background]] [show]
 
maybe the manpage is borked after all. not sure why sc(4) still exists though
That’s what I said, vidcontrol(1) man page needs to be updated. Funny how even in SYNOPSYS -d, -e and -p are not present, but down they have their descriptions. Like someone started to update that page, but it was “eF it, I’ll finish this tomorrow” 😁 Personally, I didn’t use sc(4) since vt(4) came out, but I think that there might be some use cases for legacy BIOS environments.

Thing that I would never notice if wasn’t for testing new Galliant font by schweikh and trying to recreate Sun Sparc look & feel which he mentioned, is that even with background set to #cccccc in loader.conf, vidcontrol show is resetting it back to teken.fg_color=0 – bright white. This tells me that vt and framebuffer need a lot more work on them.
 
in the end they look to be sc(4) only options

Code:
 1429         vt4_mode = is_vt4();
 1430
 1431         init();
 1432
 1433         dumpmod = 0;
 1434         dumpopt = DUMP_FBF;
 1435         termmode = NULL;
 1436         if (vt4_mode)
 1437                 opts = "b:Cc:fg:h:i:M:m:r:S:s:T:t:x";
 1438         else
 1439                 opts = "b:Cc:deE:fg:h:Hi:l:LM:m:pPr:S:s:T:t:x";
 1440
 1441         while ((opt = getopt(argc, argv, opts)) != -1)

and

Code:
179 static void
  180 usage(void)
  181 {
  182         if (vt4_mode)
  183                 fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n",
  184 "usage: vidcontrol [-Cx] [-b color] [-c appearance] [-f [[size] file]]",
  185 "                  [-g geometry] [-h size] [-i active | adapter | mode]",
  186 "                  [-M char] [-m on | off]",
  187 "                  [-r foreground background] [-S on | off] [-s number]",
  188 "                  [-T xterm | cons25] [-t N | off] [mode]",
  189 "                  [foreground [background]] [show]");
  190         else
  191                 fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n",
  192 "usage: vidcontrol [-CdHLPpx] [-b color] [-c appearance] [-E emulator]",
  193 "                  [-f [[size] file]] [-g geometry] [-h size]",
  194 "                  [-i active | adapter | mode] [-l screen_map] [-M char]",
  195 "                  [-m on | off] [-r foreground background] [-S on | off]",
  196 "                  [-s number] [-T xterm | cons25] [-t N | off] [mode]",
  197 "                  [foreground [background]] [show]");
  198         exit(1);
  199 }
 
A new port by yours truly arrived: x11-fonts/gallant. It installs the gallant.pcf.gz file for use under X11. Add /usr/local/share/fonts/gallant to your font path and you should be good to go for xterm -fa '' -fn '*-gallant-*' .

Note that some modern X11 installations insist on providing Xft rendered fonts, even when you request a raster font with -fn fontname; an empty -fa suppresses this and may be omitted if -fn works by itself.
 
A new port by yours truly arrived: x11-fonts/gallant. It installs the gallant.pcf.gz file for use under X11. Add /usr/local/share/fonts/gallant to your font path and you should be good to go for xterm -fa '' -fn '*-gallant-*' .

Note that some modern X11 installations insist on providing Xft rendered fonts, even when you request a raster font with -fn fontname; an empty -fa suppresses this and may be omitted if -fn works by itself.
Thanks, this is great! 👍Just one question: why only .pcf for X11? Wouldn't be possible for the port to install .fnt for vt(4) in let's say /usr/local/share/vt/fonts/ ? Or you are counting on new gallant.fnt getting into base?
 
Thanks, this is great! 👍Just one question: why only .pcf for X11? Wouldn't be possible for the port to install .fnt for vt(4) in let's say /usr/local/share/vt/fonts/ ? Or you are counting on new gallant.fnt getting into base?
The extended gallant.hex is already part of -CURRENT. A merge to -STABLE is planned for the near future.
 
Thanks 🙏 I was just getting to like black on white vt(4) with gallant.fnt as default from the boot more and more, and I was thinking about settling with this for my default vt look, but now Thread uw-ttyp0-2-0-was-released.99167 and now I'm like Buridan's donkey 🫏

Maybe I should make a script to check for date and use one on even dates, and the other on odd ones?
Choices, why they have to be so hard? 🤣
 
Back
Top