URL:
  <https://savannah.gnu.org/bugs/?67038>

                 Summary: [troff] `.b` register doesn't resolve the
environment's selected font
                   Group: GNU roff
               Submitter: gbranden
               Submitted: Mon 21 Apr 2025 02:00:22 AM GMT
                Category: Core
                Severity: 3 - Normal
              Item Group: Incorrect behaviour
                  Status: In Progress
                 Privacy: Public
             Assigned to: gbranden
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Mon 21 Apr 2025 02:00:22 AM GMT By: G. Branden Robinson <gbranden>
See bug #64166 for background.


$ printf 'foo\n.tm .b=\\n(.b\n.bd TR 10\n.tm .b=\\n(.b\nbar\n' | groff -z
.b=0
.b=0
$ printf 'foo\n.tm .b=\\n(.b\n.bd TR 10\n.tm .b=\\n(.b\nbar\n' |
~/groff-1.23.0/bin/groff -z
.b=0
.b=0
$ printf 'foo\n.tm .b=\\n(.b\n.bd TR 10\n.tm .b=\\n(.b\nbar\n' |
~/groff-1.22.4/bin/groff -z
.b=0
.b=0
$ printf 'foo\n.tm .b=\\n(.b\n.bd TR 10\n.tm .b=\\n(.b\nbar\n' |
~/groff-1.22.3/bin/groff -z
.b=0
.b=0


While the "emboldening amount" of a font is a property of the elements of the
global font table (the list of mounting positions and their associated font
descriptions and other properties), the emboldening amount you can get at with
the `.b` register is environment-specific.

Unfortunately it's not coded that way, and, in GNU _troff_, may never have
been.

The implementation leads to a discrepancy in how `.b`'s value is reported
between GNU _troff_ and DWB and Heirloom Doctools _troff_.

Fortunately I see how to fix it.

There is a workaround: explicitly selected the resolved name of the current
font.

The following illustrates the workaround (and bug #64166 affecting _groff_
1.23.0).


$ printf 'foo\n.tm .b=\\n(.b\n.bd TR 10\n.tm .b=\\n(.b\nbar\n.ft TR\n.tm
.b=\\n(.b\n' | ~/groff-HEAD/bin/groff -z
.b=0
.b=0
.b=10
$ printf 'foo\n.tm .b=\\n(.b\n.bd TR 10\n.tm .b=\\n(.b\nbar\n.ft TR\n.tm
.b=\\n(.b\n' | ~/groff-1.23.0/bin/groff -z
.b=0
.b=0
.b=0
$ printf 'foo\n.tm .b=\\n(.b\n.bd TR 10\n.tm .b=\\n(.b\nbar\n.ft TR\n.tm
.b=\\n(.b\n' | ~/groff-1.22.4/bin/groff -z
.b=0
.b=0
.b=10
$ printf 'foo\n.tm .b=\\n(.b\n.bd TR 10\n.tm .b=\\n(.b\nbar\n.ft TR\n.tm
.b=\\n(.b\n' | ~/groff-1.22.3/bin/groff -z
.b=0
.b=0
.b=10









    _______________________________________________________

Reply to this item at:

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

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

Attachment: signature.asc
Description: PGP signature

Reply via email to