/usr/share/perl5/Font/TTF/Win32.pm is in libfont-ttf-perl 1.06-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | package Font::TTF::Win32;
# use strict;
# use vars qw($HKEY_LOCAL_MACHINE);
use Win32::Registry;
use Win32;
use File::Spec;
use Font::TTF::Font;
sub findfonts
{
my ($sub) = @_;
my ($font_key) = 'SOFTWARE\Microsoft\Windows' . (Win32::IsWinNT() ? ' NT' : '') . '\CurrentVersion\Fonts';
my ($regFont, $list, $l, $font, $file);
# get entry from registry for a font of this name
$::HKEY_LOCAL_MACHINE->Open($font_key, $regFont);
$regFont->GetValues($list);
foreach $l (sort keys %{$list})
{
my ($fname) = $list->{$l}[0];
next unless ($fname =~ s/\(TrueType\)$//o);
$file = File::Spec->rel2abs($list->{$l}[2], "$ENV{'windir'}/fonts");
$font = Font::TTF::Font->open($file) || next;
&{$sub}($font, $fname);
$font->release;
}
}
1;
=head1 AUTHOR
Martin Hosken L<http://scripts.sil.org/FontUtils>.
=head1 LICENSING
Copyright (c) 1998-2016, SIL International (http://www.sil.org)
This module is released under the terms of the Artistic License 2.0.
For details, see the full text of the license in the file LICENSE.
=cut
|