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}
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