groff
[Top][All Lists]
Advanced

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

Re: [groff] vertical resolution and page location traps


From: Tadziu Hoffmann
Subject: Re: [groff] vertical resolution and page location traps
Date: Sat, 16 Jun 2018 00:42:47 +0200
User-agent: Mutt/1.9.1 (2017-09-22)

> > The actual numbers returned under various conditions add only more
> > confusion.
> > 
> > $ groff -Tascii <<< '.tm \n(.V' > /dev/null
> > 40
> > $ groff -Tps <<< '.tm \n(.V' > /dev/null
> > 1
> > $ groff -Tpdf <<< '.tm \n(.V' > /dev/null
> > 1
> > 
> > I don't see how the vertical resolution of the ascii device can be
> > 40 times that of the ps and pdf devices.

> It's the opposite.  A ps driver has 40 times larger resolution
> than the ASCII device.

It's a bit more complicated because devps and devascii use
a different basic unit size.  The size of the basic unit is
given by the "res" entry in the device description file DESC:

  devascii:  res =   240 basic units / inch
  devps:     res = 72000 basic units / inch

Positions on the page are calculated in terms of these units,
but the device cannot necessarily actually position with this
resolution, but only "hor" resp. "vert" multiples of this
(positions get rounded to these multiples on output):

  devascii:  hor = 24, vert = 40
  devps:     hor =  1, vert =  1

So the positioning granularity of devascii is

  40/240 in =  1/6 in = 0.166667 in  vertically
  24/240 in = 1/10 in = 0.100000 in  horizontally

(i.e., devascii does 6 lines per inch vertically
and 10 characters per inch horizontally),
and that of devps is

  1/72000 in = 0.0000138889 in

(both vertically and horizontally).

(For devps, this specifies the granularity with which
coordinates are passed to the Postscript interpreter.
The actual resolution of the printer may be lower.)





reply via email to

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