bugGNU roff - Bugs: bug #60930, integrate Peter Schaffter's...

 
 

bug #60930: integrate Peter Schaffter's "install-font.sh" font installer script into groff

Submitter:  T. Kurt Bond <tkurtbond>
Submitted:  Sat 17 Jul 2021 12:14:11 AM UTC
   
 
Category:  Utilities Severity:  3 - Normal
Item Group:  Feature change Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.24.0
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Jump to the original submission

Fri 14 Nov 2025 10:01:04 PM UTC, comment #28: 

At 2025-11-14T16:45:43-0500, Dave wrote:

> Follow-up Comment #27, bug #60930 (group groff):
>
> comment #26:
> > Let's spin the stuff from Deri's comment #23 into a new ticket.
>
> With this ticket's closure, this spinoff task seemed in danger of
> getting lost, so I opened bug #67700.  It probably needs more detail;
> right now it's merely a pointer to here.


Thanks Dave--that's what I had in mind.

The last of the planned feature changes for groff 1.24.0 is under
development right now.

See bug #67570.

G. Branden Robinson <gbranden>
Group administrator
Fri 14 Nov 2025 09:45:37 PM UTC, comment #27: 

comment #26:

> Let's spin the stuff from Deri's comment #23 into a new ticket.


With this ticket's closure, this spinoff task seemed in danger of getting lost, so I opened bug #67700.  It probably needs more detail; right now it's merely a pointer to here.

Dave <barx>
Group Member
Fri 14 Nov 2025 08:05:41 PM UTC, comment #26: 

Let's spin the stuff from Deri's comment #23 into a new ticket.


commit 20a41b7640a67a2f4a0c8ca129ab24fcc6cd9c70
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Nov 14 13:16:35 2025 -0600

    [install-font]: Add new component.

    * Makefile.am: Include "contrib/install-font/install-font.am".

    * contrib/install-font/install-font.bash: Import Peter Schaffter's
      "install-font.sh" script from his website.  Rename as shown; its
      "shebang" line declares it a Bash script (albeit one that operates in
      Bash's POSIX mode).  Cosmetic changes to Peter's version comprise
      removal of trailing whitespace, a replacement of the GPL license
      notice with model language from the current version of the GPL, and
      addition of a Vim modeline reflecting the code style in evidence.  I
      also recoded the file to plain ASCII (Unicode Basic Latin), the only
      consequence of which was dropping of the U+00A9 copyright sign.

    * contrib/install-font/COPYRIGHT: Add file promised by groff's
      "LICENSES" file.

    * contrib/install-font/install-font.am: Automake script, when driven by
      a groff build, installs "install-font.bash" to the target's "examples"
      directory.

    Fixes <https://savannah.gnu.org/bugs/?60930>.


G. Branden Robinson <gbranden>
Group administrator
Fri 14 Nov 2025 06:33:12 PM UTC, comment #25: 

Seizing.

G. Branden Robinson <gbranden>
Group administrator
Wed 15 Oct 2025 10:00:13 PM UTC, comment #24: 

I need to look at Deri's stuff in comment #23.

The new ticket status is not intended to gate or bar any work Deri is doing.

Nor any that T. Kurt Bond is doing, should he return. :)

G. Branden Robinson <gbranden>
Group administrator
Sun 21 Sep 2025 06:36:18 PM UTC, comment #23: 

I have now "manned up" and included the code to do what 'ttfdump' and 'fc-query' were being used for, so they are no longer a dependency, you don't need them to have them available. Also, it is a small step in being able to integrate native ttf/otf font support into gropdf.

Attached is a replacement archive which should be unpacked in the users "home" directory (it will not affect any fonts you may have installed), and a new version of the program "ttffinstall.pl". This version is compatible with a stock 1.23.0 groff so you don't need to install a bleeding edge groff to try it out, (although I LOVE how Branden has improved an.tmac to allow any font family to be used for the body text).

It now call 'groff' rather than 'test-groff' so should be much easier to use.


(file #57670, file #57671, file #57672)

Deri James <deri>
Group Member
Sat 13 Sep 2025 03:03:13 PM UTC, comment #22: 

This is a bit out of left field but I have been working on a font management program for groff which stores the fonts in a local directory (~/.groff/fonts) rather than under /usr which requires root privileges. I have attached the program and necessary files to this bug. Please can you test.

Your system needs to have the programs fontforge, fc-query and ttfdump available. The latter two can be found in fontconfig and texlive packages (on my system). And it needs a fairly recent git groff, definitely not 1.23.

Installation:-

Untar the .tgz into your home directory. Which will create ~/.groff/fonts and ~/.groff/bin with three scripts in it.

Read the attached pdf for instructions on use.

Line 16 of ttffontinstall.pl should specify which command you use to run 'bleeding-edge' groff. I use a custom test-groff which does not clobber GROFF_FONT_PATH but plays nicely with other children.

FAQ

Why are you creating custom map files for each font.

This is because relying on on postscript names to identify glyphs is becoming increasingly fraught. Since the Adobe glyph.list has been essentially frozen for over 20 years, but many new characters have been added to unicode and font designers have designed glyphs for those characters and then been "creative" with the postscript names. For example, the postscript name for U+1F603 in NotoEmoj is "grinningFaceWithBigEyes" which is definitely not in the AGL and another font has the postscript name for the same glyph as "u1F603". It's the wild west out there! The custom map allows "grinningFaceWithBigEyes" to be assigned u1F603, otherwise afmtodit would consign the glyph to the "---" dump where it could only be accessed by \N'nnn', and anyone using \[u1F603] would get the character not found message. I think my favourite custom map entry for NotoEmoji is:-

smilingCatFaceWithWrySmile u1F63C

Is it finished yet?

I'm probably going to add --papersize to add a validated value to DESC. Toying with the idea of --import to import the fonts in the groff site font and refreshing with a custom.map (to improve the glyph coverage).

Have fun!!

Cheers

Deri




(file #57643, file #57644, file #57645, file #57646)

Deri James <deri>
Group Member
Wed 04 Jun 2025 05:28:05 PM UTC, comment #21: 

On the email list, Branden suggests a first step (http://lists.gnu. ... -06/msg00012.html) that to me sounds like a reasonable way of getting this ticket out of limbo.

(Clerical note: I added Bertrand to the cc for maintainerly reasons per comment #15, so removing him now as he is no longer in that role.)

Dave <barx>
Group Member
Thu 14 Mar 2024 11:29:55 PM UTC, comment #20: 

Not opposed to that either.  I might wonder if the GNU project feels at all territorial about the g prefix, since they use that to distinguish some of their own versions of tools from their ancestors (gmake, gcc, gawk, even gtroff on some systems), but since there's no prior "font" command, I can't see much objection on those grounds.

Dave <barx>
Group Member
Thu 14 Mar 2024 12:39:08 AM UTC, comment #19: 

How about just gfont?

Peter Schaffter <PTPi>
Group Member
Wed 13 Mar 2024 07:32:24 PM UTC, comment #18: 

comment #17:

> comment #16:
> > My suggestion for a name is fforg.
>
> Too many letters in common with fontforge, of which it looks
> like an abbreviation.


This was my first mental association on reading the name.  But I'm not sure whether I consider that disqualifying.  It is related to font conversions, akin to a mini-FontForge for a specific domain.

> Also, the name gives no indication of the script's function
> or domain of operation.


This, however, seems entirely consistent with a Unix command-line name space strewn with inscrutable letter-salads like grep, fsck, ls, cat, gcc, sudo, cd, chmod, awk, and even groff.  And while some groff tools hint at their family relation (grotty, gropdf, grog), plenty more do not (preconv, chem, addftinfo, soelim, afmtodit).

Dave <barx>
Group Member
Sat 09 Mar 2024 04:52:29 PM UTC, comment #17: 

comment #16:

> > Branden mentioned two more to-do items in the email cited in comment #5:
> > * giving it a less name-space-stomperific name ("groff-font-install" or "groff-install-font" would be clear enough, but I think either would annoy me [and other users] when tab-completing "groff")
>
> My suggestion for a name is fforg.


Too many letters in common with fontforge, of which it looks like an abbreviation.  Also, the name gives no indication of the script's function or domain of operation.  Cute idea, though.

Peter Schaffter <PTPi>
Group Member
Sat 09 Mar 2024 03:36:31 PM UTC, comment #16: 

comment #7:

> Branden mentioned two more to-do items in the email cited in comment #5:
> * giving it a less name-space-stomperific name ("groff-font-install" or "groff-install-font" would be clear enough, but I think either would annoy me [and other users] when tab-completing "groff")


My suggestion for a name is fforg.

You might pronounce this as "F-for-G", or the same as "fork", but with a voiced final stop consonant.

1.  It's short for "*f*onts for *g*roff".
2.  It's "groff" spelled backwards.
3.  Anyone frustrated with the tool can call for us to be burned/hanged/shot in...efforgy.

G. Branden Robinson <gbranden>
Group administrator
Sat 17 Feb 2024 01:18:04 AM UTC, comment #15: 


> I can't remember when I wrote the damned thing


Its first appearance I can find on the mailing list is 2012: http://lists.gnu. ... -05/msg00001.html

> I believe Bertrand, as groff maintainer, has to initiate the
> copyright assignment process.


He's subscribed to bug-groff, which gets copies of all savannah-generated email, but I'm explicitly adding him to this bug's cc in case his mail reader gives more visibility to mail directly from savannah than from bug-groff.

Dave <barx>
Group Member
Sat 17 Feb 2024 12:35:20 AM UTC, comment #14: 

comment #6:

> a first cut that simply checks whether bash is available and
> bails gracefully if not.


With no objection in the past two weeks, I'm calling that a ringing endorsement of this plan!

> Four years ago, James K. Lowden volunteered to do this
> (http://lists.gnu. ... -04/msg00071.html).  I'm adding
> him to the cc to see if he's still up for this.


James, with the man page text already written (see the last paragraph in comment #11), are you willing do this markup?  This is a considerably simpler task than writing a man page from scratch, but perhaps a less appealing one to you.  I can take this on, but I've never used man markup, whereas someone familiar with it could knock this out quickly.

Dave <barx>
Group Member
Tue 06 Feb 2024 05:43:56 PM UTC, comment #13: 


comment #12:

> comment #11:
> > There's no copyright affixed to the script, but I can add one and
> > slap on a GPL notice if that would help.  Let me know.  There'll
> > probably have to be a copyright assignment to the Free Software
> > Foundation as well.  I don't keep up with the legalities, I'm afraid.
>
> Nor I; someone more conversant with licensing will have to address this.  I only brought it up as part of a list of potential obstacles I could see to getting it into the package.


I've put a copyright notice (2024--I can't remember when I wrote the damned thing) and GPL licence on the script and uploaded it to
https://www.schaf ... n/install-font.sh

Whoever wants to can grab it from there.  I believe Bertrand, as groff maintainer, has to initiate the copyright assignment process.

Peter Schaffter <PTPi>
Group Member
Tue 06 Feb 2024 07:17:39 AM UTC, comment #12: 

comment #11:

> There's no copyright affixed to the script, but I can add one and
> slap on a GPL notice if that would help.  Let me know.  There'll
> probably have to be a copyright assignment to the Free Software
> Foundation as well.  I don't keep up with the legalities, I'm afraid.


Nor I; someone more conversant with licensing will have to address this.  I only brought it up as part of a list of potential obstacles I could see to getting it into the package.  I don't know what if anything needs to be done here.  My naïve assumption would be that whatever was done to get -mom in would be sufficient.

> FWIW, a manpage is already written as a heredoc in the script.
> All it needs is to be marked up.


More good news!

Dave <barx>
Group Member
Sun 04 Feb 2024 05:43:20 PM UTC, comment #11: 

comment #10:
 

> The potential downside depends on whether Peter wants to continue to maintain his script separately, which would make the groff git version a fork that will then not automatically pick up any changes Peter makes to his copy.  But he may be willing to make the git code the authoritative version, and simply mirror that on his site (until, presumably, it's part of an official groff release).


I'd be happy to have someone else maintain the script, so yes, pillage and plunder, add it to groff and make that version authoritative.
 

> I also don't know what license covers the script (neither the page that hosts the script (linked in comment #0), nor the source code itself, mentions one), but my presumption is that it would be licensed the same as -mom herself, which is GPLed.


There's no copyright affixed to the script, but I can add one and slap on a GPL notice if that would help.  Let me know.  There'll probably have to be a copyright assignment to the Free Software Foundation as well.  I don't keep up with the legalities, I'm afraid.

FWIW, a manpage is already written as a heredoc in the  script.  All it needs is to be marked up.

Peter Schaffter <PTPi>
Group Member
Sat 03 Feb 2024 10:45:22 PM UTC, comment #10: 

Great!  I guess now it's a matter of seeing if anyone has objections to the plan.

The upside that I see is that once the current install-font is under groff's git, changes to make it more POSIX-compliant can be made incrementally, rather than having to do that all at once as a prerequisite for even getting it into git.  (As far as I know, doing this work shouldn't make it any less bash-compatible, but perhaps traps lie there that I'm unaware of.)

The potential downside depends on whether Peter wants to continue to maintain his script separately, which would make the groff git version a fork that will then not automatically pick up any changes Peter makes to his copy.  But he may be willing to make the git code the authoritative version, and simply mirror that on his site (until, presumably, it's part of an official groff release).

I also don't know what license covers the script (neither the page that hosts the script (linked in comment #0), nor the source code itself, mentions one), but my presumption is that it would be licensed the same as -mom herself, which is GPLed.

Peter, would you care to address the above two points?

Dave <barx>
Group Member
Sat 03 Feb 2024 09:48:41 PM UTC, comment #9: 

comment #7:

> Kurt, do the points above and in comment #6 make a first cut seem more manageable?


Yes.

T. Kurt Bond <tkurtbond>
Sat 03 Feb 2024 05:22:45 PM UTC, comment #8: 

comment #6:

> > * Write some test cases to ensure it works as expected
>
> It's possible Peter Schaffter, the script's developer, has some he's used privately and would be willing to share.  Putting him on cc as well.


Sorry, no test cases, just the 500+ fonts I've installed successfully with the script.

Peter Schaffter <PTPi>
Group Member
Sat 03 Feb 2024 02:32:08 AM UTC, comment #7: 

Branden mentioned two more to-do items in the email cited in comment #5:

  • giving it a less name-space-stomperific name ("groff-font-install" or "groff-install-font" would be clear enough, but I think either would annoy me [and other users] when tab-completing "groff")
  • giving distribution packaging folks enough guidance that they will understand how to correctly call our tool from their package triggers or "postinst"s or similar

The first of these is trivial.  The second seems worthwhile but shouldn't be a barrier to getting something out the door that users can use.  In fact, if others agree there's value in deferring the task of POSIXifying the entire script, writing distro-facing documentation should probably depend on that.

Kurt, do the points above and in comment #6 make a first cut seem more manageable?

Dave <barx>
Group Member
Sat 03 Feb 2024 02:10:30 AM UTC, comment #6: 

original submission:

> * Make the script portable by removing dependencies on
> bash-specific features


I'm now wondering if there's some wisdom to doing a first cut that simply checks whether bash is available and bails gracefully if not.  This would leave some users out in the cold, but it would serve a lot of them, and that's got to be an improvement over serving none.  And it wouldn't require a bash install dependency for groff, just a run-time one for one groff utility that provides functionality groff didn't provide before anyway.

> * Write a man page


Four years ago, James K. Lowden volunteered to do this (http://lists.gnu. ... -04/msg00071.html).  I'm adding him to the cc to see if he's still up for this.  Divide and conquer!

> * Write some test cases to ensure it works as expected


It's possible Peter Schaffter, the script's developer, has some he's used privately and would be willing to share.  Putting him on cc as well.

Dave <barx>
Group Member
Sat 28 May 2022 01:53:08 AM UTC, comment #5: 

Some commentary about this at http://lists.gnu. ... -05/msg00051.html

Dave <barx>
Group Member
Wed 02 Mar 2022 07:44:33 PM UTC, comment #4: 

Sorry, things have been busy.  I intend to devote more time to this soon.

T. Kurt Bond <tkurtbond>
Wed 02 Mar 2022 07:40:38 PM UTC, comment #3: 

Any word on this, Kurt?

G. Branden Robinson <gbranden>
Group administrator
Mon 23 Aug 2021 03:52:52 PM UTC, comment #2: 

T. Kurt Bond has graciously volunteered to tackle this!  http://lists.gnu. ... -07/msg00105.html

Savannah won't let me assign this ticket to him -- he probably needs to be a member of the project first -- but I am setting it to "In Progress."

Dave <barx>
Group Member
Sat 17 Jul 2021 01:21:06 AM UTC, comment #1: 

original submission:

> * Further discussion of tasks and links to previous discussion: https://lists.gnu ... -07/msg00065.html


This also suggests this item would be suitable for someone without deep groff knowledge to work on.

T. Kurt Bond <tkurtbond>
Sat 17 Jul 2021 12:14:11 AM UTC, original submission:  

Script location: https://www.schaf ... html#install-font

Use of the install-font.sh script makes installing fonts for groff much, much easier.  It should be integrated into groff.

Preliminary Tasks


and downthread; thread continues, not linked to the previous one, at
http://lists.gnu. ... -05/msg00000.html

  • Write a man page
  • Write some test cases to ensure it works as expected


Mailing List Discussion


T. Kurt Bond <tkurtbond>

 

Attached Files

Attached Files
file #57670:  ttffontinstall.tgz added by deri (110KiB - application/x-compressed-tar)
file #57671:  ttffontinstall.pdf added by deri (192KiB - application/pdf)
file #57672:  ttffontinstall.pl added by deri (23KiB - application/x-perl)
file #57645:  ttffontinstall.pdf added by deri (147KiB - application/pdf)
file #57646:  test-groff added by deri (1.6KiB - application/octet-stream)
file #57643:  ttffontinstall.pl added by deri (18KiB - application/x-perl)
file #57644:  ttffontinstall.1 added by deri (24KiB - application/x-troff-man)

(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 deri (Updated the item)
  • -email is unavailable- added by PTPi (Posted a comment)
  • -email is unavailable- added by barx (see comment #6)
  • -email is unavailable- added by barx (see comment #6)
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by barx (Posted a comment)
  • -email is unavailable- added by tkurtbond (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 21 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-11-14 gbranden Planned ReleaseNone 1.24.0
    2025-11-14 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2025-11-14 gbranden Dependencies- bugs #65099 is dependent
    2025-11-14 gbranden SummaryIntegrate Peter Schaffter's &quot;install-font.sh&quot; font installer script into groff integrate Peter Schaffter's "install-font.sh" font installer script into groff
    2025-11-14 gbranden StatusNeed Info In Progress
        SummaryIntegrate Peter Schaffter's font installer script into groff Integrate Peter Schaffter's "install-font.sh" font installer script into groff
    2025-10-15 gbranden StatusIn Progress Need Info
        Assigned toNone gbranden
    2025-09-21 deri Attached File- Added ttffontinstall.pl, #57672
    2025-09-21 deri Attached File- Added ttffontinstall.tgz, #57670
        Attached File- Added ttffontinstall.pdf, #57671
    2025-09-13 deri Attached File- Added ttffontinstall.1, #57644
        Attached File- Added ttffontinstall.pdf, #57645
        Attached File- Added test-groff, #57646
    2025-09-13 deri Attached File- Added ttffontinstall.pl, #57643
    2025-06-04 barx Carbon-CopyRemoved bgarrigues -
    2024-02-17 barx Carbon-Copy- Added bgarrigues
    2024-02-03 barx Carbon-Copy- Added ptpi
        Carbon-Copy- Added -email is unavailable-
    2021-08-23 barx StatusNone In Progress

    Back to the top

    Powered by Savane 3.16-598c.
    Corresponding source code