home *** CD-ROM | disk | FTP | other *** search
/ Freelog Special Freeware 31 / FreelogHS31.iso / Texte / scribus / scribus-1.3.3.9-win32-install.exe / tcl / tk8.4 / mkpsenc.tcl < prev    next >
Text File  |  2002-07-19  |  27KB  |  1,368 lines

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