Path: utzoo!attcan!uunet!mcvax!ukc!eagle!icdoc!qmc-cs!liam
From: liam@cs.qmc.ac.uk (William Roberts)
Newsgroups: comp.lang.postscript
Subject: Re: PostScript problems
Summary: some answers, some no-you-can'ts
Message-ID: <529@sequent.cs.qmc.ac.uk>
Date: 4 Jul 88 17:46:39 GMT
References: <5@phys0.anu.oz>
Reply-To: liam@cs.qmc.ac.uk (William Roberts)
Organization: Computer Science Dept, Queen Mary College, University of London, UK.
Lines: 62
Expires:
Sender:
Followup-To:
Distribution:
Keywords:

In article <5@phys0.anu.oz> bill@phys0.anu.oz writes:
>both of which are probably PostScript design limitation problems

A chisel can be used for opening tins of paint - are you using
PostScript wrongly?

>I would like to draw one diagram over the top of another diagram
>and where the second diagram's blackened pixels intersect the blackened
>pixels of the first diagram I would like to do an exclusive or of the pixels
>(to produce a whitened pixel).
> As an example of this, consider the following
...
>gsave
>  diagram1 strokepath clip
>  gsave diagram 1 setgray stroke grestore
>grestore

Correct, the way to do this kind of thing is buy use of
clipping. There is a gap in Adobe PostScript however; you can't
ask for an "imagepath" and so you can't clip in/out using an
image rather than an outline.

>What I would like is use part of the frame buffer assembled so far
>as input to the imagemask operator

Not all PostScript devices have framebuffers, e.g. the big
Linotronic machines.

>The second problem is this: what I would like to be able to do is a proper
>"solid shadowing" of a font with cross-connecting lines between the front
>of the character and its shadow.

This does have severe hidden-line problems and clipping is
going to be an awkward way of dealing with it, especially since
you can't get at the path descriptions for characters. I would
give up on this one...

>Another thing I would like to do with a font is draw a
>proper outline of a character around an original black filled version of the
>character (with white inbetween).

I can do this! Use charpath to get outline of the character and
then stroke it a) with a wide black line, then b) with a
silghtly thinner white line, then draw the character itself.
The stroke operator does exactly the "thick edging" you
require, though unfortunately the results of "strokepath" isn't
suitable for clipping.

>I have always regarded the omission of a dotless j from the Adobe fonts
>a serious omission. Has anybody ever properly overcome this omission?

Clipping again. Experiment with big copies of ordinary j to
find out a rough bounding rectangle for the j stem without the
dot, then create a new character which first clips to that
region and then draws an ordinary j. Hey presto, the clipping
removes the unwanted dot.

-- 

William Roberts         ARPA: liam@cs.qmc.ac.uk  (gw: cs.ucl.edu)
Queen Mary College      UUCP: liam@qmc-cs.UUCP
LONDON, UK              Tel:  01-975 5250