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 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373
|
/*
1998 Roberto Alameda <roberto@myokay.net>
You may modify and distribute this file under the terms of the GNU
General Public License, version 2, or any later version, at your
convenience. See the file COPYING for details.
*/
const char *sample_text = "\
Gallia est omnis divisa in partes tres, quarum unam incolunt \\\n\
Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli \\\n\
appellantur. Hi omnes lingua, institutis, legibus inter se \\\n\
differunt. Gallos ab Aquitanis Garumna flumen, a Belgis Matrona et \\\n\
Sequana dividit. Horum omnium fortissimi sunt Belgae, propterea \\\n\
quod a cultu atque humanitate provinciae longissime absunt, \\\n\
minimeque ad eos mercatores saepe commeant atque ea quae ad \\\n\
effeminandos animos pertinent important, proximique sunt \\\n\
Germanis, qui trans Rhenum incolunt, quibuscum continenter bellum gerunt. Qua \\\n\
de causa Helvetii quoque reliquos Gallos virtute praecedunt, quod fere \\\n\
cotidianis proeliis cum Germanis contendunt, cum aut suis finibus eos \\\n\
prohibent aut ipsi in eorum finibus bellum gerunt. [Eorum una, \\\n\
pars, quam Gallos obtinere dictum est, initium capit a flumine Rhodano, \\\n\
continetur Garumna flumine, Oceano, finibus Belgarum, attingit etiam ab \\\n\
Sequanis et Helvetiis flumen Rhenum, vergit ad septentriones. Belgae \\\n\
ab extremis Galliae finibus oriuntur, pertinent ad inferiorem \\\n\
partem fluminis Rheni, spectant in septentrionem et orientem solem. Aquitania \\\n\
a Garumna flumine ad Pyrenaeos montes et eam partem \\\n\
Oceani quae est ad Hispaniam pertinet; spectat inter occasum solis \\\n\
et septentriones.] \\\n\
\
Apud Helvetios longe nobilissimus fuit et ditissimus \\\n\
Orgetorix. Is M. Messala, [et P.] M. Pisone consulibus regni cupiditate \\\n\
inductus coniurationem nobilitatis fecit et civitati persuasit ut de \\\n\
finibus suis cum omnibus copiis exirent: perfacile esse, cum \\\n\
virtute omnibus praestarent, totius Galliae imperio potiri. Id \\\n\
hoc facilius iis persuasit, quod undique loci natura Helvetii \\\n\
continentur: una ex parte flumine Rheno latissimo atque altissimo, qui \\\n\
agrum Helvetium a Germanis dividit; altera ex parte monte Iura altissimo, \\\n\
qui est inter Sequanos et Helvetios; tertia lacu Lemanno et flumine \\\n\
Rhodano, qui provinciam nostram ab Helvetiis dividit. His rebus \\\n\
fiebat ut et minus late vagarentur et minus facile finitimis bellum inferre \\\n\
possent; qua ex parte homines bellandi cupidi magno dolore \\\n\
adficiebantur. Pro multitudine autem hominum et pro \\\n\
gloria belli atque fortitudinis angustos se fines habere \\\n\
arbitrabantur, qui in longitudinem milia passuum CCXL, in latitudinem \\\n\
CLXXX patebant. \\\n\
\
His rebus adducti et auctoritate Orgetorigis permoti \\\n\
constituerunt ea quae ad proficiscendum pertinerent comparare, \\\n\
iumentorum et carrorum quam maximum numerum coemere, sementes quam \\\n\
maximas facere, ut in itinere copia frumenti suppeteret, cum proximis \\\n\
civitatibus pacem et amicitiam confirmare. Ad eas res \\\n\
conficiendas biennium sibi satis esse duxerunt; in tertium annum \\\n\
profectionem lege confirmant. Ad eas res conficiendas Orgetorix \\\n\
deligitur. Is sibi legationem ad civitates suscipit. In eo itinere \\\n\
persuadet Castico, Catamantaloedis filio, Sequano, cuius pater regnum in \\\n\
Sequanis multos annos obtinuerat et a senatu populi Romani amicus \\\n\
appellatus erat, ut regnum in civitate sua occuparet, quod pater \\\n\
ante habuerit; itemque Dumnorigi Haeduo, fratri Diviciaci, \\\n\
qui eo tempore principatum in civitate obtinebat ac maxime plebi \\\n\
acceptus erat, ut idem conaretur persuadet eique filiam suam in \\\n\
matrimonium dat. Perfacile factu esse illis probat conata \\\n\
perficere, propterea quod ipse suae civitatis imperium obtenturus esset: \\\n\
non esse dubium quin totius Galliae plurimum Helvetii possent; se \\\n\
suis copiis suoque exercitu illis regna conciliaturum confirmat. Hac \\\n\
oratione adducti inter se fidem et ius iurandum dant et regno \\\n\
occupato per tres potentissimos ac firmissimos populos totius Galliae \\\n\
sese potiri posse sperant.\
";
const char *text_samples = "\
/TextSamplerDict 40 dict def\n\
TextSamplerDict begin\n\
/Inch {72 mul} def\n\
/linewidth 7 Inch def\n\
/yline 9.7 Inch def\n\
/LM 0.7 Inch def\n\
/wordbreak ( ) def\n\
/buf 8 string def\n\
\n\
/DoTitle { % fontname DoTitle\n\
/Helvetica findfont 18 scalefont setfont\n\
LM 10.5 Inch moveto\n\
show \n\
( at ) show fontsize buf cvs show ( points, spacing = ) show\n\
spacing buf cvs show\n\
} def\n\
\n\
/DoSamples { % fontname fontsize spacing DoSamples\n\
/spacing exch def\n\
/fontsize exch def\n\
/fontname exch def\n\
\n\
fontname findfont fontsize scalefont setfont\n\
/newline {/yline yline fontsize spacing mul sub def LM yline moveto} def\n\
/breakwidth wordbreak stringwidth pop def\n\
/curwidth 0 def\n\
/lastwordbreak 0 def\n\
/startchar 0 def\n\
/restoftext textstring def\n\
\n\
\n\
LM yline moveto\n\
{ restoftext wordbreak search\n\
{\n\
/nextword exch def pop\n\
/restoftext exch def\n\
/wordwidth nextword stringwidth pop def\n\
\n\
curwidth wordwidth add linewidth gt\n\
{\n\
textstring startchar lastwordbreak startchar sub getinterval\n\
show newline\n\
/startchar lastwordbreak def\n\
/curwidth wordwidth breakwidth add def\n\
}\n\
{\n\
/curwidth curwidth wordwidth breakwidth add add def\n\
} \n\
ifelse\n\
/lastwordbreak lastwordbreak nextword length 1 add add def\n\
}\n\
{pop exit}\n\
ifelse\n\
} loop\n\
/lastchar textstring length def\n\
textstring startchar lastchar startchar sub getinterval show\n\
} def\n\
end\n\
";
const char *check_type42 = "\
languagelevel 2 lt\n\
{\n\
/Helvetica findfont 14 scalefont setfont\n\
72 420 moveto\n\
(Your printer or PostScript interpreter does not support PostScript Level 2) show\n\
showpage\n\
quit\n\
} if\n\
\n\
42 /FontType resourcestatus not\n\
{\n\
/Helvetica findfont 14 scalefont setfont\n\
72 420 moveto\n\
(Your printer or PostScript interpreter does not support Type 42 fonts) show\n\
showpage\n\
quit\n\
} if\n\
pop pop\n\
";
const char *phrase_samples = "\
/PhraseSamplerDict 20 dict def\n\
PhraseSamplerDict begin\n\
/Inch {72 mul} def\n\
/LM 0.5 Inch def\n\
/RM 7.6 Inch def\n\
/Temp 64 string def\n\
/T /Helvetica findfont 10 scalefont def\n\
/T6 /Helvetica findfont 6 scalefont def \n\
/Header { % text height Header\n\
RM exch moveto T6 setfont dup stringwidth pop neg 0 rmoveto show\n\
} def\n\
/FontName { % fontname fontfile height FontName\n\
/y exch def\n\
/FFile exch def\n\
/FName exch def\n\
\n\
LM y moveto\n\
T setfont FName Temp cvs show\n\
LM y 8 sub moveto\n\
T6 setfont FFile show\n\
} def\n\
/FontSample { % fontname size height FontSample\n\
/y exch def\n\
/FSize exch def\n\
/FName exch def\n\
\n\
LM 160 add y moveto\n\
mark\n\
{\n\
FName findfont FSize scalefont setfont \n\
StringSample show\n\
}\n\
stopped {\n\
LM 160 add y moveto\n\
T6 setfont (Error: ) show\n\
$error /errorname get Temp cvs show\n\
( [) show\n\
$error /command get Temp cvs show\n\
(] ) show \n\
}\n\
if\n\
cleartomark\n\
} def\n\
end\n\
";
const char *size_samples = "\
/SizeSamplerDict 40 dict def\n\
SizeSamplerDict begin\n\
/Strings \n\
{ [\n\
(ABCDEFGHIJKLMNOPQRSTUVWXYZ)\n\
(abcdefghijklmnopqrstuvwxyz)\n\
(0123456789<=>:;?@!\"#$%&')\n\
(\\( \\)*+,-./ [ \\\\ ]^_`{|}~)\n\
] } def\n\
\n\
\n\
/Sizes \n\
{ [\n\
8 10 12 14 20 24 28\n\
] } def\n\
\n\
/infofont /Helvetica findfont 10 scalefont def\n\
/msg 8 string def\n\
/Inch {72 mul} def\n\
/DoTitle { % fontname DoTitle\n\
% Write the font name on top of the page\n\
/Helvetica findfont 18 scalefont setfont\n\
dup stringwidth\n\
exch 8 Inch exch sub 2 div exch\n\
10.5 Inch exch sub\n\
moveto show\n\
} def\n\
/DoSamples { % font DoSamples\n\
% Make the font samples\n\
/fontname exch def\n\
/testfont fontname findfont def\n\
1 setlinewidth\n\
60 50 moveto\n\
\n\
Sizes\n\
{\n\
/size exch def\n\
testfont size scalefont setfont\n\
currentpoint translate % start of line\n\
5 0 rmoveto\n\
\n\
Strings \n\
{\n\
currentpoint\n\
3 -1 roll show\n\
moveto\n\
0 1.2 size mul rmoveto % add 30% of the size vertically\n\
} forall % Strings\n\
\n\
-5 0 rmoveto\n\
currentpoint % end of line\n\
newpath 0 0 moveto lineto\n\
currentpoint stroke % leave end of line pos in stack\n\
\n\
% Print the font size in the middle of the line\n\
dup % leave y in the stack (x is 0)\n\
infofont setfont\n\
size msg cvs dup stringwidth % Push string 'n' and its size on the stack\n\
4 -1 roll exch sub 2 div % Stack is 'string width ypos'\n\
exch 5 add neg exch moveto show % Move to the left and print\n\
\n\
moveto % take end of line pos from stack\n\
0 15 rmoveto % Add vertical space between groups\n\
} forall % Sizes\n\
} def\n\
end\n\
";
const char *map_samples = "\
/MapSamplerDict 40 dict def\n\
MapSamplerDict begin\n\
/T /Helvetica findfont 10 scalefont def\n\
/T6 /Times-Roman findfont 6 scalefont def\n\
/Temp 64 string def\n\
/Inch {72 mul} def\n\
/Base 16 def % char code output base\n\
/TempEncoding [ 256 { /.notdef } repeat ] def\n\
/ISOLatin1Dict 256 dict def\n\
ISOLatin1Encoding { ISOLatin1Dict exch true put } forall\n\
/min { 2 copy gt { exch } if pop } bind def\n\
/DoChar {\n\
/C exch def\n\
/S (_) dup 0 C put def\n\
/N F /Encoding get C get def\n\
/W F setfont S stringwidth pop def\n\
T6 setfont\n\
0 -20 moveto N Temp cvs show\n\
0 -12 moveto\n\
W 0.0005 add Temp cvs 0 5 getinterval show\n\
N /.notdef ne {\n\
3 0 translate\n\
0 0 moveto F24 setfont S show\n\
/W S stringwidth pop def\n\
0 -6 moveto 0 24 lineto\n\
W -6 moveto W 24 lineto\n\
-3 0 moveto W 3 add 0 lineto\n\
0 setlinewidth stroke\n\
} if\n\
} def \n\
/DoTitle { % fontname DoTitle\n\
/Helvetica findfont 18 scalefont setfont\n\
dup stringwidth\n\
exch 8 Inch exch sub 2 div exch\n\
10.7 Inch exch sub\n\
moveto show\n\
} def\n\
/Header { % header Header\n\
7.6 Inch 10.7 Inch moveto T setfont dup stringwidth pop neg 0 rmoveto show\n\
} def\n\
/DoBlock { % firstcode lastcode DoBlock\n\
/FirstCode 2 index def\n\
1 exch {\n\
/I exch def\n\
/Xn I FirstCode sub 16 mod def /Yn I FirstCode sub 16 idiv def\n\
gsave\n\
Xn 36 mul 9 add Yn -56 mul 9.5 Inch add translate\n\
I DoChar\n\
grestore\n\
} for\n\
} def \n\
/FontShow0 { % fontname FontShow0\n\
/FName exch def % font name\n\
/F FName findfont def\n\
/Done 256 dict def\n\
/NewEncoding [\n\
ISOLatin1Encoding {\n\
dup F /CharStrings get exch known {\n\
dup Done exch known { pop } { dup Done exch true put } ifelse\n\
} { pop } ifelse\n\
} forall\n\
F /CharStrings get {\n\
pop dup ISOLatin1Dict exch known { pop } if\n\
} forall\n\
] def\n\
F length dict F {\n\
1 index /FID eq { pop pop } { 2 index 3 1 roll put } ifelse\n\
} forall\n\
dup /Encoding NewEncoding put\n\
/* exch definefont\n\
/F exch def\n\
/F24 F 24 scalefont def\n\
70 160 translate\n\
0.80 dup scale\n\
0 NewEncoding length 1 sub DoBlock\n\
} def \n\
/FontShowV { % encoding fontname FontShowV\n\
/FName exch def \n\
/NewEncoding exch def\n\
/F FName findfont def\n\
F length dict F {\n\
1 index /FID eq { pop pop } { 2 index 3 1 roll put } ifelse\n\
} forall\n\
dup /Encoding NewEncoding put\n\
/* exch definefont\n\
/F exch def\n\
/F24 F 24 scalefont def\n\
70 160 translate\n\
0.80 dup scale\n\
0 NewEncoding length 1 sub DoBlock\n\
} def\n\
end \n\
";
|