In addition to my previous e-mail, I want to add the following link in which there are some explanations and an example code for creating postscript. However the following is only useful if you are into Tcl/Tk:
http://flylib.com/books.php?ln=en&n=3&p=480&c=292&p1=1&c1=1&c2=478&view=2 Firat 2010/8/23 Michael Lange <klappn...@web.de> > Hello all, > > I am stuck here with a strange problem creating postscript from a > Tkinter Canvas (the OS is debian linux). > I found that Canvas.postscript() fails to render some fonts correctly and > uses something like helvetica or courier (I guess) instead. From what the > canvas man page says, I thought I should try to add a fontmap to the > postscript() command, but I cannot seem to get it working, and I am not > sure if it is because of improper use of the fontmap option or if > something else is wrong. > >From the few Tcl resources I could find I tried to set up a minimal tcl > example, trying to find out how the "fontmap" works, because I could not > find any useful Python resources: > > canvas .c -width 300 -height 300 -bg white > pack .c > set fonty [font create -family "comic sans ms" -size 16] > .c create text 20 20 -font $fonty -text "ich wollt ich waer ein huhn" > -anchor nw > set fontMap($fonty) [list "comic sans ms" 16] > update idletasks > .c postscript -file "~/test.ps" -fontmap fontMap > > However this produces an obviously broken postscript file that cannot be > opened. > If I omit the -fontmap option, the file can be opened, but I get a font > like > helvetica or so. > > Does anyone have a clue on this? > > Regards > > Michael > > > .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. > > "Life and death are seldom logical." > "But attaining a desired goal always is." > -- McCoy and Spock, "The Galileo Seven", stardate 2821.7 > _______________________________________________ > Tkinter-discuss mailing list > Tkinter-discuss@python.org > http://mail.python.org/mailman/listinfo/tkinter-discuss >
_______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss