Menu

#2107 Bug in [font actual] doesn't reflect [tk scaling]

obsolete: 8.5a7
open
6
2007-10-07
2006-08-29
Anonymous
No

Text of the default font appears in a different size
than text that has been tagged and assigned the default
font with "-weight normal".

The bug is can be reproduced following these steps:

hat:/home/steve> wish
% text .t
.t
% .t insert 1.0 "Line one\n"
% .t insert 2.0 "Line two\n"
% .t tag add weighted 1.0 1.8
% .t tag configure weighted -font "[font actual [.t
cget -font]] -weight normal"
% pack .t

An example screencap is available here:
http://azul7.net/~steve/mystery.png

Submitted by Steve Havelka (smh@rs.tc)

Discussion

  • Francois VOGEL

    Francois VOGEL - 2007-10-07

    Logged In: YES
    user_id=1245417
    Originator: NO

    Similar (if not identical) issue on Linux with Tcl/Tk 8.5a7 is with the two liner:

    set myfont "-family LucidaTypewriter -size 9 -weight normal -slant
    for {set i 1} {$i<6} {incr i} {puts [set myfont [font actual $myfont]]}

    The output of the for loop is:

    -family LucidaTypewriter -size 12 -weight normal -slant roman -underline 0 -overstrike 0
    -family LucidaTypewriter -size 14 -weight normal -slant roman -underline 0 -overstrike 0
    -family LucidaTypewriter -size 19 -weight normal -slant roman -underline 0 -overstrike 0
    -family LucidaTypewriter -size 24 -weight normal -slant roman -underline 0 -overstrike 0
    -family LucidaTypewriter -size 24 -weight normal -slant roman -underline 0 -overstrike 0

    Observe how the -size increases just by applying [font actual ] repeatedly.

    Comments?

    Francois

     
  • Donal K. Fellows

    • milestone: --> obsolete: 8.5a7
    • priority: 5 --> 6
     
MongoDB Logo MongoDB