bug-groff
[Top][All Lists]
Advanced

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

[bug #59932] allow characters defined with .*char requests to be kerned


From: G. Branden Robinson
Subject: [bug #59932] allow characters defined with .*char requests to be kerned
Date: Thu, 19 Jun 2025 11:52:20 -0400 (EDT)

Follow-up Comment #4, bug #59932 (group groff):

At 2025-06-19T11:10:48-0400, G. Branden Robinson wrote:
> Follow-up Comment #3, bug #59932 (group groff):
>
> At 2025-06-19T03:35:03-0400, Dave wrote:
>> Follow-up Comment #2, bug #59932 (group groff):
>>
>> This is not documented, but another typographical limitation of a
>> .char definition is that it defeats even explicit requests to kern
>> with italic correction.  Observe the typeset output of:
>>
>> .nf
>> (\fIpilaf\fP)
>> (\fIpilaf\fP\/)
>> .char \[af] af
>> (\fIpil\[af]\fP\/)
>
> Slightly altering your input, we can almost as easily illustrate your
> point without requring a PDF viewer.
>
>
> $ cat ATTIC/59932-kerning.groff
> .nf
> \!# line one
> (\fIpilaf\fP)
> \!# line two
> (\fIpilaf\fP\/)
> \!# line three
> .char \[af] af
> (\fIpil\[af]\fP\/)
> $ groff -Z ATTIC/59932-kerning.groff
> x T ps
> x res 72000 1 1
> x init
> p1
> # line one
> x font 5 TR
> f5
> s10000
> md
> DFd
> V12000
> H72000
> t(
> x font 40 TI
> f40
> tpilaf
> f5
> t)
> n12000 0
> # line two
> V24000
> H72000
> t(
> f40
> tpilaf
> f5
> h1960
> t)
> n12000 0
> # line three
> V36000
> H72000
> t(
> f40
> tpilaf
> f5
> t)
> n12000 0
> x trailer
> V792000
> x stop
>
>
> The `h1960` command ("move right by 1960 basic units"), applying the
> italic correction, occurs on line two but not lines one or three.
>
> I then added `.pchar \[af]` to the end of your document, because I
> wanted to inspect the user-defined character's innards, and got the
> following marvelous surprise.
>
>
> special character "af"
> is not translated
> has a macro: "file name": "ATTIC\/59932-kerning.groff", "starting line
> number": 7, "length": 2, "contents": "af", "node list": troff:
> ../src/roff/troff/node.cpp:2549: void dump_node_list(node*): Assertion `n !=
> 0' failed.
> groff: error: troff: Aborted (core dumped)
>
>
> Something for me to look into, then.

One reversion of an overzealous commit of 19 May later:


special character "af"
  is not translated
  has a macro: "file name": "ATTIC\/59932-kerning.groff", "starting line
number": 7, "length": 2, "contents": "af", "node list": [ ]
  special translation: 0
  hyphenation code: 0
  flags: 0 (none)
  ASCII code: 0
  asciify code: 0
  is found
  is transparently translatable
  is not translatable as input
  mode: normal


That suffices to explain the matter.  The italic correction never gets
encoded into the character definition in the first place.  It is
apparently silently discarded.

Inspecting _src/roff/troff/input.h_, I observe that there is no encoding
for italic corrections of either sort.  There are no `ESCAPE_SLASH` or
`ESCAPE_COMMA` symbols.

They could be added; there appears to still be room in C1 controls for
them.  But (A) I'm wondering what else we're omitting from character
definitions, and (B) why we don't warn when perform such omissions.



    _______________________________________________________

Reply to this item at:

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

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

Attachment: signature.asc
Description: PGP signature


reply via email to

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