groff
[Top][All Lists]
Advanced

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

Re: drawing commands in groff(7) (was: undiagnosed pic error)


From: G. Branden Robinson
Subject: Re: drawing commands in groff(7) (was: undiagnosed pic error)
Date: Tue, 13 Jun 2023 12:30:25 -0500

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

Attachment: thickness.grout
Description: Text document

Attachment: boxed-table-thickness.roff
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

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