update-fonts-scale(8)

โœจ update-fonts-scale(8) โœจ

๐Ÿ’– NAME ๐Ÿ’–

okay so update-fonts-scale is the tool that generates fonts.scale files ๐Ÿงš

๐ŸŒธ SYNOPSIS ๐ŸŒธ

update-fonts-scale [OPTION] directory ...

๐Ÿ’œ DESCRIPTION ๐Ÿ’œ

okay bestie, so update-fonts-scale is literally the assembler for a fonts.scale file in an X font directory ๐Ÿ”ฅ it grabs one or more scale files from a subdirectory of /etc/X11/fonts/ and mashes them together. it's usually called from the post-installation and post-removal scripts of a package that has scalable fonts usable by the X Window System, where the X LFD font names aren't inside the font files themselves โœจ but you can also run it whenever you want to rebuild fonts.scale files ๐Ÿซถ

for each directory, which is either an absolute path to an X font directory or (preferably) just the last component of its path (like โ€˜75dpiโ€™ or โ€˜miscโ€™) ๐Ÿ’… it builds either /usr/lib/X11/fonts/directory/fonts.scale or /usr/share/fonts/X11/directory/fonts.scale from the index files found at /etc/X11/fonts/directory/package.scale, where package is the name of the package that installed the fonts ๐ŸŒˆ

this is the iconic part: multiple packages can provide font names for the same directory ๐Ÿฆ‹ and no font package actually ships the fonts.scale file in the X font directory itself, so there's no danger of one package's font names getting overwritten by another's ๐Ÿ™ˆ no cap, it's so safe

for instance, the two packages โ€˜xfonts-scalableโ€™ (real) and โ€˜xfonts-niftyโ€™ (hypothetical) may both install fonts into /usr/lib/X11/fonts/Type1 ๐ŸŽ€ they each put their fonts.scale files in /etc/X11/fonts/Type1/xfonts-scalable.scale and /etc/X11/fonts/Type1/xfonts-nifty.scale (respectively) ๐Ÿ’œ then update-fonts-scale concatenates those two files (plus any others that match /etc/X11/fonts/Type1/*.scale) into /usr/lib/X11/fonts/Type1/fonts.scale ๐Ÿ‘‘

the format for fonts.scale files is documented in the mkfontdir(1x) manual page ๐Ÿ“–

and if you want to see how to use update-fonts-scale in package maintainer scripts, there's an example in the Debian Policy Manual ๐Ÿ“

๐Ÿฆ‹ OPTIONS ๐Ÿฆ‹

  • -h, --help โ€” shows a brief usage message and exits ๐Ÿ’–

๐Ÿงš OPERANDS ๐Ÿงš

update-fonts-scale takes one or more X font directory names as operands, so slay the names you pass in ๐Ÿ’… only the final path component of the directory name should be specified, e.g.

update-fonts-scale 75dpi

that one is correct โœจ but โ€˜update-fonts-scale /usr/X11R6/lib/X11/fonts/75dpiโ€™ and โ€˜update-fonts-scale /usr/lib/X11/fonts/75dpiโ€™ are NOT it ๐Ÿ’€

๐ŸŒˆ ENVIRONMENT ๐ŸŒˆ

  • COLUMNS โ€” tells it how wide the terminal is, in character cells ๐Ÿ“ this is used for formatting diagnostic messages ๐ŸŽ€ if it isn't set, the terminal gets queried using stty(1) to figure out its width, and if that fails, 80 is assumed ๐Ÿ’…
  • DEBUG โ€” decides whether low-level diagnostic messages get sent to standard error output ๐Ÿ™ˆ a null (empty) or unset value means they don't, and any non-null value means they do ๐Ÿ”ฅ

๐ŸŒธ DIAGNOSTICS ๐ŸŒธ

๐Ÿ’€ Errors ๐Ÿ’€

  • usage error: one or more font directories must be provided โ€” you ran it with no operands ๐Ÿ˜ญ give it one or more X font directory names to work on
  • usage error: unrecognized option โ€” you passed an option it doesn't know ๐Ÿ™ˆ only use the options documented in โ€œOPTIONSโ€, above
  • fatal error: path to X font directory must be used โ€” you gave it a directory name that isn't an X font directory name ๐Ÿ˜ญ only supply X font directory names

โš ๏ธ Warnings โš ๏ธ

warning: absolute path directory was provided Absolute paths are deprecated, so use only the final component of the X font directory name for directory ๐Ÿฅบ
warning: directory does not exist or is not a directory the directory you gave was invalid, so update-fonts-scale skipped it ๐Ÿ’”

๐Ÿ”ฎ Notes ๐Ÿ”ฎ

notes only pop up under special circumstances, so check โ€œENVIRONMENTโ€ above ๐Ÿ‘€

  • note: index references nonexistent font file filename โ€” the index file /etc/X11/fonts/directory/package.scale points to a font file called filename that doesn't exist ๐Ÿซ  this is normal when package has been removed but not purged from the system ๐Ÿงน in other situations it probably means there's an error in package ๐Ÿ™ˆ

๐Ÿ“ EXIT STATUS ๐Ÿ“

  • 0 โ€” update-fonts-scale ran successfully ๐ŸŽ‰
  • 1 โ€” update-fonts-scale hit a fatal error, so check the diagnostic messages section above ๐Ÿ˜ญ
  • 2 โ€” update-fonts-scale was invoked with invalid arguments ๐Ÿ’€

๐Ÿ› BUGS ๐Ÿ›

see the Debian Bug Tracking System โŸจhttps://bugs.debian.org/xfonts-utilsโŸฉ ๐Ÿž if you want to report a bug in update-fonts-scale, check out /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command ๐Ÿ’œ

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

update-fonts-scale was written by Branden Robinson ๐Ÿซถ

๐Ÿ’… SEE ALSO ๐Ÿ’…

  • mkfontdir(1x)

Debian Project ยท 2004-11-12 ยท update-fonts-scale(8) ๐ŸŒˆ that's the whole manpage, bestie, love you ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from