1 2 3 4 5 6 7 8 9
use Win32::Fonts::Info; my $F=Win32::Fonts::Info->new(); my $truetypefonts = $F->GetTrueTypeFonts(); foreach (keys %{$truetypefonts}) { print $_ . "=" . %{$truetypefonts}->{$_} . "\n"; }
1 2 3 4 5 6 7 8 9 10 11
use strict; use warnings; use Win32::Fonts::Info; my $F=Win32::Fonts::Info->new() or die $!; my $truetypefonts = $F->GetTrueTypeFonts() or die $!; foreach (keys %{$truetypefonts}) { print $_ . "=" . %{$truetypefonts}->{$_} . "\n"; }
2011-05-23T09:38:06 GwenDragonSchon msg #149027 probiert?
No such file or directory at ftest.pl line 10.
1
2
3
4
5
6
7
8
9
10
11
12
13
#!perl
use strict;
use warnings;
use utf8;
use Data::Dumper qw/Dumper/;
use Win32::Fonts::Info;
my $F=Win32::Fonts::Info->new() or die $!;
my $truetypefonts = $F->GetTrueTypeFonts() or die $!;
print Dumper($F);
exit(0);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!perl
use strict;
use warnings;
use utf8;
$|=1;
use Win32API::Registry qw( :ALL );
my ($key, $uIndex, $name, $nameLength, $type, $data, $dataLength );
my $ok=RegOpenKeyEx( HKEY_LOCAL_MACHINE , "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts", 0, KEY_READ, $key );
if($key){
my $uIndex=0;
do{
RegEnumValue ( $key, $uIndex, $name, $nameLength, [], $type, $data, $dataLength );
print "$name=$data\r\n";
$uIndex++;
}
while(!regLastError());
}
RegCloseKey( $key );
my @array = $mw->fontFamilies;
1
2
3
Using a hash as a reference is deprecated at C:\Users\Tester\Desktop\test.pl lin
e 10.
Bad file descriptor at C:\Users\Tester\Desktop\test.pl line 6.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use strict; use warnings; $|=1; use Win32API::Registry qw( :ALL ); my ($key, $uIndex, $name, $nameLength, $type, $data, $dataLength ); my $ok=RegOpenKeyEx( HKEY_LOCAL_MACHINE , "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts", 0, KEY_READ, $key ); if($key){ my $uIndex=0; do{ RegEnumValue ( $key, $uIndex, $name, $nameLength, [], $type, $data, $dataLength ); print "$name=$data\r\n"; $uIndex++; } while(!regLastError()); } RegCloseKey( $key );
2011-05-23T09:36:07 GwenDragon@Kean
Wieso ist das ein Problem mit Graphischen Oberflächen?