From: SourceForge.net <no...@so...> - 2011-04-11 08:26:15
|
Bugs item #1567292, was opened at 2006-09-28 21:15 Message generated for change (Comment added) made by markgsaye You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=1567292&group_id=12997 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 45. Aqua Fonts Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Daniel A. Steffen (das) Summary: font size and tk scaling Initial Comment: Font size selection in 8.4.13 depended on the current [tk scaling] factor, but doesn't do so in 8.5a4 or the cvs HEAD version. The way it used to work was odd, if any item was using a particular font and size, the scaling factor was locked for that size until nothing was using it, then it would be recalculated. In the following script, in 8.4.13, initially it shows the first line smallest and second line largest; after the delay, the third line is smallest, the first line is the same size as the 2nd line was initially, and the second line is still largest, and larger than it was. In 8.5, initially it shows the first line largest and the third line smallest; then lines 1 and 2 swap, and none are scaled by the scaling factor. Note that a font in the context of a canvas should use the scaling factor of that canvas, even if tk scaling has been changed since then, as distance conversions in that canvas are all scaled based on the scaling factor at the time the canvas was created. tk scaling 1.25 canvas .a -width 5i -height 5i -background grey45 .a create rectangle 1i .2i 4i .8i -fill white .a create text 2.5i .5i -text {Sample text} \ -font {Helvetica 14} tk scaling 2.5 .a create rectangle 1i 1.2i 4i 1.8i -fill white .a create text 2.5i 1.5i -text {Sample text} \ -font {Helvetica 12} .a create rectangle 1i 2.2i 4i 2.8i -fill white .a create text 2.5i 2.5i -text {Sample text} \ -font {Helvetica 10} pack .a update after 2000 tk scaling 1.25 .a itemconfigure 2 -font {Helvetica 12} tk scaling 2.5 .a itemconfigure 4 -font {Helvetica 14} ---------------------------------------------------------------------- Comment By: Mark G. Saye (markgsaye) Date: 2011-04-11 09:26 Message: The following code used to work in 8.4.x (to rescale all named fonts after the tk scaling had been changed), but does not in 8.5+: foreach font [font names] { font configure $font -size [font configure $font -size] } See: http://wiki.tcl.tk/8488 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=1567292&group_id=12997 |