Previous: Changing Type Sizes, Up: Sizes [Contents][Index]
A scaled point is equal to 1/sizescale points, where
sizescale is specified in the DESC file (1 by
default). There is a new scale indicator ‘z’, which has the effect
of multiplying by sizescale. Requests and escape sequences in
gtroff
interpret arguments that represent a point size as being
in units of scaled points, but they evaluate each such argument using a
default scale indicator of ‘z’. Arguments treated in this way are
the argument to the ps
request, the third argument to the
cs
request, the second and fourth arguments to the tkf
request, the argument to the \H
escape sequence, and those
variants of the \s
escape sequence that take a numeric expression
as their argument (see below).
For example, suppose sizescale is 1000; then a scaled point is equivalent to a millipoint; the request ‘.ps 10.25’ is equivalent to ‘.ps 10.25z’ and thus sets the point size to 10250 scaled points, which is equal to 10.25 points.
gtroff
disallows the use of the ‘z’ scale indicator in
instances where it would make no sense, such as a numeric expression
whose default scale indicator was neither ‘u’ nor ‘z’.
Similarly it would make no sense to use a scaling indicator other than
‘z’ or ‘u’ in a numeric expression whose default scale
indicator was ‘z’, and so gtroff
disallows this as well.
There is also new scale indicator ‘s’, which multiplies by the number of units in a scaled point. So, for example, ‘\n[.ps]s’ is equal to ‘1m’. Be sure not to confuse the ‘s’ and ‘z’ scale indicators.
A read-only number register returning the point size in scaled points.
.ps
is associated with the current environment
(see Environments).
The last-requested point size in scaled points is contained in the
.psr
read-only number register. The last requested point size in
points as a decimal fraction can be found in .sr
. This is a
string-valued read-only number register.
Note that the requested point sizes are device-independent, whereas the
values returned by the .ps
and .s
registers are not. For
example, if a point size of 11pt is requested, and a sizes
request (or a sizescale
line in a DESC file) specifies
10.95pt instead, this value is actually used.
Both registers are associated with the current environment (see Environments).
The \s
escape has the following syntax for working with
fractional type sizes:
\s[n]
\s'n'
Set the point size to n scaled points; n is a numeric expression with a default scale indicator of ‘z’.
\s[+n]
\s[-n]
\s+[n]
\s-[n]
\s'+n'
\s'-n'
\s+'n'
\s-'n'
Increase or or decrease the point size by n scaled points; n is a numeric expression (which may start with a minus sign) with a default scale indicator of ‘z’.
See Font Files.
Previous: Changing Type Sizes, Up: Sizes [Contents][Index]