WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Finally got a larger Aterm font!  (Read 3103 times)

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Finally got a larger Aterm font!
« on: January 05, 2018, 03:41:38 AM »
A big *THANK YOU* to bmarkus for providing the mkfontdir.tcz available for picore!

I needed a way to get a slightly larger aterm font but no amount of editing the ~.Xdefaults file would produce any results like they would on X86.

All I needed was to make a new fontdir with my desired font and make X11 aware of it.  Here's how I did it.  I'm only going to demo just using one font - not the entire store. :)

Download and install the mkfontdir.tcz extension in your favorite manner.

We'll start with our home directory, and do operations there:
Code: [Select]
cd
mkdir fonts
cd fonts

Copy a font that you like into this new fonts directory:
Code: [Select]
cp /usr/lib/X11/fonts/misc/10x20-ISO8859-1.pcf.gz    ~/fonts

Now run mkfontdir (from within your new fonts directory) AND inform X11 all about it with xset:
Code: [Select]
mkfontdir

xset fp+ $HOME/fonts
xset fp rehash

If you want this to be persistent across reboots (I'm sure you do!), then be sure to edit your ~/.xsession file and add those two xset lines above to it.


Let's use it!

If you cat your ~/fonts/fonts.dir , you'll see the long names associated with the font.  Let's use that to edit our ~.Xdefaults file so that Aterm can use it.  Change your font assocated with Aterm:  (this is for my 10x20 sized font)

Beware:  note the double-dashes in the middle of this string between "normal--20" and we edit like so...
Code: [Select]
Aterm*font:  -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-1

Exit out of the editor, and when you call up aterm again, I've got my grandpa-sized font!

BUT, what if you want to change fonts back and forth on the fly, by using an *alias* on the command line so you don't have to type out that error-prone long name?

Inside your fonts directory, create a fonts.alias file.  (~/fonts/fonts.alias)

Put in your own desired alias, separated by a space, and the actual long name given when you cat the font.dir file.  I chose to use the common alias of 10x20 already in place:

fonts.alias    (don't forget the double-dash in the middle!)
Code: [Select]
10x20  -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-1

Or, I could have gotten silly with something like this:
Code: [Select]
owleyes  -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-1

Want to try it out immediately?  Just rehash
Code: [Select]
xset fp rehash

NOW, if you call up aterm, you can jump back and forth on the commandline between the smaller fixed font and the big 10x20 aliases using either of:
Code: [Select]
aterm -fn fixed
aterm -fn 10x20

Jumping ahead - I can imagine some might want to do this with the entire existing font structure, but that might be pretty wasteful having fonts being backed up that you'll never use.

Ah, this was one of those blow-my-mind, lean back in my chair and stare moments for me.  Finally got that itch scratched!  Again, thanks bmarkus for providing the mkfontdir.tcz to make it all possible.

« Last Edit: January 05, 2018, 04:15:00 AM by PDP-8 »
That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Finally got a larger Aterm font!
« Reply #1 on: January 08, 2018, 03:02:07 AM »
While the above was fun, I caved and took the simpler route without having to use mkfontdir...

Let's just add the existing fonts to the path and rehash them.  Add to .xsession as well.

To fix aterm so that you can use all the available fonts:

Code: [Select]
xset fp+ /usr/lib/X11/fonts/misc
xset fp rehash

While we're at it, lets add the 75dpi fonts so that the Dillo browser will work.  Edit dillorc to taste..

Code: [Select]
xset fp+ /usr/lib/X11/fonts/misc
xset fp+ /usr/lib/X11/fonts/75dpi
xset rehash

Add these lines to .xsession to make it happen upon reboot.
That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Finally got a larger Aterm font!
« Reply #2 on: January 15, 2018, 12:27:26 AM »
Oops - lines with

xset rehash

should read:

xset fp rehash
That's a UNIX book! - cool  -- Garth

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Finally got a larger Aterm font!
« Reply #3 on: January 23, 2018, 03:55:00 AM »
Update:  you don't need xset fp rehash in your .xsession file at all.  That will be taken care of upon reboot.  rehash is only needed when you are changing your font path dynamically in real-time.

Hint:  follow the message above adding the standard x fonts to your existing built-in path to your .xsession (without the rehash).

TERMINUS bitmapped fonts:  I fell in love with these and grabbed the *.pcf.gz from a compilation on another machine.  You can choose your own too.

After doing the step in the message directly above, follow the instructions in the very first message to put your Terminus (or others) fonts into the system.  Don't forget that after placing new fonts in, you need to followup with a mkfontdir to get them properly indexed.

In this instance, I found it handy to actually PRE-pend the terminus font path to the existing default path in my .xsession with

Code: [Select]
xset +fp /home/tc/fonts/terminus
In this case, note how the + preceeds the "fp", which puts this font path ahead of the default built-in queue, rather than after it.

Sorry to be so disjointed about this.  Not only did Aterm improve, but also Dillo for you dillo fans with some editing of the dillorc.  That's for another day....  Now you know why I don't write wiki's. :)
« Last Edit: January 23, 2018, 03:59:46 AM by PDP-8 »
That's a UNIX book! - cool  -- Garth