[comp.lang.postscript] backspaces in strings not working - help!!

dwb@hare.udev.cdc.com (dw block x-4621) (03/15/90)

Help!!  I have a postscript file with \b characters embedded in my text
strings; e.g.,

(I want to underscore _\bX some characters)

According to the red book (PostScript Language Reference Manual), page 23,
this should work.  But when I send the file to our Apple LaserWrite II,
I get a space substituted for each \b.  What's wrong???


------------------------------------------------------------
Dave Block                    E-mail:  dwb@hare.udev.cdc.com
Control Data Corp.            AT&T:    (612) 482-4621

batcheldern@hannah.enet.dec.com (Ned Batchelder) (03/16/90)

> According to the red book (PostScript Language Reference Manual), page 23,
> this should work.  But when I send the file to our Apple LaserWrite II,
> I get a space substituted for each \b.  What's wrong???

Page 23 says that when PostScript gets the characters \ and b together
while reading a string, it will put the ASCII BS character (decimal 8)
into the string that it is building. [Well, it doesn't say that exactly,
but that is what it meant]. And your string does have a backsapce
character in it. Your problem is that your font doesn't know what the
backspace character is, so it simply prints a space (actually, the
.notdef glyph, which is usually the same as a space).

It is possible to define a backspace glyph (that is, a glyph with no
marks that has a negative width), but it only makes sense in a
momospaced font. In a proportional font, there is no way to know what
the width of the previous glyph was.

In general, PostScript fonts do not implement the control characters.
This includes tab, backspace, line feed, carriage return, etc.

Ned Batchelder, Digital Equipment Corp., BatchelderN@Hannah.enet.DEC.com