Skip to content

Console Information

wattahay edited this page Dec 6, 2024 · 12 revisions

As opposed to running in a GUI-based Terminal application.

Ideally, a big point of a script like this game would be to use it without a GUI.

Fonts used in the console are limited to 512 characters, which excludes some in this game script.

Conceivably one would:

  1. add the right characters to a custom font file, within the 512.
  2. change the codes in the script to use the ones used in the custom font file

The fonts I have encountered are in psf format. In my few attempts, fontforge as been unable to recognize these in psf or psf.gz formats.

The steps to get fontforge to recognize these might be like:

  1. convert psf font to bdf
  2. convert bdf to ttf
  3. customize font with fontforge
  4. convert ttf to bdf
  5. convert bdf to psf
  6. gzip psf to gz
  7. alter numbers in the script

Using Fonts in Practice

Once the above was done, the process of using the script in the console might look like this:

  1. custom font file included in repo
  2. setfont -o fontfilename.psf / bdf?
  3. setfont fontfilename
  4. setfont -h14 / -h16 / -h18 / -h20 / -h22 / -h32
  5. setfont -d
  6. run game script with -c option

This could perhaps be done from the script without additional user steps, because these do not require admin privileges.

Console Fonts in Fedora:

ls /usr/lib/kbd/consolefonts

see here

dnf install bdf2psf otf2bdf

These packages facilitate customizing a ttf or otf font to then convert to bdf or psf.

I have not taken the time to go past a shallow understanding of the customization and conversion process. It is not straight forward, as there are issues controlling width and format. One can do it with some effort.

Clone this wiki locally