PSFADDTABLE(1)

๐Ÿ“ฆ
version 2.10.0 ยท 2 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

๐Ÿ’– PSFADDTABLE ๐Ÿ’–

okay bestie, gather round, because we're talking about psfaddtable โ€” that's the General Commands Manual entry, section 1, and she is so much cooler than her name suggests. sit with me. ๐Ÿซถ


โœจ NAME โœจ

psfaddtable โ€” add a Unicode character table to a console font. that's it, that's the whole job, and she does it flawlessly. ๐Ÿ‘‘


๐ŸŒธ SYNOPSIS ๐ŸŒธ

psfaddtable fontfile tablefile outfile

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so here's the vibe. psfaddtable takes a console font in .psf format โ€” that's your fontfile, bestie โ€” and merges it with the Unicode character table you hand over in tablefile. the glow-up result? a font file with an embedded character table, written out to outfile. iconic behaviour, no notes. ๐Ÿ’…

a couple of little rules that are lowkey important:

  • if you use - as an input file name, that means standard input. yes, she's flexible like that.
  • if you use - as an output file name, that means standard output.
  • and if your fontfile already has an embedded character table? it gets ignored. not merged, not respected, justโ€ฆ ignored. ๐Ÿ™ˆ
ngl, that last one catches people out. if you were hoping to layer tables on top of each other, that is not what's happening here. periodt.

๐ŸŽ€ TABLE FILE FORMAT ๐ŸŽ€

this is the part everyone wants to skip and then gets confused about, so let's not. each line in your tablefile has to be exactly one of these three things:

  1. blank.
  2. a comment โ€” and comments are preceded by #.
  3. a sequence of numbers, separated by spaces or tabs.

and those numbers? they can be written in any of these formats, which is very generous of her honestly:

  • decimal โ€” this is the default, so just write the number, no ceremony.
  • octal โ€” preceded by 0.
  • hexadecimal โ€” preceded by 0x.

now, the actual meaning, because this is where it gets good:

  • the first number on each line tells you the glyph slot in the font that's being referred to. its range depends on how big your font is:
    • 0 to 0xff for a 256-character font
    • 0 to 0x1ff for a 512-character font
  • any subsequent numbers on the same line are Unicodes that are matched by that specific glyph slot.

and here's the cute extra bit: instead of a single Unicode, you can have a sequence of Unicodes separated by commas โ€” that's how you say "this glyph depicts the corresponding composed symbol." so a little comma party, basically. ๐Ÿ“

also, and this is the freeing part: it is totally permissible to have multiple lines for the same glyph. go off. spread them out. she doesn't mind. โœจ


๐ŸŒˆ SEE ALSO ๐ŸŒˆ


and that's the whole page, bestie. this beauty lives in the kbd family and this particular version is dated 25 Oct 1994 โ€” yeah, she's been serving since before you were born and she's still on the PSFADDTABLE(1) beat. respect the elders. ๐Ÿ’œโœจ