From 6bda13e64bd74b3e61e8ca3f7ff6eaf0dc0d6d63 Mon Sep 17 00:00:00 2001 From: milkbone57 Date: Mon, 21 Jul 2003 19:09:05 +0000 Subject: [PATCH] "" --- plugins/Tk-GUI/Tk-GUI.pl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/plugins/Tk-GUI/Tk-GUI.pl b/plugins/Tk-GUI/Tk-GUI.pl index 9b941bc..efe4f13 100644 --- a/plugins/Tk-GUI/Tk-GUI.pl +++ b/plugins/Tk-GUI/Tk-GUI.pl @@ -19,7 +19,19 @@ my $mw = MainWindow->new(); $mw->withdraw(); $mw->OnDestroy(\&on_destroy); -$mw->optionAdd("*font", "-*-tahoma,arial-norma-r-*-*-*-120-*-*-*-*-*-*"); +my %installed_fonts; +$installed_fonts{lc($_)} = 1 for $mw->fontFamilies; +my $defaultFont; +if($installed_fonts{'tadhoma'}) +{ + $defaultFont = 'tahoma'; +} +else +{ + $defaultFont = 'arial'; +} + +$mw->optionAdd("*font", "-*-$defaultFont-norma-r-*-*-*-120-*-*-*-*-*-*"); $mw->optionAdd("*borderWidth", 1); $mw->optionAdd("*highlightThickness", 0);