Article View: comp.sys.next.programmer
Article #2021Bobbing for Apples (was How to generate the complete character set)
From: Eric P. Scott
Date: Sat, 12 Dec 1992 07:27
Date: Sat, 12 Dec 1992 07:27
82 lines
2678 bytes
2678 bytes
What do you mean by "complete character set?" Oftentimes a
PostScript font will contain characters that aren't in its
encoding vector. Usually that occurs when it contains more
characters than can be expressed in 8-bit ASCII ... but not
always.
Try displaying the characters in the "Symbol" font by enumerating
ASCII values. Notice that position 240 (decimal) appears blank
[/.notdef].
Now examine the file /NextLibrary/Fonts/Symbol.font/Symbol:
|dup 238 /braceleftbt put
|dup 239 /braceex put
|% dup 240 /apple put
|dup 241 /angleright put
Hey! Something's commented out!
And look at Symbol.afm:
|C 238 ; WX 494 ; N braceleftbt ; B 201 -70 439 926 ;
|C 239 ; WX 494 ; N braceex ; B 201 -80 255 935 ;
|C 241 ; WX 329 ; N angleright ; B 21 -198 302 746 ;
Gee, there's something missing, but look at the end:
|C -1 ; WX 790 ; N apple ; B 56 -3 733 808 ;
[Similarly in the screen afms]
Of course, I would never suggest modifying one of NeXT's
system files :-) :-) :-) , so just Preview (or print) the
attached to see what the "censored" character is.
-=EPS=-
-------
%!PS-Adobe-2.0 EPSF-1.2
%%BoundingBox: 0 0 540 704
%%DocumentFonts: Helvetica Times-Roman Symbol
%%EndComments
gsave 72 216 translate
/Helvetica findfont 18 scalefont setfont
155 470 moveto (Adobe Symbol Font) show
0 setgray
/Times-Roman findfont 12 scalefont setfont
10 440 moveto
32 32 224 {
dup 31 add
currentpoint 4 2 roll
1 exch {
dup (???) cvs dup stringwidth pop 21 exch sub 0 rmoveto show
9 0 rmoveto (?) dup 0 3 index put show pop
14 sub 2 copy moveto
} for
moveto
67 448 rmoveto
} bind for
1 dict begin
/Symbol findfont dup length dict /newdict exch def
{
1 index dup /FID ne {
/Encoding eq { dup length array copy } if
newdict 3 1 roll put
} { pop pop pop } ifelse
} bind forall
newdict /Encoding get 240 /apple put
/A-Symbol newdict definefont pop
end
/A-Symbol findfont 12 scalefont setfont
10 440 moveto
32 32 224 {
dup 31 add
currentpoint 4 2 roll
1 exch {
46 0 rmoveto (?) dup 0 3 index put show pop
14 sub 2 copy moveto
} for
moveto
67 448 rmoveto
} bind for
grestore
showpage
Technical Details
Message-ID:
<1992Dec12.072713.4197@csus.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!umn.edu!csus.edu!newsReferences:
<1992Dec6.121136.22447@u.washington.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!umn.edu!csus.edu!news From: eps@futon.SFSU.EDU (Eric P. Scott) Subject: Bobbing for Apples (was How to generate the complete character set) Message-ID: <1992Dec12.072713.4197@csus.edu> Sender: news@csus.edu Reply-To: eps@cs.sfsu.edu Organization: San Francisco State University References: <1992Dec6.121136.22447@u.washington.edu> Date: Sat, 12 Dec 1992 07:27:13 GMT Lines: 82