From d55fdab0e33be5318d790cf7d6378d779331ed60 Mon Sep 17 00:00:00 2001 From: fvogel Date: Wed, 13 Sep 2017 21:07:39 +0000 Subject: Fix the proposed patch since it had unexpected jumping effects in the fonts listbox. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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! --- library/fontchooser.tcl | 2 ++ 1 file changed, 2 insertions(+) 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) } -- cgit v0.12