bugGNU roff - Bugs: bug #65974, [groff/configure] add font path,...

 
 

bug #65974: [groff/configure] add font path, $XDG_DATA_HOME/fonts to groff.m4

Submitter:  Morten Bo Johansen <mortenbo>
Submitted:  Wed 10 Jul 2024 06:41:40 PM UTC
   
 
Category:  General Severity:  3 - Normal
Item Group:  Build/Installation Status:  Need Info
Privacy:  Public Assigned to:  deri
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 11 Jul 2024 07:23:14 PM UTC, comment #4: 

Okay. The groff configure script did not find the fonts on my Arch Linux system, even though I have the ghostscript package installed.
Therefore I installed these urw-base35 fonts manually and as always when I install something outside of the package system, I prefer to do it in my home directory. The solution with the groff.m4 file at least worked for me, even if it may not be the correct solution.
Now, I noticed that the type 1 fonts actually are included in the Arch ghostscript package, but they lack the *.t1 extension which I suppose is the reason that the groff configure script doesn't see them.

Morten Bo Johansen <mortenbo>
Thu 11 Jul 2024 06:04:47 PM UTC, comment #3: 

comment #2:

> The Foundry file is generated from the groff.m4 file,


That's not the case.  It is constructed during make by a Perl script called "BuildFoundries", which you can find here (groff 1.23.0 version).

https://git.savannah.gnu.org/cgit/groff.git/tree/font/devpdf/util/BuildFoundries.pl?h=1.23.0

As you may guess from the file name, the script that actually runs is also constructed during make.

https://git.savannah.gnu.org/cgit/groff.git/tree/font/devpdf/devpdf.am?h=1.23.0#n68

> so all that is needed is to add the paths to that file.


Not the case, and we've had bugs crop up before when we failed to keep "groff.m4" and "BuildFoundries.pl" in sync.

https://git.savannah.gnu.org/cgit/groff.git/commit/?id=0f6c779cf4f18457a60cb06b774009670ab90c4b
https://git.savannah.gnu.org/cgit/groff.git/commit/?id=b379382ea6f91dc2408973db8eb284d56255580b

G. Branden Robinson <gbranden>
Group administrator
Thu 11 Jul 2024 10:38:21 AM UTC, comment #2: 

The Foundry file is generated from the groff.m4 file, so all that is needed is to add the paths to that file. I attach a patch which also includes the $HOME/.fonts directory which is also a standard location for user installed fonts. In the groff m4 setup, shell environment variables are expanded.

(file #56261)

Morten Bo Johansen <mortenbo>
Thu 11 Jul 2024 06:33:13 AM UTC, comment #1: 

I like this idea but there's a tricky element to it you already discovered.

We try to keep the URW font search path consistent between our "configure" script and the generated Foundry file.

We can't use a shell-like environment variable dereference in "Foundry" itself; the file format admits no such syntax.

So what we'll have to do is perform the environment variable interpolation when generating "Foundry" from "Foundry.in" during the build.

Deri is pretty involved with this part of the system because of his gropdf work.  In fact I think he and/or Werner Lemberg developed groff's foundry feature in the first place.

Looping him in for his perspective.

G. Branden Robinson <gbranden>
Group administrator
Wed 10 Jul 2024 06:41:40 PM UTC, original submission:  

The ./configure script didn't find the urw-base35-fonts:
 
  configure: URW fonts in Type 1/PFB format were not found

They were installed, however, in $XDG_DATA_HOME/fonts which usually equals $HOME/.local/share/fonts. Editing the file, ../font/devpdf/Foundry.in to add the path produced no result, but adding the path to groff.m4 did. So I suggest that this path be added to groff.m4 as it is a standard installation location for user installed fonts.

Morten Bo Johansen <mortenbo>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #56261:  groff.m4.patch added by mortenbo (388B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    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.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-07-11 mortenbo Attached File- Added groff.m4.patch, #56261
    2024-07-11 gbranden StatusNone Need Info
        Assigned toNone deri

    Back to the top

    Powered by Savane 3.15-26b0.
    Corresponding source code