summaryrefslogtreecommitdiff
path: root/Master/tlpkg/dev/check-tk-used-font.pl
blob: c906c5506e64aeba05415304a1ee57cc0436c82d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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";
}