summaryrefslogtreecommitdiffstats
path: root/library/fontchooser.tcl
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-09-13 21:07:39 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-09-13 21:07:39 (GMT)
commite0f48e9a758dd7144dabbb437aeddb50b0e5af3f (patch)
treeb518372aa472cee5e343591a5bf3f322e3e73248 /library/fontchooser.tcl
parent071315a7089435a43c9d1f29ecb534e41c122665 (diff)
downloadtk-e0f48e9a758dd7144dabbb437aeddb50b0e5af3f.zip
tk-e0f48e9a758dd7144dabbb437aeddb50b0e5af3f.tar.gz
tk-e0f48e9a758dd7144dabbb437aeddb50b0e5af3f.tar.bz2
Fix the proposed patch since it had unexpected jumping effects in the fonts listbox. bug_8277e1a906
For instance in wish (the extrafont package is supposed to have been installed): tk fontchooser show ; # shows existing fonts package require extrafont extrafont::load /home/francois/Téléchargements/Term-RegCcc.ttf tk fontchooser show ; # check that the new font family "Term" is now available in the listbox # click on a font family _before_ "Term" -> fine # click on a font family _after_ "Term" -> the font listbox jumped to the top of the list!
Diffstat (limited to 'library/fontchooser.tcl')
-rw-r--r--library/fontchooser.tcl2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/fontchooser.tcl b/library/fontchooser.tcl
index 14ac650..5395acb 100644
--- a/library/fontchooser.tcl
+++ b/library/fontchooser.tcl
@@ -66,6 +66,8 @@ proc ::tk::fontchooser::Show {} {
tk::PlaceWindow $S(W) widget $S(-parent)
}
set S(fonts) [lsort -dictionary [font families]]
+ set S(fonts,lcase) {}
+ foreach font $S(fonts) { lappend S(fonts,lcase) [string tolower $font]}
wm deiconify $S(W)
}