Hi All,
I've been stuck on this problem for days: I'm trying to generate texts from the canvas object using its "postscript" option to get .ps file. I found that it worked fine if I draw lines, ovals, etc on the canvas and they were shown in the .ps file, however, I had no luck with the text objects -- even if they were shown on the canvas (on display), there were not captured in the output .ps file.
Anyone has a thought on this? You can assume all the variables are well-defined.
wm geometry . +0+0
wm resizable . false false
set wtitle "Drawing Chinese Character"
frame .frm -width $pad_width -height $pad_height -relief raised -bd 2
canvas .p0 -width $pad_width -height $pad_height -relief raised -bd 0
.p0 create rectangle 0 0 $pad_width $pad_height -outline gray -fill white -width 0
.p0 create text $akx $aky -text "\u9177" -font -Adobe-Times-Bold-R-Normal-*-$fontsize-*
.p0 create line 0 0 $pad_width $pad_height -fill red -width 2 -arrow last
pack .p0 -in .frm -fill both
pack .frm -side bottom
update;
.p0 postscript -fontmap fontMap -file "char.ps"