Re: Novel use of .char

2024-12-18 Thread Deri
On Wednesday, 18 December 2024 12:36:13 GMT Tadziu Hoffmann wrote: > > I wrote "pdf: pdfpic" to mimic the behaviour of .PSPIC, > > render image down from current point, [...] > > The above difference means this works for pdf:- > > > > .char \[gnu] \v'-9p'\X'pdf: pdfpic GNU-head-small.pdf -L 10p'

Re: Novel use of .char

2024-12-18 Thread Tadziu Hoffmann
> I wrote "pdf: pdfpic" to mimic the behaviour of .PSPIC, > render image down from current point, [...] > The above difference means this works for pdf:- > > .char \[gnu] \v'-9p'\X'pdf: pdfpic GNU-head-small.pdf -L 10p'\h'10p' > A GNU head \[gnu] image. Thanks for the feedback! This solut

Re: Novel use of .char

2024-12-18 Thread Deri
On Wednesday, 18 December 2024 00:14:38 GMT Tadziu Hoffmann wrote: > If the former, then it seems a pretty roundabout way of achieving > the purpose. For example, using the ps device, the following is > sufficient: > > .char \[gnu] \X'ps: import GNU-head-small.ps 0 0 25 22 1'\h'10p' > A G

Re: Novel use of .char

2024-12-17 Thread Peter Schaffter
On Wed, Dec 18, 2024, Tadziu Hoffmann wrote: > > > Putting the motions in the diversion was how I went about it first. > > When that didn't pan out, I went the string route, which was when I > > discovered the diversion needed an actual glyph in it in order to > > work as I hoped. > > Just out of

Re: Novel use of .char

2024-12-17 Thread G. Branden Robinson
At 2024-12-18T01:04:58+0100, Tadziu Hoffmann wrote: > > Wrapping a diversion inside a character definition is indeed a > > novel thing to do. At first blush, I admire the creativity. > > At second blush, the prescriptivist and black-gloved input > > validator in me recoils. ("Why isn't this banne

Re: Novel use of .char

2024-12-17 Thread Deri
On Tuesday, 17 December 2024 17:52:50 GMT G. Branden Robinson wrote: > > The fundamental requirement for \X is that it remains in the > > chronology of the output stream. If there is a colour change before \X > > it needs to occur first, if there are word gaps before the \X, they > > should be outp

Re: Novel use of .char

2024-12-17 Thread Tadziu Hoffmann
> Putting the motions in the diversion was how I went about it first. > When that didn't pan out, I went the string route, which was when I > discovered the diversion needed an actual glyph in it in order to > work as I hoped. Just out of curiosity, was displaying the image the only purpose of t

Re: Novel use of .char

2024-12-17 Thread Tadziu Hoffmann
> Wrapping a diversion inside a character definition is indeed a > novel thing to do. At first blush, I admire the creativity. > At second blush, the prescriptivist and black-gloved input > validator in me recoils. ("Why isn't this banned?" he roars.) > My third reaction is as a system designer

Re: Novel use of .char

2024-12-17 Thread Peter Schaffter
On Tue, Dec 17, 2024, G. Branden Robinson wrote: > One thing that itches me a little about using a diversion this way is > that I've documented glyphs as being drawn upward and to the right from > the text baseline. That's not happening here. So either I've > documented the formatter wrong or you

Re: Novel use of .char

2024-12-17 Thread G. Branden Robinson
Hi Peter, At 2024-12-17T13:58:15-0500, Peter Schaffter wrote: > On Tue, Dec 17, 2024, G. Branden Robinson wrote: > > I'm glad Peter raised; now that commit has to fold. :) > > I almost feel guilty for opening this can of worms. :) I was looking > for an explanation for the behaviour, which I ass

Re: Novel use of .char

2024-12-17 Thread Peter Schaffter
On Tue, Dec 17, 2024, G. Branden Robinson wrote: > I'm glad Peter raised; now that commit has to fold. :) I almost feel guilty for opening this can of worms. :) I was looking for an explanation for the behaviour, which I assumed was "correct", my (somewhat) novel mapping of image-to-glyph with .c

Re: Novel use of .char

2024-12-17 Thread G. Branden Robinson
At 2024-12-16T16:35:22+, Deri wrote: > On Sunday, 15 December 2024 23:54:08 GMT G. Branden Robinson wrote: > > Crudely, it _looks_ like the baseline might be getting shifted > > upward by the vertical dimension of the image, as if placement of > > the image-based character "knew" it needed to c

Re: Novel use of .char

2024-12-16 Thread Deri
On Sunday, 15 December 2024 23:54:08 GMT G. Branden Robinson wrote: > Crudely, it _looks_ like the baseline might be getting shifted upward by > the vertical dimension of the image, as if placement of the image-based > character "knew" it needed to compensate for the implicit vertical > motion caus

Re: Novel use of .char

2024-12-15 Thread G. Branden Robinson
Hi Deri, At 2024-12-15T22:58:03+, Deri wrote: > On Sunday, 15 December 2024 20:03:50 GMT G. Branden Robinson wrote: > > I'm not able to reproduce this problem in my working copy--the GNU > > head shows up, if fuzzily--and I haven't frotzed around in the > > formatter since I last pushed. > >

Re: Novel use of .char

2024-12-15 Thread Deri
On Sunday, 15 December 2024 20:03:50 GMT G. Branden Robinson wrote: > At 2024-12-15T16:22:59+, Deri wrote: > > It looks like it is a regression (from 1.23.0) because if I remove the > > "kludge" and change the GNU png to pdf (so it is compatible with > > running 1.23.0) it works in 1.23.0 but i

Re: Novel use of .char

2024-12-15 Thread G. Branden Robinson
At 2024-12-15T16:22:59+, Deri wrote: > It looks like it is a regression (from 1.23.0) because if I remove the > "kludge" and change the GNU png to pdf (so it is compatible with > running 1.23.0) it works in 1.23.0 but is wrong in current. I also > tested using 1.23.0 groff and run the output th

Re: Novel use of .char

2024-12-15 Thread G. Branden Robinson
Hi Deri, At 2024-12-15T16:22:59+, Deri wrote: > On Saturday, 14 December 2024 19:42:00 GMT Peter Schaffter wrote: > > An undocumented use of the .char request is mapping a special > > character to a diversion holding a graphic image so the image can be > > used as a glyph. [...] > > I'm attach

Re: Novel use of .char

2024-12-15 Thread Deri
On Saturday, 14 December 2024 19:42:00 GMT Peter Schaffter wrote: > An undocumented use of the .char request is mapping a special > character to a diversion holding a graphic image so the image can be > used as a glyph. > > === > .\" 1.23.0.2146-d958f-dirty > .\" Build with pdfmom(1); output to pd