[comp.sys.mac.programmer] Full justification on the LaserWriter

grh@rhi.hi.is (Gisli Runar Hjaltason) (03/19/91)

I have been writing a program that does some printing in full justification.
What I do is to count the spaces in a printing line and call SpaceExtra with
the quotient of the pixel number that is needed to fill the line and the
number of spaces. Then I draw the line with TextBegin and TextEnd pictcomments
framing it. This works well when printing to the screen with the Preview driver
or printing to PICT with the Print2Pict driver. It breaks down, however, when
printing with the LaserWriter 6.0 driver. I must be missing something, because
other programs do this.

Thanks in advance.
-- 
==============================================================================
Gisli R. Hjaltason
grh@rhi.hi.is
  Iceland

lippin@skippy.berkeley.edu (The Apathist) (03/19/91)

Recently grh@rhi.hi.is (Gisli Runar Hjaltason) wrote:

> I have been writing a program that does some printing in full
> justification.  What I do is to count the spaces in a printing line
> and call SpaceExtra with the quotient of the pixel number that is
> needed to fill the line and the number of spaces.

Instead of using SpaceExtra, try the Script Manager call DrawJust, as
seen in IM V.  If you have IM VI, or perhaps "Worldwide Software
Overview," (from APDA) you may also want to look at NDrawJust.  If
you're using multiple styles, you should look into PortionText,
described in "Script Manager 2.0," which is also from APDA, or up for
grabs on apple.com.

Yes, you too can be Script Manager compatible for fun and profit, if
you can find the documentation.

					--Tom Lippincott
					  lippin@math.berkeley.edu

	"What use have I for such a quantity of plastic fruit?"
					--attributed to Aristotle