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)
commitd55fdab0e33be5318d790cf7d6378d779331ed60 (patch)
treeb518372aa472cee5e343591a5bf3f322e3e73248 /library/fontchooser.tcl
parentccac2d455b4b87c2c75602c2502911ffced4e9cc (diff)
downloadtk-d55fdab0e33be5318d790cf7d6378d779331ed60.zip
tk-d55fdab0e33be5318d790cf7d6378d779331ed60.tar.gz
tk-d55fdab0e33be5318d790cf7d6378d779331ed60.tar.bz2
Fix the proposed patch since it had unexpected jumping effects in the fonts listbox.
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)
}