summaryrefslogtreecommitdiffstats
path: root/library/mkpsenc.tcl
diff options
context:
space:
mode:
authordrh <drh@sqlite.org>2002-07-19 14:27:44 (GMT)
committerdrh <drh@sqlite.org>2002-07-19 14:27:44 (GMT)
commit3cc4fef5eb948a107677c26702a1872ffc1b6d60 (patch)
tree6f8743e9601a6793409324349fe316aa16e23443 /library/mkpsenc.tcl
parent83e4a677ed3392ce3021f1138de0f2c274d605f4 (diff)
downloadtk-3cc4fef5eb948a107677c26702a1872ffc1b6d60.zip
tk-3cc4fef5eb948a107677c26702a1872ffc1b6d60.tar.gz
tk-3cc4fef5eb948a107677c26702a1872ffc1b6d60.tar.bz2
Fix a bug in the Postscript encoding vector generator that was causing
postscript generation to fail under Win2K.
Diffstat (limited to 'library/mkpsenc.tcl')
-rw-r--r--library/mkpsenc.tcl7
1 files changed, 3 insertions, 4 deletions
diff --git a/library/mkpsenc.tcl b/library/mkpsenc.tcl
index b8603ea..e7fce19 100644
--- a/library/mkpsenc.tcl
+++ b/library/mkpsenc.tcl
@@ -9,8 +9,8 @@ proc ::tk::CreatePostscriptEncoding {encoding} {
set result "/CurrentEncoding \[\n"
for {set i 0} {$i<256} {incr i 8} {
for {set j 0} {$j<8} {incr j} {
- set hexcode [format "%04X" [scan [encoding convertfrom\
- $encoding [format "%c" [expr $i+$j] ]] %c]]
+ set enc [encoding convertfrom $encoding [format %c [expr {$i+$j}]]]
+ if {[catch {format %04X [scan $enc %c]} hexcode]} continue
if [info exists ::tk::psglyphs($hexcode)] {
append result "/$::tk::psglyphs($hexcode)"
} else {
@@ -1089,7 +1089,7 @@ append ps_preamable {
50 dict begin
% This is a standard prolog for Postscript generated by Tk's canvas
% widget.
-% RCS: @(#) $Id: mkpsenc.tcl,v 1.1 2002/06/25 16:27:43 a_kovalenko Exp $
+% RCS: @(#) $Id: mkpsenc.tcl,v 1.2 2002/07/19 14:27:45 drh Exp $
% The definitions below just define all of the variables used in
% any of the procedures here. This is needed for obscure reasons
@@ -1365,4 +1365,3 @@ append ps_preamable {
proc tk::ensure_psenc_is_loaded {} {
}
-