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);