g.mkfontcap(1grass)

✨ g.mkfontcap ✨

okay bestie, so this is g.mkfontcap(1grass) straight out of the GRASS User's Manual, and it's literally the font-scanner era of your life. it goes out into the world, finds fonts, and writes a lil config file about them. iconic behavior, no cap. πŸ’…


🌸 NAME 🌸

g.mkfontcap β€” generates the font configuration file by scanning various directories for fonts. that's it, that's the whole job, and she does it flawlessly. πŸŽ€

πŸ”‘ KEYWORDS πŸ”‘

general, display

πŸ¦‹ SYNOPSIS πŸ¦‹

g.mkfontcap
g.mkfontcap --help
g.mkfontcap [-s]  [extradirs=string]   [--help]  [--verbose]  [--quiet]
[--ui]

🌈 Flags 🌈

  • -s β€” write that font configuration file straight to standard output instead of $GISBASE/etc. she's posting it directly, no filter. πŸ“€
  • --help β€” prints the usage summary, for when you're like "wait what were my options again"
  • --verbose β€” verbose module output, aka she tells you everything that's going on πŸ—£οΈ
  • --quiet β€” quiet module output, aka the silent treatment 🫢
  • --ui β€” force launching the GUI dialog, because sometimes we need buttons, not vibes

🌟 Parameters 🌟

  • *extradirs=string* β€” list of extra directories to scan. it's a comma-separated list of extra places to look for Freetype-compatible fonts in addition to the defaults (peep the documentation for the directory tea) πŸ”

πŸ’– DESCRIPTION πŸ’–

so g.mkfontcap is a lil utility whose whole main character job is generating a GRASS font configuration file (a "fontcap", cute) that holds all the deets about the fonts chillin' on your current system. ✨

if Freetype is not installed, the font list is limited to just the set of Hershey stroke fonts that ship with GRASS. but with Freetype enabled? oh she's thorough β€” the module will recursively scan every single file inside a predefined hierarchy hunting for Freetype-compatible scalable fonts. obsessed with the commitment honestly. 🧚

the list of directories she scans is currently:

/usr/lib/X11/fonts
/usr/share/X11/fonts
/usr/share/fonts
/usr/local/share/fonts
${HOME}/Library/Fonts
/Library/Fonts
/System/Library/Fonts
${WINDIR}/Fonts

those correspond to the places fonts like to hang out on some common operating systems. 🌍

you can lowkey add extra directories to search super easily with the extradirs parameter β€” it takes a comma-separated list, easy peasy. and an extra directory can optionally have an environment variable at the start of the string, as long as you wrap it in the ${xxx} syntax (see the examples above, bestie, the paths are literally right there). πŸ‘†

she will normally write to the standard fontcap file location, $GISBASE/etc/fontcap. but if the environment variable GRASS_FONT_CAP is set, the output goes to the file that variable points at instead. why is that useful? because if you don't have permission to modify $GISBASE/etc/fontcap, you just do this instead:

# use local file version instead of system copy
GRASS_FONT_CAP=$HOME/.gfontcap
export GRASS_FONT_CAP
g.mkfontcap

and boom β€” you've made a personal copy, and then you make GRASS use that file instead of the system one. personal fontcap era. πŸŽ€

the output list of fonts is sorted first by type (Stroke fonts first, then Freetype), and within each type it's sorted by the short name of the font. orderly. organized. queen shit. πŸ‘‘

ngl, if you mess with the file locations, double check which one GRASS is actually reading β€” she follows GRASS_FONT_CAP if it's set, periodt.

🌈 SEE ALSO 🌈

  • d.font

πŸ’œ AUTHOR πŸ’œ

Paul Kelly


⭐ SOURCE CODE ⭐

available at: g.mkfontcap source code (history)

latest change: Thursday May 08 14:35:40 2025 in commit: 9528b1e38ba37992c1597a979dc3efbb07b74ec5

Main index | General index | Topics index | Keywords index | Graphical index | Full index

Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual


and that's the whole page bestie πŸ’– this was GRASS 8.5.0 talkin' about g.mkfontcap(1grass) β€” go scan some fonts, you got this, mwah 🫢✨🌸

πŸ“¦ where this page comes from