bugGNU roff - Bugs: bug #58831, document...

 
 

bug #58831: document "install-font.bash" script

Submitter:  Dave <barx>
Submitted:  Sun 26 Jul 2020 02:05:55 PM UTC
   
 
Category:  Font - others/general Severity:  1 - Wish
Item Group:  Documentation Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Jump to the original submission

Sat 15 Nov 2025 10:36:48 PM UTC, comment #6: 

At 2025-11-15T17:29:05-0500, Doug McIlroy wrote:

> Follow-up Comment #5, bug #58831 (group groff):
>
> It would be sinful to distribute a program without a man page.


It's a...uh...uh...example, not a program.  :)

/home/branden/groff-HEAD/share/doc/groff-1.23.0/examples/install-font.bash

Its execute bit is not set.

Another interesting trait it has is that it builds its man page in...


$ bash $(find ~/groff-HEAD -name "install-font*") -H
USAGE:

    install-font.sh [-hHlscpn] [-P dir] [-C dir] [-F family] [-f groff fontname] file1 file2 ...

DESCRIPTION:

    A utility to make TrueType (.ttf), OpenType (.otf), and
    PostScript Type1 (.pfa, .pfb) fonts available for use with
    groff.

    With no options, for every file named on the command line,
    install-font prompts for

      - a family name
      - a groff fontname
      - whether to make the font available to gropdf
      - whether to copy the input file(s) to a system-wide location

    install-font.sh calls fontforge to convert TrueType and OpenType
    fonts to PostScript Type42 (.t42) and Type1 (.pfa), from which
    a groff font is generated.  The .t42 and groff fonts are moved
    to site-font/devps/ and registered in the 'download' file.  If
    the font is to be available to gropdf, the .pfa is moved to
    site-font/devpdf/ and registered in its 'download' file.  A
    symlink is made to the groff font in site-font/devps.

    PostScript fonts are converted to .pfa, even those with a .pfa
    extension.  The newly-generated .pfa has a filename derived from the
    font's PostScript name.  This is helpful in the case of fonts with
    cryptic names like 'bchri8a.pfa', which becomes 'CharterBT-Italic.pfa'.
    In all cases, the original file is preserved with its original
    name in the directory from which the font is being installed.

    The .pfa and groff fonts are moved to site-font/devps/ and
    registered in the 'download' file.  If the font is to be
    available to gropdf, symlinks are made in site-font/devpdf/ to
    both the .pfa and the groff font, and the .pfa is registered
    in /site-font/devpdf/download.

OPTIONS

    Options not requiring an argument may be grouped.

    -h  Short help.

    -H  Long help.

    -l  Assume prefix /usr/local/share/groff for all directories. (default)

    -s  Assume prefix /usr/share/groff for all directories.

    -P  dir
        Path to the top-level groff directory if groff has been
        installed in a non-default location.

    -c  Copy file(s) named on the command line to a system-accessible
        location.  If neither -s nor -C is given, copy to the family
        directory (see -F) under /usr/local/share/fonts/<fonttype>/,
        where <fonttype> is one of 'truetype', 'type1', or 'opentype'.
        If -s is given, copy to the family directory located under
        /usr/share/fonts/<fonttype>/.

        If neither -c nor -C is given, a prompt asks whether to copy
        the file(s) named on the command line.

    -n  Don't copy file(s) named on the command line to a system-accessible
        location.

    -d  Make font available to gropdf.

    -D  Do not make font available to gropdf.

    -p  Ask before overwriting or linking files.  Default is to
        overwrite without asking.

    -C  dir
        Copy file(s) named on the command line to the family directory
        (see -F) in dir.

    -F  family
        Family to which the font belongs.  Creates a family for the
        groff font, which can then be accessed by calls to .fam or
        .FAMILY (mom macros).  Also creates a family directory for
        fonts being made available system-wide (see -c and -C).

        -F is useful for batch processing fonts that belong to the
        same family.  Use with care, since all files named on the
        command line will be assigned to family.

        If -F is not given, a prompt asks for the family name.

    -f  name or +STYLE
        Name by which to access the font with calls to .ft or
        .FT (mom macros).  name may be arbitrary, or
        a '+' sign prefixed to an uppercase fontstyle recognized
        by groff, eg +R, +I, +B, +BI, which respectively stand for
        regular, italic, bold, and bold italic.  The mom macros
        provide additional styles, which may also be used.

        +STYLE is affixed to the family name to arrive at the
        groff fontname.

            install-font -F Garamond -f +R <file>

        creates font GaramondR, which can be accessed by

            .fam Garamond
            .ft  R

        or

            .ft GaramondR

        -f is not compatible with batch processing.  install-font
        will abort if the -f option is given and multiple files are
        named on the command line.

        If -f is not given, a prompt asks for the font name.


How's my lawyering?  ;-)

G. Branden Robinson <gbranden>
Group administrator
Sat 15 Nov 2025 10:29:01 PM UTC, comment #5: 

It would be sinful to distribute a program without a man page.

Doug McIlroy <dougmcilroy>
Fri 14 Nov 2025 07:28:58 PM UTC, comment #4: 

I expect to resolve bug #60930 with my next push.  It does none of the fancy or ambitious stuff contemplated in that ticket's comments--it just ships the dad-berned script (and installs it).

I'm reorienting this ticket to all of our documentary needs involving the "install-font.bash" (yes, it's renamed) script prerequisite to releasing groff 1.24.0.

So, whatever needs to be done in that respect, speak now or live without it in 1.24.

G. Branden Robinson <gbranden>
Group administrator
Sun 18 Jul 2021 09:01:59 AM UTC, comment #3: 

original submission:

> An easier hurdle to clear would be to make Peter Schaffter's
> excellent install-font.sh part of the groff package.


Now being tracked in bug #60930.

> A still lower hurdle would be to put a
> pointer to install-font.sh's current home
> (http://www.schaff ... html#install-font)
> in the core groff documentation.


This is still a viable fallback if #60930 is not completed before the release, so I'll keep this bug report open rather than closing it as a dup of #60930.

Dave <barx>
Group Member
Mon 02 Nov 2020 10:43:01 AM UTC, comment #2: 

The musings of comment #1 have spawned their own bug report, bug #59284.

Dave <barx>
Group Member
Fri 16 Oct 2020 11:50:33 PM UTC, comment #1: 

Semi-random musing because I finally learned how to make groff use a third-party font (see 2813d3800e9a0f8e52f23dae46d4cf5501c6b5aa).

afmtodit needs to grow an option to look on the system for a textmap file.  It's tedious to make the user provide it as an argument when they're unlikely to alter it.

Or, the option could override the search for the textmap file, and the build process could supply the flag.  That would probably be even better.

G. Branden Robinson <gbranden>
Group administrator
Sun 26 Jul 2020 02:05:55 PM UTC, original submission:  

A recent question on the list (http://lists.gnu. ... -07/msg00066.html) reminded me how nonintuitive it is to install groff fonts.

The ideal situation would be for groff to natively support modern fonts (bug #40717).  But this is a huge undertaking requiring significant time and resources.

An easier hurdle to clear would be to make Peter Schaffter's excellent install-font.sh part of the groff package.  This has been discussed (see thread starting at http://lists.gnu. ... -04/msg00068.html) and seemed to be generally supported (including someone volunteering to write a man page for it), but will require some additional work.

A still lower hurdle would be to put a pointer to install-font.sh's current home (http://www.schaff ... html#install-font) in the core groff documentation.  The script is currently mentioned only under contrib/mom/momdoc, where only mom users are likely to look.  This is something I could do if the previous option ends up being too high a hurdle for the next release.

Dave <barx>
Group Member

 

Attached Files

This item currently has no attached files.

(Note: upload size limit is set to 4.0MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

Digest:
   bug dependencies.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by dougmcilroy (Posted a comment)
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by barx (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

    History

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-11-14 gbranden Dependencies- bugs #65099 is dependent
    2025-11-14 gbranden Item GroupFeature change Documentation
        StatusNone Need Info
        Summarymake install-font.sh easier to find document "install-font.bash" script
    2021-06-04 barx Severity3 - Normal 1 - Wish

    Back to the top

    Powered by Savane 3.16-a7ba.
    Corresponding source code