summaryrefslogtreecommitdiff
path: root/fonts/utilities/t1tools/pfshow.ps
blob: 37e3e388b0632945d5311cd41c83c5ab17d7ed07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
%! print font samples and character sets
/home {leftmargin top moveto} def
/rightmargin {leftmargin} def
/sethome {/top exch def /leftmargin exch def} def
/setfontsize {/fontsize exch def} def
/setrightborder {/rightborder exch def} def
70 740 sethome
20 setfontsize
550 setrightborder
/leading 4 def
/nl {currentpoint exch pop leftmargin exch
	fontsize sub leading sub moveto} def
/hl {currentpoint exch pop leftmargin exch
	fontsize 2 div sub leading sub moveto} def

/fontN {currentfont} def
/fontB {fontN} def
/fontI {fontB} def
/fontBI {fontB} def
/N {fontN setfont} def
/B {fontB setfont} def
/I {fontI setfont} def
/BI {fontBI setfont} def
/pushfont {/fontBI /fontI load def
	/fontI /fontB load def
	/fontB /fontN load def
	/fontN currentfont def
	} def
/nextfonti 0 def
/setnextfont {[/fontN /fontI /fontB /fontBI] nextfonti get currentfont def
	/nextfonti nextfonti 1 add def
	} def

/namefont {currentfont} def
/showtext {
  N
  (Scoloplos ist eury) show odieresis show 
   (k. Er ist in der gesamten borealen Region in fast allen) show nl
  (marinen Sedimenten zu finden, die einen sandigen Anteil aufweisen. Man) show nl
  (findet ihn von ) show B (Gr) show odieresis show (nland ) show 
	N (bis zum ) show I (Mittelmeer) show 
	N (, in der ) show BI (Nordsee) show 
	N (, an der kanadischen) show nl
  (K) show udieresis show (ste und im Wei) show germandbls show
   (en Meer (Markelova 1981).) show nl
  quotedblleft show (Er besiedelt sowohl das ) show guillemotleft show 
   (Eulitoral) show guillemotright show ( als auch das ) show quotedblbase show
   (Bathyal) show quotedblleft show (.) show quotedblright show nl
  quoteleft show (Er besiedelt sowohl das ) show guilsinglleft show 
   (Eulitoral) show guilsinglright show ( als auch das ) show quotesinglbase show
   (Bathyal) show quoteleft show (.) show quoteright show nl
	} def
/showcset {
	[cs0 cs1 cs2 cs3 cs4 cs5 cs6 cs7] {show nl} forall
	currentfont
	currentpoint
	dup fontsize leading add 3 mul add
	% leftmargin 400 add exch moveto
		currentfont /FontName get findfont 70 scalefont setfont
		rightborder (Forqen) stringwidth pop sub exch moveto
		(Forqen) show
	moveto
	setfont
	} def
/showname {currentfont namefont setfont
	dup /FontName get dup length string cvs show
	setfont nl
	} def
/showfont { % param: fontname
	fontsize ff
	home
	showtext
	showname
	showcset
	} def
/showallfonts {
	% /fontlist [ FontDirectory {pop} forall ] def
%	fontlist
%		{dup findfont copyfont definefont pop}
%		forall

	fontlist {fontsize ff setnextfont} forall
	fontlist length 0 ne {home showtext} if
	[fontN fontI fontB fontBI] 0 fontlist length getinterval
	{hl setfont (    ) show showname hl showcset} forall
	} def

/findfont+ {dup findfont
	dup maxlength dict begin
	{1 index dup /FID ne exch /UniqueID ne and
		{def} {pop pop} ifelse} forall
	Encoding StandardEncoding eq
	% pop true	% for unconditional re-encoding
	  {/Encoding Win31+ def} if
	% /Encoding PrestigeElite def
	currentdict end
	definefont
	} def
/ff {exch findfont+ exch dup /fontsize exch def scalefont
	setfont} def

/fontlist [] def
/FontDirectoryKnown FontDirectory dup length 20 add dict copy def
/appendnewfont {
	/fontlist [ fontlist aload pop
	FontDirectoryKnown begin
	FontDirectory
	{FontDirectoryKnown 2 index known {pop pop} {2 copy def pop} ifelse
	} forall
	end
	] def
	} def
/registerfont {run appendnewfont} def

/=dict { % for debugging
	{2 array astore ==} forall
	} def

/fillsample {	% param: name from-code
	32 string dup
	3 -1 roll dup 1 exch 31 add
		{dup 32 mod exch put dup}
		for pop def
	} def
/cs0	0 fillsample
/cs1	32 fillsample
/cs2	64 fillsample
/cs3	96 fillsample
/cs4	128 fillsample
/cs5	160 fillsample
/cs6	192 fillsample
/cs7	224 fillsample

/Win31+ [
% Windows 3.1 character set extended with other common characters,
% nbspace instead of second space, minus instead of second hyphen;
% first 32 positions filled up with additional characters from MacIntosh.
% Windows 3.1 character set is basically an extension of ISO Latin-1 
% with a few deviations.
/NUL /HT /LF /CR /DLE /DC1 /DC2 /DC3 /DC4 /US /RS /DEL
/lessequal /greaterequal /notequal /approxequal /lozenge /apple
/infinity /partialdiff /summation /product /integral /radical
/Delta /Omega /pi 
/breve /dotaccent /hungarumlaut /ogonek /ring 
/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle
/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash
/zero /one /two /three /four /five /six /seven
/eight /nine /colon /semicolon /less /equal /greater /question
/at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O
/P /Q /R /S /T /U /V /W
/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore
/grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o
/p /q /r /s /t /u /v /w
/x /y /z /braceleft /bar /braceright /asciitilde /fraction

/fi /fl /quotesinglbase /florin 
	/quotedblbase /ellipsis /dagger /daggerdbl 
/circumflex /perthousand /Scaron /guilsinglleft /OE /Lslash /Zcaron /caron 
/dotlessi /quoteleft /quoteright /quotedblleft 
	/quotedblright /bullet /endash /emdash 
/tilde /trademark /scaron /guilsinglright /oe /lslash /zcaron /Ydieresis 

/nbspace /exclamdown /cent /sterling /currency /yen /brokenbar /section
/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /minus /registered /macron
/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered
/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown

/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis
/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply
/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls
/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla
/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis
/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide
/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis
] def
Win31+
0 1 31 {2 copy get exch 1 string dup 0 4 -1 roll put def} for
127 1 255 {2 copy get exch 1 string dup 0 4 -1 roll put def} for
pop