TTF2UFM_X2GS(1)

πŸ“¦
version 3.4.4~r2+gbp Β· 3 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

ttf2ufm_x2gs β€” bestie, this is literally the font installer for Ghostscript πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

ttf2ufm_x2gs [config-file]

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so first things first: the fonts that ttf2ufm makes? They work with Ghostscript all by themselves, no cap, they're fine. But the script x2gs (or ttf2ufm_x2gs when it gets installed into a public directory, so it doesn't start beefing with other programs over names) is the one that actually does the linking β€” it links the font files from the X11 directory into the Ghostscript directory and automatically creates the description file (Fontmap) in Ghostscript format. Iconic behaviour, honestly. ✨

If you don't pass the configuration file as an argument, then the file "convert.cfg" in the current directory is what gets used, exactly like the "convert" script does it. Yeah bestie, this one config file is shared by both scripts. One config to rule them all πŸ’…

The Ghostscript-related parameters in that configuration file are:

  • "DSTDIR" β€” the X11 font directory that "x2gs" uses as the source of the fonts. This parameter is common with the X11 configuration.
  • "GSDIR" β€” the base directory of Ghostscript. If you set this parameter to an empty string then "convert" won't call "x2gs" at all. So if all you want is the X11 fonts installed, set this one to an empty string. Heads up though: this directory can vary between systems, so please check your system and set this value accordingly before running the script. πŸ™ˆ
  • "GSFONTDIR" β€” the font directory of Ghostscript. In the standard Ghostscript installation it's a subdirectory of "GSDIR", but some systems may use completely different directories.
  • "GSCONFDIR" β€” the configuration subdirectory of Ghostscript that contains the "Fontmap" file.
  • "INSTALLFONTMAP" β€” if the value is set to "YES" then install the entries for the new fonts right into the main "Fontmap" file. Otherwise, just leave the file "Fontmap.ttf" sitting in the Ghostscript configuration directory.

Once you've prepped the configuration file, run the script. It symbolically links all the font files and creates the description file "Fontmap.ttf" in "GSCONDFIR". After that you've got two choices, bestie β€” pick your fighter:

If the option "INSTALLFONTMAP" was set to "YES" then the font descriptions are also automatically installed into the master "Fontmap" file. And the script is clever enough to detect if it was run multiple times with the same directories β€” and if so, it replaces the old "Fontmap" entries with the new ones instead of just accumulating all of them. Slay. You may also run it multiple times for multiple X11 directories and all the results will be properly collected in the "Fontmap". 🫢 But β€” and this part is on you β€” it's your responsibility to watch that the names of the font files don't overlap. If the X11 font directory gets renamed then you have to remove its font entries from the "Fontmap" and only after that re-run "x2gs" for the new directory. Order matters, fr fr.

On the other hand, if the option "INSTALLFONTMAP" was set to "NO" then go to the "GSCONFDIR" directory and insert the contents of "Fontmap.ttf" into the "Fontmap" file manually. Leaving this step manual is a whole choice, and it's one you might want to make to keep the installation a little bit more safe. πŸ”₯

After that you may also want to redefine some of the aliases in "Fontmap" to refer to the newly installed fonts. But listen β€” redefining the aliases may be dangerous if the width of characters in the new font will be different from the old font. 😭 Alas, there is no visible solution of this problem yet.


🌸 FILES 🌸

  • TTF2UFM_SHAREDIR/scripts/convert.cfg.sample
  • TTF2UFM_SHAREDIR/scripts/*
  • TTF2UFM_SHAREDIR/README
  • TTF2UFM_SHAREDIR/FONTS
  • TTF2UFM_SHAREDIR/*
  • TTF2UFM_BINDIR/ttf2ufm

πŸ‘‘ SEE ALSO πŸ‘‘


version 3.4.4, dated December 31, 2003 β€” that's the TTF2UFM Font Converter lore, and yes it's giving vintage but it works, bestie. Go install those fonts, you're the main character of this terminal πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from