From 1921ef49afe5000b4b465f01ffeaec7a2f9397d6 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 4 Feb 2010 01:58:57 +0000 Subject: add a perl script to check for the actually used font in Tk git-svn-id: svn://tug.org/texlive/trunk@16912 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/dev/check-tk-used-font.pl | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Master/tlpkg/dev/check-tk-used-font.pl diff --git a/Master/tlpkg/dev/check-tk-used-font.pl b/Master/tlpkg/dev/check-tk-used-font.pl new file mode 100644 index 00000000000..c906c5506e6 --- /dev/null +++ b/Master/tlpkg/dev/check-tk-used-font.pl @@ -0,0 +1,30 @@ + +use strict; +$^W=1; + +use Tk; +use Tk::Font; + +my $mw = MainWindow->new(); +my $l = $mw->Label(-text => "Hello"); +$l->pack; + +my $f = $l->Font(); + +my %fp = $f->configure(); +print "preset settings:\n"; +for my $k (keys %fp) { + if (defined($fp{$k})) { + print "$k -> $fp{$k}\n"; + } else { + print "$k -> undefined\n"; + } +} + +print "actually used settings:\n"; +my %fp = $f->actual(); +for my $k (keys %fp) { + print "$k -> $fp{$k}\n"; +} + + -- cgit v1.2.3