Article View: comp.lang.postscript
Article #8040Re: backspacing letters
From: Glenn Reid
Date: Sat, 25 Feb 1989 01:24
Date: Sat, 25 Feb 1989 01:24
58 lines
2226 bytes
2226 bytes
In article <1281@ccncsu.ColoState.EDU> beaty@handel.colostate.edu.UUCP (Billy Bad Ass) writes:
>i'm trying to modify a font so that the control-H backspaces along with
>printing nothing. this will allow me to print UNIX man pages and the
>like without having to search the file for control-H's. here is how
>i'm trying using the example on pp 99-100 in the "red book". i can get
>'normal' letters to backspace, like the '/one' in the following
>example; how do i specify control-H in the place of the '/one'? if
>there is an easier way to get control-H to backspace, please let me
>know at the following address
Steve,
I tried to get mail through to you on this, but it bounced several
times, and since you've posted teh question, I'll just post my
answer....
It just so happens that my brother and I put this backspace font
together for a project he was working on, and it seems to work pretty
well, although some of the naming is probably less general than it
should be.
Enjoy,
Glenn Reid
Adobe Systems
----------------------------- cut ---
%!
%Title: backspacefont.ps
/backspacefont {
/Courier findfont dup length dict begin
{ %forall
1 index /FID eq { pop pop } { def } ifelse
} forall
currentdict /UniqueID known { %if
/UniqueID UniqueID 16#800000 xor def
} if
CharStrings length 1 add dict begin
CharStrings { def } forall
/backspace { -600 0 setcharwidth } bind def
currentdict
end
/CharStrings exch def
/Encoding Encoding 256 array copy def
Encoding 8 /backspace put
currentdict
end
definefont
} bind def
/CourierBack backspacefont
/CourierBack findfont 48 scalefont setfont
100 600 moveto
(ABC\b\b\b___DEF underline\b_\b_\b_\b_\b_\b_\b_\b_\b_) show
showpage
Technical Details
Message-ID:
<525@adobe.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!adobe!greidReferences:
<1281@ccncsu.ColoState.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!adobe!greid From: greid@adobe.com (Glenn Reid) Newsgroups: comp.lang.postscript Subject: Re: backspacing letters Message-ID: <525@adobe.UUCP> Date: 25 Feb 89 01:24:23 GMT References: <1281@ccncsu.ColoState.EDU> Sender: news@adobe.COM Reply-To: greid@adobe.COM (Glenn Reid) Organization: Adobe Systems Incorporated, Mountain View Lines: 58