figenc

[RADIOACTIVE] rsa and symmetric key encryption scripts and executables
git clone git://git.figbert.com/figenc.git
Log | Files | Refs | README

mkpsenc.tcl (29352B)


      1 # mkpsenc.tcl --
      2 #
      3 # This file generates the postscript prolog used by Tk.
      4 
      5 namespace eval ::tk {
      6     # Creates Postscript encoding vector for ISO-8859-1 (could theoretically
      7     # handle any 8-bit encoding, but Tk never generates characters outside
      8     # ASCII).
      9     #
     10     proc CreatePostscriptEncoding {} {
     11 	variable psglyphs
     12 	# Now check for known. Even if it is known, it can be other than we
     13 	# need. GhostScript seems to be happy with such approach
     14 	set result "\[\n"
     15 	for {set i 0} {$i<256} {incr i 8} {
     16 	    for {set j 0} {$j<8} {incr j} {
     17 		set enc [encoding convertfrom "iso8859-1" \
     18 			[format %c [expr {$i+$j}]]]
     19 		catch {
     20 		    set hexcode {}
     21 		    set hexcode [format %04X [scan $enc %c]]
     22 		}
     23 		if {[info exists psglyphs($hexcode)]} {
     24 		    append result "/$psglyphs($hexcode)"
     25 		} else {
     26 		    append result "/space"
     27 		}
     28 	    }
     29 	    append result "\n"
     30 	}
     31 	append result "\]"
     32 	return $result
     33     }
     34 
     35     # List of adobe glyph names. Converted from glyphlist.txt, downloaded from
     36     # Adobe.
     37 
     38     variable psglyphs
     39     array set psglyphs {
     40 	0020 space
     41 	0021 exclam
     42 	0022 quotedbl
     43 	0023 numbersign
     44 	0024 dollar
     45 	0025 percent
     46 	0026 ampersand
     47 	0027 quotesingle
     48 	0028 parenleft
     49 	0029 parenright
     50 	002A asterisk
     51 	002B plus
     52 	002C comma
     53 	002D hyphen
     54 	002E period
     55 	002F slash
     56 	0030 zero
     57 	0031 one
     58 	0032 two
     59 	0033 three
     60 	0034 four
     61 	0035 five
     62 	0036 six
     63 	0037 seven
     64 	0038 eight
     65 	0039 nine
     66 	003A colon
     67 	003B semicolon
     68 	003C less
     69 	003D equal
     70 	003E greater
     71 	003F question
     72 	0040 at
     73 	0041 A
     74 	0042 B
     75 	0043 C
     76 	0044 D
     77 	0045 E
     78 	0046 F
     79 	0047 G
     80 	0048 H
     81 	0049 I
     82 	004A J
     83 	004B K
     84 	004C L
     85 	004D M
     86 	004E N
     87 	004F O
     88 	0050 P
     89 	0051 Q
     90 	0052 R
     91 	0053 S
     92 	0054 T
     93 	0055 U
     94 	0056 V
     95 	0057 W
     96 	0058 X
     97 	0059 Y
     98 	005A Z
     99 	005B bracketleft
    100 	005C backslash
    101 	005D bracketright
    102 	005E asciicircum
    103 	005F underscore
    104 	0060 grave
    105 	0061 a
    106 	0062 b
    107 	0063 c
    108 	0064 d
    109 	0065 e
    110 	0066 f
    111 	0067 g
    112 	0068 h
    113 	0069 i
    114 	006A j
    115 	006B k
    116 	006C l
    117 	006D m
    118 	006E n
    119 	006F o
    120 	0070 p
    121 	0071 q
    122 	0072 r
    123 	0073 s
    124 	0074 t
    125 	0075 u
    126 	0076 v
    127 	0077 w
    128 	0078 x
    129 	0079 y
    130 	007A z
    131 	007B braceleft
    132 	007C bar
    133 	007D braceright
    134 	007E asciitilde
    135 	00A0 space
    136 	00A1 exclamdown
    137 	00A2 cent
    138 	00A3 sterling
    139 	00A4 currency
    140 	00A5 yen
    141 	00A6 brokenbar
    142 	00A7 section
    143 	00A8 dieresis
    144 	00A9 copyright
    145 	00AA ordfeminine
    146 	00AB guillemotleft
    147 	00AC logicalnot
    148 	00AD hyphen
    149 	00AE registered
    150 	00AF macron
    151 	00B0 degree
    152 	00B1 plusminus
    153 	00B2 twosuperior
    154 	00B3 threesuperior
    155 	00B4 acute
    156 	00B5 mu
    157 	00B6 paragraph
    158 	00B7 periodcentered
    159 	00B8 cedilla
    160 	00B9 onesuperior
    161 	00BA ordmasculine
    162 	00BB guillemotright
    163 	00BC onequarter
    164 	00BD onehalf
    165 	00BE threequarters
    166 	00BF questiondown
    167 	00C0 Agrave
    168 	00C1 Aacute
    169 	00C2 Acircumflex
    170 	00C3 Atilde
    171 	00C4 Adieresis
    172 	00C5 Aring
    173 	00C6 AE
    174 	00C7 Ccedilla
    175 	00C8 Egrave
    176 	00C9 Eacute
    177 	00CA Ecircumflex
    178 	00CB Edieresis
    179 	00CC Igrave
    180 	00CD Iacute
    181 	00CE Icircumflex
    182 	00CF Idieresis
    183 	00D0 Eth
    184 	00D1 Ntilde
    185 	00D2 Ograve
    186 	00D3 Oacute
    187 	00D4 Ocircumflex
    188 	00D5 Otilde
    189 	00D6 Odieresis
    190 	00D7 multiply
    191 	00D8 Oslash
    192 	00D9 Ugrave
    193 	00DA Uacute
    194 	00DB Ucircumflex
    195 	00DC Udieresis
    196 	00DD Yacute
    197 	00DE Thorn
    198 	00DF germandbls
    199 	00E0 agrave
    200 	00E1 aacute
    201 	00E2 acircumflex
    202 	00E3 atilde
    203 	00E4 adieresis
    204 	00E5 aring
    205 	00E6 ae
    206 	00E7 ccedilla
    207 	00E8 egrave
    208 	00E9 eacute
    209 	00EA ecircumflex
    210 	00EB edieresis
    211 	00EC igrave
    212 	00ED iacute
    213 	00EE icircumflex
    214 	00EF idieresis
    215 	00F0 eth
    216 	00F1 ntilde
    217 	00F2 ograve
    218 	00F3 oacute
    219 	00F4 ocircumflex
    220 	00F5 otilde
    221 	00F6 odieresis
    222 	00F7 divide
    223 	00F8 oslash
    224 	00F9 ugrave
    225 	00FA uacute
    226 	00FB ucircumflex
    227 	00FC udieresis
    228 	00FD yacute
    229 	00FE thorn
    230 	00FF ydieresis
    231 	0100 Amacron
    232 	0101 amacron
    233 	0102 Abreve
    234 	0103 abreve
    235 	0104 Aogonek
    236 	0105 aogonek
    237 	0106 Cacute
    238 	0107 cacute
    239 	0108 Ccircumflex
    240 	0109 ccircumflex
    241 	010A Cdotaccent
    242 	010B cdotaccent
    243 	010C Ccaron
    244 	010D ccaron
    245 	010E Dcaron
    246 	010F dcaron
    247 	0110 Dcroat
    248 	0111 dcroat
    249 	0112 Emacron
    250 	0113 emacron
    251 	0114 Ebreve
    252 	0115 ebreve
    253 	0116 Edotaccent
    254 	0117 edotaccent
    255 	0118 Eogonek
    256 	0119 eogonek
    257 	011A Ecaron
    258 	011B ecaron
    259 	011C Gcircumflex
    260 	011D gcircumflex
    261 	011E Gbreve
    262 	011F gbreve
    263 	0120 Gdotaccent
    264 	0121 gdotaccent
    265 	0122 Gcommaaccent
    266 	0123 gcommaaccent
    267 	0124 Hcircumflex
    268 	0125 hcircumflex
    269 	0126 Hbar
    270 	0127 hbar
    271 	0128 Itilde
    272 	0129 itilde
    273 	012A Imacron
    274 	012B imacron
    275 	012C Ibreve
    276 	012D ibreve
    277 	012E Iogonek
    278 	012F iogonek
    279 	0130 Idotaccent
    280 	0131 dotlessi
    281 	0132 IJ
    282 	0133 ij
    283 	0134 Jcircumflex
    284 	0135 jcircumflex
    285 	0136 Kcommaaccent
    286 	0137 kcommaaccent
    287 	0138 kgreenlandic
    288 	0139 Lacute
    289 	013A lacute
    290 	013B Lcommaaccent
    291 	013C lcommaaccent
    292 	013D Lcaron
    293 	013E lcaron
    294 	013F Ldot
    295 	0140 ldot
    296 	0141 Lslash
    297 	0142 lslash
    298 	0143 Nacute
    299 	0144 nacute
    300 	0145 Ncommaaccent
    301 	0146 ncommaaccent
    302 	0147 Ncaron
    303 	0148 ncaron
    304 	0149 napostrophe
    305 	014A Eng
    306 	014B eng
    307 	014C Omacron
    308 	014D omacron
    309 	014E Obreve
    310 	014F obreve
    311 	0150 Ohungarumlaut
    312 	0151 ohungarumlaut
    313 	0152 OE
    314 	0153 oe
    315 	0154 Racute
    316 	0155 racute
    317 	0156 Rcommaaccent
    318 	0157 rcommaaccent
    319 	0158 Rcaron
    320 	0159 rcaron
    321 	015A Sacute
    322 	015B sacute
    323 	015C Scircumflex
    324 	015D scircumflex
    325 	015E Scedilla
    326 	015F scedilla
    327 	0160 Scaron
    328 	0161 scaron
    329 	0162 Tcommaaccent
    330 	0163 tcommaaccent
    331 	0164 Tcaron
    332 	0165 tcaron
    333 	0166 Tbar
    334 	0167 tbar
    335 	0168 Utilde
    336 	0169 utilde
    337 	016A Umacron
    338 	016B umacron
    339 	016C Ubreve
    340 	016D ubreve
    341 	016E Uring
    342 	016F uring
    343 	0170 Uhungarumlaut
    344 	0171 uhungarumlaut
    345 	0172 Uogonek
    346 	0173 uogonek
    347 	0174 Wcircumflex
    348 	0175 wcircumflex
    349 	0176 Ycircumflex
    350 	0177 ycircumflex
    351 	0178 Ydieresis
    352 	0179 Zacute
    353 	017A zacute
    354 	017B Zdotaccent
    355 	017C zdotaccent
    356 	017D Zcaron
    357 	017E zcaron
    358 	017F longs
    359 	0192 florin
    360 	01A0 Ohorn
    361 	01A1 ohorn
    362 	01AF Uhorn
    363 	01B0 uhorn
    364 	01E6 Gcaron
    365 	01E7 gcaron
    366 	01FA Aringacute
    367 	01FB aringacute
    368 	01FC AEacute
    369 	01FD aeacute
    370 	01FE Oslashacute
    371 	01FF oslashacute
    372 	0218 Scommaaccent
    373 	0219 scommaaccent
    374 	021A Tcommaaccent
    375 	021B tcommaaccent
    376 	02BC afii57929
    377 	02BD afii64937
    378 	02C6 circumflex
    379 	02C7 caron
    380 	02C9 macron
    381 	02D8 breve
    382 	02D9 dotaccent
    383 	02DA ring
    384 	02DB ogonek
    385 	02DC tilde
    386 	02DD hungarumlaut
    387 	0300 gravecomb
    388 	0301 acutecomb
    389 	0303 tildecomb
    390 	0309 hookabovecomb
    391 	0323 dotbelowcomb
    392 	0384 tonos
    393 	0385 dieresistonos
    394 	0386 Alphatonos
    395 	0387 anoteleia
    396 	0388 Epsilontonos
    397 	0389 Etatonos
    398 	038A Iotatonos
    399 	038C Omicrontonos
    400 	038E Upsilontonos
    401 	038F Omegatonos
    402 	0390 iotadieresistonos
    403 	0391 Alpha
    404 	0392 Beta
    405 	0393 Gamma
    406 	0394 Delta
    407 	0395 Epsilon
    408 	0396 Zeta
    409 	0397 Eta
    410 	0398 Theta
    411 	0399 Iota
    412 	039A Kappa
    413 	039B Lambda
    414 	039C Mu
    415 	039D Nu
    416 	039E Xi
    417 	039F Omicron
    418 	03A0 Pi
    419 	03A1 Rho
    420 	03A3 Sigma
    421 	03A4 Tau
    422 	03A5 Upsilon
    423 	03A6 Phi
    424 	03A7 Chi
    425 	03A8 Psi
    426 	03A9 Omega
    427 	03AA Iotadieresis
    428 	03AB Upsilondieresis
    429 	03AC alphatonos
    430 	03AD epsilontonos
    431 	03AE etatonos
    432 	03AF iotatonos
    433 	03B0 upsilondieresistonos
    434 	03B1 alpha
    435 	03B2 beta
    436 	03B3 gamma
    437 	03B4 delta
    438 	03B5 epsilon
    439 	03B6 zeta
    440 	03B7 eta
    441 	03B8 theta
    442 	03B9 iota
    443 	03BA kappa
    444 	03BB lambda
    445 	03BC mu
    446 	03BD nu
    447 	03BE xi
    448 	03BF omicron
    449 	03C0 pi
    450 	03C1 rho
    451 	03C2 sigma1
    452 	03C3 sigma
    453 	03C4 tau
    454 	03C5 upsilon
    455 	03C6 phi
    456 	03C7 chi
    457 	03C8 psi
    458 	03C9 omega
    459 	03CA iotadieresis
    460 	03CB upsilondieresis
    461 	03CC omicrontonos
    462 	03CD upsilontonos
    463 	03CE omegatonos
    464 	03D1 theta1
    465 	03D2 Upsilon1
    466 	03D5 phi1
    467 	03D6 omega1
    468 	0401 afii10023
    469 	0402 afii10051
    470 	0403 afii10052
    471 	0404 afii10053
    472 	0405 afii10054
    473 	0406 afii10055
    474 	0407 afii10056
    475 	0408 afii10057
    476 	0409 afii10058
    477 	040A afii10059
    478 	040B afii10060
    479 	040C afii10061
    480 	040E afii10062
    481 	040F afii10145
    482 	0410 afii10017
    483 	0411 afii10018
    484 	0412 afii10019
    485 	0413 afii10020
    486 	0414 afii10021
    487 	0415 afii10022
    488 	0416 afii10024
    489 	0417 afii10025
    490 	0418 afii10026
    491 	0419 afii10027
    492 	041A afii10028
    493 	041B afii10029
    494 	041C afii10030
    495 	041D afii10031
    496 	041E afii10032
    497 	041F afii10033
    498 	0420 afii10034
    499 	0421 afii10035
    500 	0422 afii10036
    501 	0423 afii10037
    502 	0424 afii10038
    503 	0425 afii10039
    504 	0426 afii10040
    505 	0427 afii10041
    506 	0428 afii10042
    507 	0429 afii10043
    508 	042A afii10044
    509 	042B afii10045
    510 	042C afii10046
    511 	042D afii10047
    512 	042E afii10048
    513 	042F afii10049
    514 	0430 afii10065
    515 	0431 afii10066
    516 	0432 afii10067
    517 	0433 afii10068
    518 	0434 afii10069
    519 	0435 afii10070
    520 	0436 afii10072
    521 	0437 afii10073
    522 	0438 afii10074
    523 	0439 afii10075
    524 	043A afii10076
    525 	043B afii10077
    526 	043C afii10078
    527 	043D afii10079
    528 	043E afii10080
    529 	043F afii10081
    530 	0440 afii10082
    531 	0441 afii10083
    532 	0442 afii10084
    533 	0443 afii10085
    534 	0444 afii10086
    535 	0445 afii10087
    536 	0446 afii10088
    537 	0447 afii10089
    538 	0448 afii10090
    539 	0449 afii10091
    540 	044A afii10092
    541 	044B afii10093
    542 	044C afii10094
    543 	044D afii10095
    544 	044E afii10096
    545 	044F afii10097
    546 	0451 afii10071
    547 	0452 afii10099
    548 	0453 afii10100
    549 	0454 afii10101
    550 	0455 afii10102
    551 	0456 afii10103
    552 	0457 afii10104
    553 	0458 afii10105
    554 	0459 afii10106
    555 	045A afii10107
    556 	045B afii10108
    557 	045C afii10109
    558 	045E afii10110
    559 	045F afii10193
    560 	0462 afii10146
    561 	0463 afii10194
    562 	0472 afii10147
    563 	0473 afii10195
    564 	0474 afii10148
    565 	0475 afii10196
    566 	0490 afii10050
    567 	0491 afii10098
    568 	04D9 afii10846
    569 	05B0 afii57799
    570 	05B1 afii57801
    571 	05B2 afii57800
    572 	05B3 afii57802
    573 	05B4 afii57793
    574 	05B5 afii57794
    575 	05B6 afii57795
    576 	05B7 afii57798
    577 	05B8 afii57797
    578 	05B9 afii57806
    579 	05BB afii57796
    580 	05BC afii57807
    581 	05BD afii57839
    582 	05BE afii57645
    583 	05BF afii57841
    584 	05C0 afii57842
    585 	05C1 afii57804
    586 	05C2 afii57803
    587 	05C3 afii57658
    588 	05D0 afii57664
    589 	05D1 afii57665
    590 	05D2 afii57666
    591 	05D3 afii57667
    592 	05D4 afii57668
    593 	05D5 afii57669
    594 	05D6 afii57670
    595 	05D7 afii57671
    596 	05D8 afii57672
    597 	05D9 afii57673
    598 	05DA afii57674
    599 	05DB afii57675
    600 	05DC afii57676
    601 	05DD afii57677
    602 	05DE afii57678
    603 	05DF afii57679
    604 	05E0 afii57680
    605 	05E1 afii57681
    606 	05E2 afii57682
    607 	05E3 afii57683
    608 	05E4 afii57684
    609 	05E5 afii57685
    610 	05E6 afii57686
    611 	05E7 afii57687
    612 	05E8 afii57688
    613 	05E9 afii57689
    614 	05EA afii57690
    615 	05F0 afii57716
    616 	05F1 afii57717
    617 	05F2 afii57718
    618 	060C afii57388
    619 	061B afii57403
    620 	061F afii57407
    621 	0621 afii57409
    622 	0622 afii57410
    623 	0623 afii57411
    624 	0624 afii57412
    625 	0625 afii57413
    626 	0626 afii57414
    627 	0627 afii57415
    628 	0628 afii57416
    629 	0629 afii57417
    630 	062A afii57418
    631 	062B afii57419
    632 	062C afii57420
    633 	062D afii57421
    634 	062E afii57422
    635 	062F afii57423
    636 	0630 afii57424
    637 	0631 afii57425
    638 	0632 afii57426
    639 	0633 afii57427
    640 	0634 afii57428
    641 	0635 afii57429
    642 	0636 afii57430
    643 	0637 afii57431
    644 	0638 afii57432
    645 	0639 afii57433
    646 	063A afii57434
    647 	0640 afii57440
    648 	0641 afii57441
    649 	0642 afii57442
    650 	0643 afii57443
    651 	0644 afii57444
    652 	0645 afii57445
    653 	0646 afii57446
    654 	0647 afii57470
    655 	0648 afii57448
    656 	0649 afii57449
    657 	064A afii57450
    658 	064B afii57451
    659 	064C afii57452
    660 	064D afii57453
    661 	064E afii57454
    662 	064F afii57455
    663 	0650 afii57456
    664 	0651 afii57457
    665 	0652 afii57458
    666 	0660 afii57392
    667 	0661 afii57393
    668 	0662 afii57394
    669 	0663 afii57395
    670 	0664 afii57396
    671 	0665 afii57397
    672 	0666 afii57398
    673 	0667 afii57399
    674 	0668 afii57400
    675 	0669 afii57401
    676 	066A afii57381
    677 	066D afii63167
    678 	0679 afii57511
    679 	067E afii57506
    680 	0686 afii57507
    681 	0688 afii57512
    682 	0691 afii57513
    683 	0698 afii57508
    684 	06A4 afii57505
    685 	06AF afii57509
    686 	06BA afii57514
    687 	06D2 afii57519
    688 	06D5 afii57534
    689 	1E80 Wgrave
    690 	1E81 wgrave
    691 	1E82 Wacute
    692 	1E83 wacute
    693 	1E84 Wdieresis
    694 	1E85 wdieresis
    695 	1EF2 Ygrave
    696 	1EF3 ygrave
    697 	200C afii61664
    698 	200D afii301
    699 	200E afii299
    700 	200F afii300
    701 	2012 figuredash
    702 	2013 endash
    703 	2014 emdash
    704 	2015 afii00208
    705 	2017 underscoredbl
    706 	2018 quoteleft
    707 	2019 quoteright
    708 	201A quotesinglbase
    709 	201B quotereversed
    710 	201C quotedblleft
    711 	201D quotedblright
    712 	201E quotedblbase
    713 	2020 dagger
    714 	2021 daggerdbl
    715 	2022 bullet
    716 	2024 onedotenleader
    717 	2025 twodotenleader
    718 	2026 ellipsis
    719 	202C afii61573
    720 	202D afii61574
    721 	202E afii61575
    722 	2030 perthousand
    723 	2032 minute
    724 	2033 second
    725 	2039 guilsinglleft
    726 	203A guilsinglright
    727 	203C exclamdbl
    728 	2044 fraction
    729 	2070 zerosuperior
    730 	2074 foursuperior
    731 	2075 fivesuperior
    732 	2076 sixsuperior
    733 	2077 sevensuperior
    734 	2078 eightsuperior
    735 	2079 ninesuperior
    736 	207D parenleftsuperior
    737 	207E parenrightsuperior
    738 	207F nsuperior
    739 	2080 zeroinferior
    740 	2081 oneinferior
    741 	2082 twoinferior
    742 	2083 threeinferior
    743 	2084 fourinferior
    744 	2085 fiveinferior
    745 	2086 sixinferior
    746 	2087 seveninferior
    747 	2088 eightinferior
    748 	2089 nineinferior
    749 	208D parenleftinferior
    750 	208E parenrightinferior
    751 	20A1 colonmonetary
    752 	20A3 franc
    753 	20A4 lira
    754 	20A7 peseta
    755 	20AA afii57636
    756 	20AB dong
    757 	20AC Euro
    758 	2105 afii61248
    759 	2111 Ifraktur
    760 	2113 afii61289
    761 	2116 afii61352
    762 	2118 weierstrass
    763 	211C Rfraktur
    764 	211E prescription
    765 	2122 trademark
    766 	2126 Omega
    767 	212E estimated
    768 	2135 aleph
    769 	2153 onethird
    770 	2154 twothirds
    771 	215B oneeighth
    772 	215C threeeighths
    773 	215D fiveeighths
    774 	215E seveneighths
    775 	2190 arrowleft
    776 	2191 arrowup
    777 	2192 arrowright
    778 	2193 arrowdown
    779 	2194 arrowboth
    780 	2195 arrowupdn
    781 	21A8 arrowupdnbse
    782 	21B5 carriagereturn
    783 	21D0 arrowdblleft
    784 	21D1 arrowdblup
    785 	21D2 arrowdblright
    786 	21D3 arrowdbldown
    787 	21D4 arrowdblboth
    788 	2200 universal
    789 	2202 partialdiff
    790 	2203 existential
    791 	2205 emptyset
    792 	2206 Delta
    793 	2207 gradient
    794 	2208 element
    795 	2209 notelement
    796 	220B suchthat
    797 	220F product
    798 	2211 summation
    799 	2212 minus
    800 	2215 fraction
    801 	2217 asteriskmath
    802 	2219 periodcentered
    803 	221A radical
    804 	221D proportional
    805 	221E infinity
    806 	221F orthogonal
    807 	2220 angle
    808 	2227 logicaland
    809 	2228 logicalor
    810 	2229 intersection
    811 	222A union
    812 	222B integral
    813 	2234 therefore
    814 	223C similar
    815 	2245 congruent
    816 	2248 approxequal
    817 	2260 notequal
    818 	2261 equivalence
    819 	2264 lessequal
    820 	2265 greaterequal
    821 	2282 propersubset
    822 	2283 propersuperset
    823 	2284 notsubset
    824 	2286 reflexsubset
    825 	2287 reflexsuperset
    826 	2295 circleplus
    827 	2297 circlemultiply
    828 	22A5 perpendicular
    829 	22C5 dotmath
    830 	2302 house
    831 	2310 revlogicalnot
    832 	2320 integraltp
    833 	2321 integralbt
    834 	2329 angleleft
    835 	232A angleright
    836 	2500 SF100000
    837 	2502 SF110000
    838 	250C SF010000
    839 	2510 SF030000
    840 	2514 SF020000
    841 	2518 SF040000
    842 	251C SF080000
    843 	2524 SF090000
    844 	252C SF060000
    845 	2534 SF070000
    846 	253C SF050000
    847 	2550 SF430000
    848 	2551 SF240000
    849 	2552 SF510000
    850 	2553 SF520000
    851 	2554 SF390000
    852 	2555 SF220000
    853 	2556 SF210000
    854 	2557 SF250000
    855 	2558 SF500000
    856 	2559 SF490000
    857 	255A SF380000
    858 	255B SF280000
    859 	255C SF270000
    860 	255D SF260000
    861 	255E SF360000
    862 	255F SF370000
    863 	2560 SF420000
    864 	2561 SF190000
    865 	2562 SF200000
    866 	2563 SF230000
    867 	2564 SF470000
    868 	2565 SF480000
    869 	2566 SF410000
    870 	2567 SF450000
    871 	2568 SF460000
    872 	2569 SF400000
    873 	256A SF540000
    874 	256B SF530000
    875 	256C SF440000
    876 	2580 upblock
    877 	2584 dnblock
    878 	2588 block
    879 	258C lfblock
    880 	2590 rtblock
    881 	2591 ltshade
    882 	2592 shade
    883 	2593 dkshade
    884 	25A0 filledbox
    885 	25A1 H22073
    886 	25AA H18543
    887 	25AB H18551
    888 	25AC filledrect
    889 	25B2 triagup
    890 	25BA triagrt
    891 	25BC triagdn
    892 	25C4 triaglf
    893 	25CA lozenge
    894 	25CB circle
    895 	25CF H18533
    896 	25D8 invbullet
    897 	25D9 invcircle
    898 	25E6 openbullet
    899 	263A smileface
    900 	263B invsmileface
    901 	263C sun
    902 	2640 female
    903 	2642 male
    904 	2660 spade
    905 	2663 club
    906 	2665 heart
    907 	2666 diamond
    908 	266A musicalnote
    909 	266B musicalnotedbl
    910 	F6BE dotlessj
    911 	F6BF LL
    912 	F6C0 ll
    913 	F6C1 Scedilla
    914 	F6C2 scedilla
    915 	F6C3 commaaccent
    916 	F6C4 afii10063
    917 	F6C5 afii10064
    918 	F6C6 afii10192
    919 	F6C7 afii10831
    920 	F6C8 afii10832
    921 	F6C9 Acute
    922 	F6CA Caron
    923 	F6CB Dieresis
    924 	F6CC DieresisAcute
    925 	F6CD DieresisGrave
    926 	F6CE Grave
    927 	F6CF Hungarumlaut
    928 	F6D0 Macron
    929 	F6D1 cyrBreve
    930 	F6D2 cyrFlex
    931 	F6D3 dblGrave
    932 	F6D4 cyrbreve
    933 	F6D5 cyrflex
    934 	F6D6 dblgrave
    935 	F6D7 dieresisacute
    936 	F6D8 dieresisgrave
    937 	F6D9 copyrightserif
    938 	F6DA registerserif
    939 	F6DB trademarkserif
    940 	F6DC onefitted
    941 	F6DD rupiah
    942 	F6DE threequartersemdash
    943 	F6DF centinferior
    944 	F6E0 centsuperior
    945 	F6E1 commainferior
    946 	F6E2 commasuperior
    947 	F6E3 dollarinferior
    948 	F6E4 dollarsuperior
    949 	F6E5 hypheninferior
    950 	F6E6 hyphensuperior
    951 	F6E7 periodinferior
    952 	F6E8 periodsuperior
    953 	F6E9 asuperior
    954 	F6EA bsuperior
    955 	F6EB dsuperior
    956 	F6EC esuperior
    957 	F6ED isuperior
    958 	F6EE lsuperior
    959 	F6EF msuperior
    960 	F6F0 osuperior
    961 	F6F1 rsuperior
    962 	F6F2 ssuperior
    963 	F6F3 tsuperior
    964 	F6F4 Brevesmall
    965 	F6F5 Caronsmall
    966 	F6F6 Circumflexsmall
    967 	F6F7 Dotaccentsmall
    968 	F6F8 Hungarumlautsmall
    969 	F6F9 Lslashsmall
    970 	F6FA OEsmall
    971 	F6FB Ogoneksmall
    972 	F6FC Ringsmall
    973 	F6FD Scaronsmall
    974 	F6FE Tildesmall
    975 	F6FF Zcaronsmall
    976 	F721 exclamsmall
    977 	F724 dollaroldstyle
    978 	F726 ampersandsmall
    979 	F730 zerooldstyle
    980 	F731 oneoldstyle
    981 	F732 twooldstyle
    982 	F733 threeoldstyle
    983 	F734 fouroldstyle
    984 	F735 fiveoldstyle
    985 	F736 sixoldstyle
    986 	F737 sevenoldstyle
    987 	F738 eightoldstyle
    988 	F739 nineoldstyle
    989 	F73F questionsmall
    990 	F760 Gravesmall
    991 	F761 Asmall
    992 	F762 Bsmall
    993 	F763 Csmall
    994 	F764 Dsmall
    995 	F765 Esmall
    996 	F766 Fsmall
    997 	F767 Gsmall
    998 	F768 Hsmall
    999 	F769 Ismall
   1000 	F76A Jsmall
   1001 	F76B Ksmall
   1002 	F76C Lsmall
   1003 	F76D Msmall
   1004 	F76E Nsmall
   1005 	F76F Osmall
   1006 	F770 Psmall
   1007 	F771 Qsmall
   1008 	F772 Rsmall
   1009 	F773 Ssmall
   1010 	F774 Tsmall
   1011 	F775 Usmall
   1012 	F776 Vsmall
   1013 	F777 Wsmall
   1014 	F778 Xsmall
   1015 	F779 Ysmall
   1016 	F77A Zsmall
   1017 	F7A1 exclamdownsmall
   1018 	F7A2 centoldstyle
   1019 	F7A8 Dieresissmall
   1020 	F7AF Macronsmall
   1021 	F7B4 Acutesmall
   1022 	F7B8 Cedillasmall
   1023 	F7BF questiondownsmall
   1024 	F7E0 Agravesmall
   1025 	F7E1 Aacutesmall
   1026 	F7E2 Acircumflexsmall
   1027 	F7E3 Atildesmall
   1028 	F7E4 Adieresissmall
   1029 	F7E5 Aringsmall
   1030 	F7E6 AEsmall
   1031 	F7E7 Ccedillasmall
   1032 	F7E8 Egravesmall
   1033 	F7E9 Eacutesmall
   1034 	F7EA Ecircumflexsmall
   1035 	F7EB Edieresissmall
   1036 	F7EC Igravesmall
   1037 	F7ED Iacutesmall
   1038 	F7EE Icircumflexsmall
   1039 	F7EF Idieresissmall
   1040 	F7F0 Ethsmall
   1041 	F7F1 Ntildesmall
   1042 	F7F2 Ogravesmall
   1043 	F7F3 Oacutesmall
   1044 	F7F4 Ocircumflexsmall
   1045 	F7F5 Otildesmall
   1046 	F7F6 Odieresissmall
   1047 	F7F8 Oslashsmall
   1048 	F7F9 Ugravesmall
   1049 	F7FA Uacutesmall
   1050 	F7FB Ucircumflexsmall
   1051 	F7FC Udieresissmall
   1052 	F7FD Yacutesmall
   1053 	F7FE Thornsmall
   1054 	F7FF Ydieresissmall
   1055 	F8E5 radicalex
   1056 	F8E6 arrowvertex
   1057 	F8E7 arrowhorizex
   1058 	F8E8 registersans
   1059 	F8E9 copyrightsans
   1060 	F8EA trademarksans
   1061 	F8EB parenlefttp
   1062 	F8EC parenleftex
   1063 	F8ED parenleftbt
   1064 	F8EE bracketlefttp
   1065 	F8EF bracketleftex
   1066 	F8F0 bracketleftbt
   1067 	F8F1 bracelefttp
   1068 	F8F2 braceleftmid
   1069 	F8F3 braceleftbt
   1070 	F8F4 braceex
   1071 	F8F5 integralex
   1072 	F8F6 parenrighttp
   1073 	F8F7 parenrightex
   1074 	F8F8 parenrightbt
   1075 	F8F9 bracketrighttp
   1076 	F8FA bracketrightex
   1077 	F8FB bracketrightbt
   1078 	F8FC bracerighttp
   1079 	F8FD bracerightmid
   1080 	F8FE bracerightbt
   1081 	FB00 ff
   1082 	FB01 fi
   1083 	FB02 fl
   1084 	FB03 ffi
   1085 	FB04 ffl
   1086 	FB1F afii57705
   1087 	FB2A afii57694
   1088 	FB2B afii57695
   1089 	FB35 afii57723
   1090 	FB4B afii57700
   1091     }
   1092 
   1093     variable ps_preamble {}
   1094 
   1095     namespace eval ps {
   1096 	namespace ensemble create
   1097 	namespace export {[a-z]*}
   1098 	proc literal {string} {
   1099 	    upvar 0 ::tk::ps_preamble preamble
   1100 	    foreach line [split $string \n] {
   1101 		set line [string trim $line]
   1102 		if {$line eq ""} continue
   1103 		append preamble $line \n
   1104 	    }
   1105 	    return
   1106 	}
   1107 	proc variable {name value} {
   1108 	    upvar 0 ::tk::ps_preamble preamble
   1109 	    append preamble "/$name $value def\n"
   1110 	    return
   1111 	}
   1112 	proc function {name body} {
   1113 	    upvar 0 ::tk::ps_preamble preamble
   1114 	    append preamble "/$name \{"
   1115 	    foreach line [split $body \n] {
   1116 		set line [string trim $line]
   1117 		# Strip blank lines and comments from the bodies of functions
   1118 		if {$line eq "" } continue
   1119 		if {[string match {[%#]*} $line]} continue
   1120 		append preamble $line " "
   1121 	    }
   1122 	    append preamble "\} bind def\n"
   1123 	    return
   1124 	}
   1125     }
   1126 
   1127     ps literal {
   1128 	%%BeginProlog
   1129 	% This is a standard prolog for Postscript generated by Tk's canvas
   1130 	% widget.
   1131     }
   1132     ps variable CurrentEncoding [CreatePostscriptEncoding]
   1133     ps literal {50 dict begin}
   1134 
   1135     # The definitions below just define all of the variables used in any of
   1136     # the procedures here. This is needed for obscure reasons explained on
   1137     # p. 716 of the Postscript manual (Section H.2.7, "Initializing
   1138     # Variables," in the section on Encapsulated Postscript).
   1139     ps variable baseline 0
   1140     ps variable stipimage 0
   1141     ps variable height 0
   1142     ps variable justify 0
   1143     ps variable lineLength 0
   1144     ps variable spacing 0
   1145     ps variable stipple 0
   1146     ps variable strings 0
   1147     ps variable xoffset 0
   1148     ps variable yoffset 0
   1149     ps variable tmpstip null
   1150     ps variable baselineSampler "( TXygqPZ)"
   1151     # Put an extra-tall character in; done this way to avoid encoding trouble
   1152     ps literal {baselineSampler 0 196 put}
   1153 
   1154     ps function cstringshow {
   1155 	{
   1156 	    dup type /stringtype eq
   1157 	    { show } { glyphshow }
   1158 	    ifelse
   1159 	} forall
   1160     }
   1161 
   1162     ps function cstringwidth {
   1163 	0 exch 0 exch
   1164 	{
   1165 	    dup type /stringtype eq
   1166 	    { stringwidth } {
   1167 		currentfont /Encoding get exch 1 exch put (\001)
   1168 		stringwidth
   1169 	    }
   1170 	    ifelse
   1171 	    exch 3 1 roll add 3 1 roll add exch
   1172 	} forall
   1173     }
   1174 
   1175     # font ISOEncode font
   1176     #
   1177     # This procedure changes the encoding of a font from the default
   1178     # Postscript encoding to current system encoding. It's typically invoked
   1179     # just before invoking "setfont". The body of this procedure comes from
   1180     # Section 5.6.1 of the Postscript book.
   1181     ps function ISOEncode {
   1182 	dup length dict begin
   1183 	{1 index /FID ne {def} {pop pop} ifelse} forall
   1184 	/Encoding CurrentEncoding def
   1185 	currentdict
   1186 	end
   1187 	% I'm not sure why it's necessary to use "definefont" on this new
   1188 	% font, but it seems to be important; just use the name "Temporary"
   1189 	% for the font.
   1190 	/Temporary exch definefont
   1191     }
   1192 
   1193     # StrokeClip
   1194     #
   1195     # This procedure converts the current path into a clip area under the
   1196     # assumption of stroking. It's a bit tricky because some Postscript
   1197     # interpreters get errors during strokepath for dashed lines. If this
   1198     # happens then turn off dashes and try again.
   1199     ps function StrokeClip {
   1200 	{strokepath} stopped {
   1201 	    (This Postscript printer gets limitcheck overflows when) =
   1202 	    (stippling dashed lines;  lines will be printed solid instead.) =
   1203 	    [] 0 setdash strokepath} if
   1204 	clip
   1205     }
   1206 
   1207     # desiredSize EvenPixels closestSize
   1208     #
   1209     # The procedure below is used for stippling. Given the optimal size of a
   1210     # dot in a stipple pattern in the current user coordinate system, compute
   1211     # the closest size that is an exact multiple of the device's pixel
   1212     # size. This allows stipple patterns to be displayed without aliasing
   1213     # effects.
   1214     ps function EvenPixels {
   1215 	% Compute exact number of device pixels per stipple dot.
   1216 	dup 0 matrix currentmatrix dtransform
   1217 	dup mul exch dup mul add sqrt
   1218 	% Round to an integer, make sure the number is at least 1, and
   1219 	% compute user coord distance corresponding to this.
   1220 	dup round dup 1 lt {pop 1} if
   1221 	exch div mul
   1222     }
   1223 
   1224     # width height string StippleFill --
   1225     #
   1226     # Given a path already set up and a clipping region generated from it,
   1227     # this procedure will fill the clipping region with a stipple pattern.
   1228     # "String" contains a proper image description of the stipple pattern and
   1229     # "width" and "height" give its dimensions. Each stipple dot is assumed to
   1230     # be about one unit across in the current user coordinate system. This
   1231     # procedure trashes the graphics state.
   1232     ps function StippleFill {
   1233 	% The following code is needed to work around a NeWSprint bug.
   1234 	/tmpstip 1 index def
   1235 	% Change the scaling so that one user unit in user coordinates
   1236 	% corresponds to the size of one stipple dot.
   1237 	1 EvenPixels dup scale
   1238 	% Compute the bounding box occupied by the path (which is now the
   1239 	% clipping region), and round the lower coordinates down to the
   1240 	% nearest starting point for the stipple pattern. Be careful about
   1241 	% negative numbers, since the rounding works differently on them.
   1242 	pathbbox
   1243 	4 2 roll
   1244 	5 index div dup 0 lt {1 sub} if cvi 5 index mul 4 1 roll
   1245 	6 index div dup 0 lt {1 sub} if cvi 6 index mul 3 2 roll
   1246 	% Stack now: width height string y1 y2 x1 x2
   1247 	% Below is a doubly-nested for loop to iterate across this area
   1248 	% in units of the stipple pattern size, going up columns then
   1249 	% across rows, blasting out a stipple-pattern-sized rectangle at
   1250 	% each position
   1251 	6 index exch {
   1252 	    2 index 5 index 3 index {
   1253 		% Stack now: width height string y1 y2 x y
   1254 		gsave
   1255 		1 index exch translate
   1256 		5 index 5 index true matrix tmpstip imagemask
   1257 		grestore
   1258 	    } for
   1259 	    pop
   1260 	} for
   1261 	pop pop pop pop pop
   1262     }
   1263 
   1264     # -- AdjustColor --
   1265     #
   1266     # Given a color value already set for output by the caller, adjusts that
   1267     # value to a grayscale or mono value if requested by the CL variable.
   1268     ps function AdjustColor {
   1269 	CL 2 lt {
   1270 	    currentgray
   1271 	    CL 0 eq {
   1272 		.5 lt {0} {1} ifelse
   1273 	    } if
   1274 	    setgray
   1275 	} if
   1276     }
   1277 
   1278     # x y strings spacing xoffset yoffset justify stipple DrawText --
   1279     #
   1280     # This procedure does all of the real work of drawing text. The color and
   1281     # font must already have been set by the caller, and the following
   1282     # arguments must be on the stack:
   1283     #
   1284     # x, y -	Coordinates at which to draw text.
   1285     # strings - An array of strings, one for each line of the text item, in
   1286     #		order from top to bottom.
   1287     # spacing -	Spacing between lines.
   1288     # xoffset - Horizontal offset for text bbox relative to x and y: 0 for
   1289     #		nw/w/sw anchor, -0.5 for n/center/s, and -1.0 for ne/e/se.
   1290     # yoffset - Vertical offset for text bbox relative to x and y: 0 for
   1291     #		nw/n/ne anchor, +0.5 for w/center/e, and +1.0 for sw/s/se.
   1292     # justify - 0 for left justification, 0.5 for center, 1 for right justify.
   1293     # stipple - Boolean value indicating whether or not text is to be drawn in
   1294     #		stippled fashion. If text is stippled, function StippleText
   1295     #		must have been defined to call StippleFill in the right way.
   1296     #
   1297     # Also, when this procedure is invoked, the color and font must already
   1298     # have been set for the text.
   1299     ps function DrawText {
   1300 	/stipple exch def
   1301 	/justify exch def
   1302 	/yoffset exch def
   1303 	/xoffset exch def
   1304 	/spacing exch def
   1305 	/strings exch def
   1306 	% First scan through all of the text to find the widest line.
   1307 	/lineLength 0 def
   1308 	strings {
   1309 	    cstringwidth pop
   1310 	    dup lineLength gt {/lineLength exch def} {pop} ifelse
   1311 	    newpath
   1312 	} forall
   1313 	% Compute the baseline offset and the actual font height.
   1314 	0 0 moveto baselineSampler false charpath
   1315 	pathbbox dup /baseline exch def
   1316 	exch pop exch sub /height exch def pop
   1317 	newpath
   1318 	% Translate and rotate coordinates first so that the origin is at
   1319 	% the upper-left corner of the text's bounding box. Remember that
   1320 	% angle for rotating, and x and y for positioning are still on the
   1321 	% stack.
   1322 	translate
   1323 	rotate
   1324 	lineLength xoffset mul
   1325 	strings length 1 sub spacing mul height add yoffset mul translate
   1326 	% Now use the baseline and justification information to translate
   1327 	% so that the origin is at the baseline and positioning point for
   1328 	% the first line of text.
   1329 	justify lineLength mul baseline neg translate
   1330 	% Iterate over each of the lines to output it.  For each line,
   1331 	% compute its width again so it can be properly justified, then
   1332 	% display it.
   1333 	strings {
   1334 	    dup cstringwidth pop
   1335 	    justify neg mul 0 moveto
   1336 	    stipple {
   1337 		% The text is stippled, so turn it into a path and print
   1338 		% by calling StippledText, which in turn calls
   1339 		% StippleFill. Unfortunately, many Postscript interpreters
   1340 		% will get overflow errors if we try to do the whole
   1341 		% string at once, so do it a character at a time.
   1342 		gsave
   1343 		/char (X) def
   1344 		{
   1345 		    dup type /stringtype eq {
   1346 			% This segment is a string.
   1347 			{
   1348 			    char 0 3 -1 roll put
   1349 			    currentpoint
   1350 			    gsave
   1351 			    char true charpath clip StippleText
   1352 			    grestore
   1353 			    char stringwidth translate
   1354 			    moveto
   1355 			} forall
   1356 		    } {
   1357 			% This segment is glyph name
   1358 			% Temporary override
   1359 			currentfont /Encoding get exch 1 exch put
   1360 			currentpoint
   1361 			gsave (\001) true charpath clip StippleText
   1362 			grestore
   1363 			(\001) stringwidth translate
   1364 			moveto
   1365 		    } ifelse
   1366 		} forall
   1367 		grestore
   1368 	    } {cstringshow} ifelse
   1369 	    0 spacing neg translate
   1370 	} forall
   1371     }
   1372 
   1373     # Define the "TkPhoto" function variants, which are modified versions
   1374     # of the original "transparentimage" function posted by ian@five-d.com
   1375     # (Ian Kemmish) to comp.lang.postscript. For a monochrome colorLevel
   1376     # this is a slightly different version that uses the imagemask command
   1377     # instead of image.
   1378 
   1379     ps function TkPhotoColor {
   1380 	gsave
   1381 	32 dict begin
   1382 	/tinteger exch def
   1383 	/transparent 1 string def
   1384 	transparent 0 tinteger put
   1385 	/olddict exch def
   1386 	olddict /DataSource get dup type /filetype ne {
   1387 	    olddict /DataSource 3 -1 roll
   1388 	    0 () /SubFileDecode filter put
   1389 	} {
   1390 	    pop
   1391 	} ifelse
   1392 	/newdict olddict maxlength dict def
   1393 	olddict newdict copy pop
   1394 	/w newdict /Width get def
   1395 	/crpp newdict /Decode get length 2 idiv def
   1396 	/str w string def
   1397 	/pix w crpp mul string def
   1398 	/substrlen 2 w log 2 log div floor exp cvi def
   1399 	/substrs [ {
   1400 	    substrlen string
   1401 	    0 1 substrlen 1 sub {
   1402 		1 index exch tinteger put
   1403 	    } for
   1404 	    /substrlen substrlen 2 idiv def
   1405 	    substrlen 0 eq {exit} if
   1406 	} loop ] def
   1407 	/h newdict /Height get def
   1408 	1 w div 1 h div matrix scale
   1409 	olddict /ImageMatrix get exch matrix concatmatrix
   1410 	matrix invertmatrix concat
   1411 	newdict /Height 1 put
   1412 	newdict /DataSource pix put
   1413 	/mat [w 0 0 h 0 0] def
   1414 	newdict /ImageMatrix mat put
   1415 	0 1 h 1 sub {
   1416 	    mat 5 3 -1 roll neg put
   1417 	    olddict /DataSource get str readstring pop pop
   1418 	    /tail str def
   1419 	    /x 0 def
   1420 	    olddict /DataSource get pix readstring pop pop
   1421 	    {
   1422 		tail transparent search dup /done exch not def
   1423 		{exch pop exch pop} if
   1424 		/w1 exch length def
   1425 		w1 0 ne {
   1426 		    newdict /DataSource
   1427 		    pix x crpp mul w1 crpp mul getinterval put
   1428 		    newdict /Width w1 put
   1429 		    mat 4 x neg put
   1430 		    /x x w1 add def
   1431 		    newdict image
   1432 		    /tail tail w1 tail length w1 sub getinterval def
   1433 		} if
   1434 		done {exit} if
   1435 		tail substrs {
   1436 		    anchorsearch {pop} if
   1437 		} forall
   1438 		/tail exch def
   1439 		tail length 0 eq {exit} if
   1440 		/x w tail length sub def
   1441 	    } loop
   1442 	} for
   1443 	end
   1444 	grestore
   1445     }
   1446     ps function TkPhotoMono {
   1447 	gsave
   1448 	32 dict begin
   1449 	/dummyInteger exch def
   1450 	/olddict exch def
   1451 	olddict /DataSource get dup type /filetype ne {
   1452 	    olddict /DataSource 3 -1 roll
   1453 	    0 () /SubFileDecode filter put
   1454 	} {
   1455 	    pop
   1456 	} ifelse
   1457 	/newdict olddict maxlength dict def
   1458 	olddict newdict copy pop
   1459 	/w newdict /Width get def
   1460 	/pix w 7 add 8 idiv string def
   1461 	/h newdict /Height get def
   1462 	1 w div 1 h div matrix scale
   1463 	olddict /ImageMatrix get exch matrix concatmatrix
   1464 	matrix invertmatrix concat
   1465 	newdict /Height 1 put
   1466 	newdict /DataSource pix put
   1467 	/mat [w 0 0 h 0 0] def
   1468 	newdict /ImageMatrix mat put
   1469 	0 1 h 1 sub {
   1470 	    mat 5 3 -1 roll neg put
   1471 	    0.000 0.000 0.000 setrgbcolor
   1472 	    olddict /DataSource get pix readstring pop pop
   1473 	    newdict /DataSource pix put
   1474 	    newdict imagemask
   1475 	    1.000 1.000 1.000 setrgbcolor
   1476 	    olddict /DataSource get pix readstring pop pop
   1477 	    newdict /DataSource pix put
   1478 	    newdict imagemask
   1479 	} for
   1480 	end
   1481 	grestore
   1482     }
   1483 
   1484     ps literal %%EndProlog
   1485 }
   1486 
   1487 proc tk::ensure_psenc_is_loaded {} {
   1488 }