| Description: |
The text widget inherits its default options from Tk's option database.
However, when a font is only partially specified, the unspecified elements seem
not to be inherited from Tk's option database.
Demo:
package require Tk
option add *Text.font {-family TkFixedFont -size 48}
pack [text .t -height 5 -width 15]
.t insert end "Line 1\nLine 2"
.t cget -font ; # returns: -family TkFixedFont -size 48
# font is correctly inherited from the option database
.t configure -font {-overstrike 1} ; # partial font spec
# displayed font looks different
The end result seems different in both -family and -size, although only the
-overstrike option was changed. Which exactly font is used and why, is unclear.
dzach
|