Tk Library Source Code

Artifact [43da096765]
Login

Artifact 43da09676547b1c2ec96b9c1647e4bb577942e87:

Attachment "font.tcl-patch" to ticket [524353ffff] added by pkienzle 2002-03-01 21:59:28.
129,130c129,131
<     if { [Widget::getoption "$path#SelectFont" -querysystem] } {
<         loadfont [Widget::getoption "$path#SelectFont" -families]
---
>     if { ![info exists _families(all)] && \
> 	    [Widget::getoption "$path#SelectFont" -querysystem] } {
>         loadfont
324c325
< proc SelectFont::loadfont { which } {
---
> proc SelectFont::loadfont { } {
327,328c328,338
<     if { ![info exists _families(all)] } {
< 	set _families(all) [lsort [font families]]
---
>     # initialize families
>     set _families(all) {}
>     set _families(fixed) {}
>     set _families(variable) {}
>     set lfont     [font families]
>     lappend lfont times courier helvetica
>     foreach font $lfont {
>         set family [font actual [list $font] -family]
>         if { [lsearch -exact $_families(all) $family] == -1 } {
>             lappend _families(all) $family
>         }
330,339c340,345
<     if { ![info exists _families($which)] } {
< 	# initialize families
< 	set _families(fixed) {}
< 	set _families(variable) {}
< 	foreach family $_families(all) {
< 	    if { [font metrics [list $family] -fixed] } {
< 		lappend _families(fixed) $family
< 	    } else {
< 		lappend _families(variable) $family
< 	    }
---
>     set _families(all) [lsort $_families(all)]
>     foreach family $_families(all) {
> 	if { [font metrics [list $family] -fixed] } {
> 	    lappend _families(fixed) $family
> 	} else {
> 	    lappend _families(variable) $family