bug-groff
[Top][All Lists]
Advanced

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

[bug #61561] [grotty] 'sgr' device control command takes effect only at


From: G. Branden Robinson
Subject: [bug #61561] [grotty] 'sgr' device control command takes effect only at page breaks
Date: Thu, 25 Nov 2021 23:07:01 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Update of bug #61561 (project groff):

                  Status:                    None => Need Info              
             Assigned to:                    None => gbranden               
                 Summary: [grotty] 'sgr' device control command seems to
simply not work => [grotty] 'sgr' device control command takes effect only at
page breaks

    _______________________________________________________

Follow-up Comment #3:

Good news!  The feature isn't _quite_ as broken as I thought.

I noticed that even with groff -P-c, SGR sequences were getting enabled
seemingly instantly, in spite of the option being initially honored.

You _can_ dynamically change SGR enablement within a document.

At a page break.

Not a word break.  Not an output line flush.

Not even after vertical space.

A page break.

It seems that the state of SGR at the bottom of the page (when it gets
ejected?) is the one that wins.

This doesn't really change my mind about the non-usefulness of the
feature--almost anybody who wants dynamic control of overstriking vs. SGR
sequences is going to want finer-grained resolution than this--but it does
partially invalidate my analysis.  I'll see if I can find in the code how the
fonts get re-initialized, or what exactly is going on there.

Here's input and a hex dump from an instrumented groff Git HEAD.  (The output
in the initial report was from Debian's groff 1.22.4.)


$ cat EXPERIMENTS/grotty-smaller-sgr.groff 
.de Ts
test
\fRR\fBB\fII\f(BIX\fRR
.br
..
init
.br
.ft B
.Ts
.ft I
.Ts
.bp
\X'tty: sgr'\c
.ft B
.Ts
.bp
\X'tty: sgr 0'\c
.ft B
.Ts


I encourage the reader to substitute 'fl', 'sp', or any request of their
choice for those 'bp's.


$ ./build/test-groff -b -ww -P-c -Tascii EXPERIMENTS/grotty-smaller-sgr.groff
|xxd
grotty: debug: turning overstriking drawing scheme ON
grotty:<standard input>:59: debug: turning overstriking drawing scheme OFF
grotty:<standard input>:86: debug: turning overstriking drawing scheme ON
00000000: 696e 6974 0a74 0874 6508 6573 0873 7408  init.t.te.es.st.
00000010: 7420 5242 0842 5f08 495f 0858 0858 520a  t RB.B_.I_.X.XR.
00000020: 5f08 745f 0865 5f08 735f 0874 2052 4208  _.t_.e_.s_.t RB.
00000030: 425f 0849 5f08 5808 5852 0a0a 0a0a 0a0a  B_.I_.X.XR......
00000040: 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a  ................
00000050: 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a  ................
00000060: 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a  ................
00000070: 0a0a 0a0a 0a0a 0a0a 0a0a 1b5b 316d 7465  ...........[1mte
00000080: 7374 201b 5b32 326d 521b 5b31 6d42 1b5b  st .[22mR.[1mB.[
00000090: 346d 1b5b 3232 6d49 1b5b 316d 581b 5b32  4m.[22mI.[1mX.[2
000000a0: 346d 1b5b 3232 6d52 0a0a 0a0a 0a0a 0a0a  4m.[22mR........
000000b0: 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a  ................
000000c0: 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a  ................
000000d0: 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a  ................
000000e0: 0a0a 0a0a 0a0a 0a0a 0a0a 7408 7465 0865  ..........t.te.e
000000f0: 7308 7374 0874 2052 4208 425f 0849 5f08  s.st.t RB.B_.I_.
00000100: 5808 5852 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a  X.XR............
00000110: 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a  ................
00000120: 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a  ................
00000130: 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a 0a0a  ................
00000140: 0a0a 0a0a 0a0a                           ......


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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