Hi Bjarni,

At 2023-06-13T16:53:50+0000, Bjarni Ingi Gislason wrote:
>   How does \D't ...' influence the height of the text baseline as it
>   is just changing the "graphic pen" and moving it horizontally (in
>   the air) to its next position?

I don't think the \D't' command has any impact on vertical positioning.

Consider the following input.

.nf
\D't 1p'\[ru]A
\D't 2p'\[ru]A
\D't 4p'\[ru]A
\D't 12p'\[ru]A

I'm attaching the "grout" output "groff -Tps -Z", but one can see from
the "V" commands that the "A" glyphs are regularly spaced vertically, at
multiples of 12,000 basic units, which is consistent with an invariant
12 point vertical spacing.

>   The general interpretation of \D'c x' is to do 'c' and end at
> position x from the starting point.

Yes.

When one is changing the fill color with \D'F', how should the drawing
position be updated?

(One answer is: "don't use the \D'F' drawing command; that's what \M is
for".  But, I would ask that people humor me and answer the question
anyway, since \D'F' is documented in groff 1.22.4 and earlier versions.)

>   How does "tbl" handle its lines' thickness?

Good question!

It draws lines with the \D'l' drawing command, which is not a surprise.

It manages their thickness by storing the type size in a register.  The
"linesize" region option overrides this size.  It then changes the type
size, using that register, before drawing a line, then restores it
afterward.

For other reasons, I suspect GNU tbl to have been one of the first
pieces of groff that Clark wrote.  If I'm right, that might explain why
it uses this method instead of groff's \D't' extension.

If we change \D't' to stop implying motion, we could simplify the groff
input that tbl generates in this respect.

Regards,
Branden
x T ps
x res 72000 1 1
x init
p1
V12000
H72000
md
DFd
s10000
Dt 1000 0
Dl 5000 0
x font 5 TR
f5
tA
n12000 0
V24000
H72000
Dt 2000 0
Dl 5000 0
tA
n12000 0
V36000
H72000
Dt 4000 0
Dl 5000 0
tA
n12000 0
V48000
H72000
Dt 12000 0
Dl 5000 0
tA
n12000 0
x trailer
V792000
x stop
.TS
box;
L.
foo
.TE
.sp
.TS
box linesize(5);
L.
foo
.TE

Attachment: signature.asc
Description: PGP signature

Reply via email to