WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Busybox SETFONT app for console  (Read 1130 times)

Offline PDP-8

  • Sr. Member
  • ****
  • Posts: 496
Busybox SETFONT app for console
« on: July 12, 2019, 02:32:47 AM »
Before I request that the busybox SETFONT application be added to TinyCore, I'm testing the following project..

Objective: my *console* fonts are butt-ugly, no matter what size I configure them to.  So I want to use the Terminus console fonts in the console for say virtual terminals, or in micro-core.

This is not about X, where I am already happily running Terminus fonts.

Tools gathered:
1) Since the SETFONT application is not part of TinyCore, I downloaded the latest binary for it from the official Busybox site.

2) I am successfully using Terminus console fonts in Porteus, so I grabbed the console fonts I used from it (from a slackware package actually) - just to make sure that I didn't blow it with some error in my own compilation attempts from the official Terminus fonts site.

When running the following, I get an error (as a normal user or as root)

Code: [Select]
setfont ./ter-132n.pcf.gz
Here is the error:

Code: [Select]
setfont: input file : Bad length or unsupported font type
I get this same error when ungzipping the font as just an uncompressed pcf file.

I'm pretty sure that pcf is a supported font type with Tinycore.  Or is there some sort of terminal configuration in the kernel itself, like terminal=linux or something that is the blocker?

I don't know since I'm not a kernel hacker..

To be able to run Terminus console fonts with Tinycore (remember my terminus fonts in X are doing fine) would just rock my world since I consider my standard fonts in the console, no matter how I configure them for size, are too ugly for comfort.

Any tips appreciated....

« Last Edit: July 12, 2019, 02:40:14 AM by PDP-8 »
That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Sr. Member
  • ****
  • Posts: 496
Re: Busybox SETFONT app for console
« Reply #1 on: July 12, 2019, 04:00:32 AM »
This is not looking good me - perusing an arch bug report from 10 years ago about patches to busybox's setfont...

https://bugs.archlinux.org/task/19109

It may not be valid these days, but unless someone else has Terminus console fonts running in TinyCore, I'm throwing in the towel  *right now*  :)
That's a UNIX book! - cool  -- Garth

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6966
Re: Busybox SETFONT app for console
« Reply #2 on: July 12, 2019, 05:20:38 AM »
Hi PDP-8
There is a  setfont.tcz  extension in the repository.

Offline PDP-8

  • Sr. Member
  • ****
  • Posts: 496
Re: Busybox SETFONT app for console
« Reply #3 on: July 12, 2019, 12:35:48 PM »
Thanks Rich!

That will save me a lot of headache trying to get the busybox version to work.  Heh, would be nice if it did.  Wonder when setfont.tcz was built and if setfont has been fixed in busybox since..

I'll make the request for a 64-bit version since I don't see it on any of the repo's..
That's a UNIX book! - cool  -- Garth

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10070
Re: Busybox SETFONT app for console
« Reply #4 on: July 13, 2019, 02:37:46 AM »
pcf is an X font. Console fonts are .psf or .psfu.
The only barriers that can stop you are the ones you create yourself.

Offline PDP-8

  • Sr. Member
  • ****
  • Posts: 496
Re: Busybox SETFONT app for console
« Reply #5 on: July 13, 2019, 05:53:05 PM »
Roger that!  Jaunito got the 64-bit version up and running nicely, but wanted to thank you for the original 32 compilation.

I tested out the 64-bit version, and it works great!  And simple, even though I have been to the wiki...

I simply perused the

Code: [Select]
/usr/local/share/consolefonts
directory, and for my high native-res monitor and grandpa type eyes:

Code: [Select]
setfont sun12x22
OHHH  so much better!

Here's what's really promising - spurred by success, I tried the latest busybox binary of setfont to load it - and it DID!

Code: [Select]
busybox_SETFONT /usr/local/share/consolefonts/sun12x22.psfu.gz
TADA!  So that looks promising that *maybe* the busybox version is getting it's act together.

Later when I have time, of course I'm going to see what's up with terminus console fonts (psfu types) and why I can't bring them up with either your setfont, or either the busbox version.

Still, this makes micro-core oh so much more beautiful and a pleasure to use...

That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Sr. Member
  • ****
  • Posts: 496
Re: Busybox SETFONT app for console
« Reply #6 on: July 14, 2019, 05:35:53 PM »
FOUND THE PERFECT COMBO!

Ok, using either the setfont provided in the tcz package, OR the latest busybox setfont applet, works just great with psfu fonts without a lot of hassle.

So I found some more from our Slackware friends in sizes applicable to very large resolution monitors !!

https://slackware.pkgs.org/14.2/slackonly-i486/ttf-console-fonts-20170403_abc5771-noarch-1_slonly.txz.html

Kind misleading as these are adaptations of TTF fonts converted for use in the console - and with some sizes that I need.  They include

dejavusansmono-11x19.psfu.gz
dejavusansmono-13x23.psfu.gz
dejavusansmono-15x30.psfu.gz
dejavusansmono-8x12.psfu.gz

liberationmono-regular-10x19.psfu.gz
liberationmono-regular-13x23.psfu.gz
liberationmono-regular-15.28.psfu.gz
liberationmono-regular-8x12.psfu.gz

Do columns, top and so forth line up ok?  Yes.

THANK YOU CURAGA and JUANITO for getting me off the ground with this.

Virtual terminals and micro-core now absolutely ROCK MY WORLD.

That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Sr. Member
  • ****
  • Posts: 496
Re: Busybox SETFONT app for console
« Reply #7 on: July 14, 2019, 11:20:30 PM »
How did I extract and install the fonts from the Slackware package?

I'ts just an xz format, and Busybox tar can handle it.  I'll break it out from within my home /home/tc directory , grab the files and move them, and delete the slackware package structure.

From /home/tc

Code: [Select]
tar -Jxvf ttf-console-fonts-20170403_abc5771-noarch-1_slonly.txz
That's a capital J.

The psfju fonts we want are broken out into this subdirectory:

/home/tc/usr/share/kbd/consolefonts

Move these new dejavu and liberation console fonts into a directory that suits you for recall later.

Remove the package material:

***** WARNING *****
DO NOT BLINDLY FOLLOW RM COMMANDS ON THE NET UNLESS YOU KNOW
*******************


From within your /home/tc directory (IMPORTANT, STUDY CAREFULLY)
Code: [Select]
rm -rf usr
Obviously one DOES NOT want to rm the normal /usr filesystem.  Just the one inside /home/tc/usr that breaking out this package does if you untar it from within your home directory.

For now, until I find what best suits me, I just call the fonts up manually for testing from within my home directory

Code: [Select]
setfont ./dejavusansmono-15x30.psfu.gz
This is not meant to be a comprehensive guide, but a quick proof-of-concept that works for me.

« Last Edit: July 15, 2019, 12:05:47 AM by curaga »
That's a UNIX book! - cool  -- Garth

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10070
Re: Busybox SETFONT app for console
« Reply #8 on: July 15, 2019, 12:06:06 AM »
There was an extra slash at the beginning of usr in your post. I've edited it away.
The only barriers that can stop you are the ones you create yourself.

Offline PDP-8

  • Sr. Member
  • ****
  • Posts: 496
Re: Busybox SETFONT app for console
« Reply #9 on: July 15, 2019, 01:41:31 AM »
Thanks!  I'm just tiptoeing around usr since fat-fingering that one wouldn't be good if one was root...

There's also the official homepage for it:

http://urchlay.naptime.net/repos/ttf-console-fonts/about/

Which gives more info on what they are about, how to build etc etc.  The license is, um, interesting.


That's a UNIX book! - cool  -- Garth