[Zipguy] (2012-08-21) - I was getting a little blind after I've been using TCLkit for a while, on Windows. That's because I'm on a laptop which has a large screen, is pretty cheap and works great. But the font was smaller in TCLkit vs Wish. I've been creating TCL programs, mostly starkits, and working on them. What was really annoying was the tclkit I've been using, tclkit-8.5.8.exe, and sdx. It's console has a really small font as it appears on my screen. Here's the built in console in full blown Wish: [http://www.geocities.ws/thezipguy/tcl/console/console_wish.jpg] and here's the console in tclkit-8.5.8.exe: [http://www.geocities.ws/thezipguy/tcl/console/console_starkit.jpg] So I was right, it did have a smaller font. I poked around in the manual, wiki, and found this in [console] under discussion: ---- 2005-04-23 [Derek Peschel] Evidently the discussion goes here and the code goes on the [console for UNIX] page. See my questions in [Ask, and it shall be given # 2]. I've put these items here because they aren't questions. Brian Theado and I and maybe others have changed the [console for UNIX] script as part of the TkOutline project [http://tkoutline.sourceforge.net/wiki/]. After someone helps answer two questions I have, I think the changes should be propagated back here. They are: 1. The script has a few more comments. I also changed the punctuation of the comments for no other reason than personal taste. 2. It uses the '''$_''' variable when evaluating the library '''console.tcl''' file as well as when checking it for readability. I changed the name of the library file (so I could have my own version with a bigger font) and wasted some time wondering why my changes weren't being read. 3. Maybe more; I haven't looked in detail. [Brian Theado] - I'm pretty sure my console.tcl code is verbatim from [console for UNIX]--I've made no changes to it. I don't think anyone would object to enhancing the comments in the code on that page. As mentioned in private email, I recommend against having your own copy of the library console.tcl and instead use the [[console eval] command to get access to the console's interpreter and change the font. i.e. ====== console eval {.console configure -font {Courier 14}} ====== ---- This is a one liner that lets you increase the size of your font! I didn't know this, nor how to do this, but it does work great. Thank you [Brian Theado] and [Derek Peschel]! I changed it to this, now that I found how to do this. ====== console eval {.console config -font {{Courier New} 9} } ====== and it looks like this: [http://www.geocities.ws/thezipguy/tcl/console/console_starkit_font.jpg] Which is a lot more like Wish's full blown than this [http://www.geocities.ws/thezipguy/tcl/console/console_starkit.jpg] I thought it might make others happier to know about this, and thus this page. ---- [RLE] (2012-08-22): On the windows tclkit's I've been using, the "Edit" menu on the console contains two entries, "increase font size" and "decrease font size" that perform the corresponding operation when selected. Does your windows tclkit lack these two menu entries? [Zipguy] (2012-08-23) - I've been using a file I copied and shortened the name from tclkit-8.5.8-win32-x86_64.exe to to tclkit-8.5.8.exe because I use it in Windows "Properies" for "Shortcut"s. I got the tclkit from this wiki, from SDX -> http://www.equi4.com/pub/sk/sdx.kit -> http://code.google.com/p/tclkit/downloads/list , where I downloaded tclkitsh-8.5.8-win32-x86_64.zip, which I unzipped and have been using it. I also have a 8.5.9 version but haven't unzipped it, nor looked at it yet because 8.5.8 works good. I never looked in the "Edit" menu on the console because it is so simple and almost never changes. I did look, in my tclkit-8.5.8.exe, and it does have it there! Thanks [RLE] [http://www.geocities.ws/thezipguy/tcl/console/console_edit_tclkit.jpg] Wish's full blown console does not have it: [http://www.geocities.ws/thezipguy/tcl/console/console_edit_wish.jpg] How come no one has said anything about this? I like it. So I tried it and it didn't work! I did figure out why, so I made a change, and it did work. What I did was I commented out the line that this page is about! ====== console eval {.console config -font {{Courier New} 9} } ====== Now I feel real stupid for looking for it when it was under the "Edit" menu all the time, and wasting time looking elsewhere. Even worse, if you do change it by the line above, then it becomes somehow locked. I wish you could use the line above, or something like it, without causing the "Edit" menu font funtions to stop working. If you could, that would be great, because you could change it to a size setting that is better than stock, for most people rather than the default size in tclkit, then they could re-size the font to their hearts delight. Going to try some things. ---- [RLE] (2012-08-23): Just checked with one of my Windows tclkits (an 8.6b1 package) and if you change the font this way: console eval { font configure TkConsoleFont -size 12 } Then the "Edit" menu entries continue to work. To see what font face is in use, do: console eval { font actual TkConsoleFont } And using [font configure] you can change any of the properties of the font, and the "Edit" menu still functions. ---- [SeS] (2012-08-24): To my surprise, this 'console eval' command is also able to handle bindings...this enables some more possibilities: If one is really in a hurry, one could change the font-size on-the-fly with the Control-key and Mousewheel (aka webbrowser style and also as implemented in the Source Editor of [tGĀ²] v1.06.01.42 ): ====== console eval { bind .console { set fnt [.console cget -font] switch [llength $fnt] { "1" {set style ""; set size 10} "2" {set style ""; set size [lindex $fnt 1]} "3" {set style "[lindex $fnt end]"; set size [lindex $fnt 1]} } if {%D>0} { if {($size+1)<=19} { .console configure -font "{[lindex $fnt 0]} [expr {$size+1}] $style" } } { if {($size-1)>=5} { .console configure -font "{[lindex $fnt 0]} [expr {$size-1}] $style" } } } } ====== note: tested on ActiveState ActiveTcl 8.4.19.3 wish console, Win7 OS. <> Arts and crafts of Tcl-Tk programming | Command | SDX