bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #65619] [afmtodit] want a default value for space width if unspecif


From: G. Branden Robinson
Subject: [bug #65619] [afmtodit] want a default value for space width if unspecified
Date: Wed, 1 May 2024 18:50:07 -0400 (EDT)

Update of bug #65619 (group groff):

                Severity:              3 - Normal => 1 - Wish               
                  Status:                    None => Invalid                
             Assigned to:                    None => gbranden               
             Open/Closed:                    Open => Closed                 
                 Summary: Provide a default value for afmtodit(1) -w, when
unspecified => [afmtodit] want a default value for space width if unspecified

    _______________________________________________________

Follow-up Comment #2:

Looks like Deri's right.

Lines 28-37 and 485-487 seem to do this work.

https://git.savannah.gnu.org/cgit/groff.git/tree/src/utils/afmtodit/afmtodit.pl?h=1.23.0#n28
https://git.savannah.gnu.org/cgit/groff.git/tree/src/utils/afmtodit/afmtodit.pl?h=1.23.0#n485

Closing as invalid; the desired behavior is already present in _groff_ 1.23.0,
and in fact it looks like I'm the one who implemented it, back in November
2022, though I have no recollection of putting in the logic to deduce it from
the hash first.


commit 5a5a447b2a834f92112609a67821c1a37fdc66cd
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Nov 11 15:49:24 2022 -0600

    [afmtodit]: Implement "-w" command-line option.
    
    * src/utils/afmtodit/afmtodit.pl: Add new command-line option to specify
      the generated font description's "spacewidth" parameter; in commit
      bf7f6862c3, 2021-09-24, I made libgroff complain if this directive is
      missing (since any font, even a "special" one, can be selected as
      current and the formatter's behavior when encountering an input space
      should be well-defined under that circumstance).  Adding this option
      enables a well-formed font description to be produced.
    
    * src/utils/afmtodit/afmtodit.pl (usage):
    * src/utils/afmtodit/afmtodit.1.man (Synopsis, Options): Document it.
    
    * NEWS: Add item.


The other half of this is that output drivers will compute a space width even
if the font description files generated by _afmtodit_(1) lack them.


commit bf7f6862c384f9cff80737cccf6b8fafd4197e1c
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Sep 24 17:48:26 2021 +1000

    [libgroff]: Make `spacewidth` mandatory.
    
    * src/libs/libgroff/font.cpp (font::load): Throw error if a font
      description file is missing a `spacewidth` directive, since it is now
      re-documented as mandatory.  Atypically, we don't return false in this
      scenario; instead we proceed with the existing logic to compute a
      space width for the font based on typical practices for Western
      alphabetic fonts (see, e.g., <https://type.today/en/journal/spaces>.
    
    Thanks to Deri James for the discussion.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65619>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]