I always install a personal copy of groff in a directory that my user owns, ensure that is in the path before the location of the system groff, and never use root access for installing fonts. I realize this may not be suitable for everyone.
T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io, https://consp.org or gemini://consp.org, and https://tkb.tx0.org On Mon, Jan 20, 2025 at 12:16 Francesco Ariis <fa...@ariis.it> wrote: > Hello groff users, > > how to convert .tff fonts to something usable by `groff`, without > sudo access? > > I am learning groff and I feel thee need to use a fonts with more > glyphs than what standard fonts offer (e.g.: ◇ U+25C7, ❦ U+2766, etc.) > > I came around the excellent `install-font.sh` [1]. It seems to work when > I have root access (it wrote files to /usr/share/groff/), but to I prefer > to stay as user to experiment with options, different styles of fonts etc. > > My idea is to have a local ./font/ folder and then include it in my groff > invocation (I should do it via `-F`, right?). > > I am not sure how to invoke ./install-font.sh without `su` or `sudo` > though. > It complains about missing `text.enc`. > Here is a log of what I see in the terminal: > > f@x270:~/spool/groff/prova/cv/install-font$ ./install-font.sh -P out/ > FreeSerif.ttf > Processing FreeSerif.ttf... > Running fontforge... > Program root: /usr > Copyright (c) 2000-2024. See AUTHORS for Contributors. > License GPLv3+: GNU GPL version 3 or later < > http://gnu.org/licenses/gpl.html> > with many parts BSD <http://fontforge.org/license.html>. Please read > LICENSE. > Version: 20230101 > Based on sources from 2024-03-15 20:41 UTC-D. > This font contains both a 'kern' table and a 'GPOS' table. > The 'kern' table will only be read if there is no 'kern' feature in > 'GPOS'. > The glyph named Delta is mapped to U+0394. > But its name indicates it should be mapped to U+2206. > The glyph named Omega is mapped to U+03A9. > But its name indicates it should be mapped to U+2126. > The glyph named mu is mapped to U+03BC. > But its name indicates it should be mapped to U+00B5. > Done. > Family name (default = FreeSerif): > =>FreeSerif (FreeSerif.ttf) assigned to family 'FreeSerif'. > Enter +STYLE (eg +R, +I, +B, +BI), or a unique groff name for > FreeSerif. > Leave blank to set name to 'FreeSerif': > =>FreeSerif assigned groff fontname 'FreeSerif'. > 'text.enc' not found. Aborting. > f@x270:~/spool/groff/prova/cv/install-font$ tree out/ > out/ > ├── site-font > │ ├── devpdf > │ │ └── text.enc > │ ├── devps > │ │ └── text.enc > │ └── text.enc > └── text.enc > > 4 directories, 4 files > > Any help or pointers appreciated! > —F > > [1] https://www.schaffter.ca/mom/bin/install-font.sh > >