mkpsenc.tcl 27 KB

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