Contrib,v 1.1.1.1 1995/10/27 01:24:21 bostic Exp

From Gerda Wierda (wierda@ltb.bso.nl)

How about this: A couple of macros that insert postscript text and a couple
of macros that set postscript fonts. These texts are part of an object and
are not superimposed, which makes building picture objects that contain
text possible. like:

================================= test.tex ==================================
\input texdraw

\def\ptext#1{\writeps{ gsave /Times-Roman findfont 46
scalefont setfont (#1) dup stringwidth exch neg 2 div exch neg 2 div
rmoveto show grestore }}

\btexdraw
\move( 0 0)
\move(-1 -1)\rlvec( 2 0)\rlvec( 0 2)\rlvec( -2 0)\rlvec( 0 -2)\lfill f:.8
\move( 0 .2)
\textref h:C v:C
\htext{This is a very long sentence to illustrate my point}
\move( 0 -.2)
\ptext{This is a very long sentence to illustrate my point}
\move( 0 0)
\move(-.5 -.5)\rlvec( 1 0)\rlvec( 0 1)\rlvec( -1 0)\rlvec( 0 -1)\lfill f:.9
\etexdraw

\vfill\eject\end
========================== end of test.tex ==================================

The only thing I have to know is the unit size inside the postscript
environment. It looks as if the postscript unit scale is far smaller than
usual, but I cannot locate easily where to look. 10pt scaled postscript
fonts have to be scaled up another 4.6 or so to become real 10pt.

[ Within \writeps, the scaling is 300 units/inch, while native PS scaling is
  72 bp/inch.  So the "46" to get 10 pt fonts is more precisely 41.66667.
  -- P. Kabal ]
