| Server IP : 216.92.14.13 / Your IP : 216.73.216.171 Web Server : Apache System : Linux vps4089.pairvps.com 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 User : rmlac2fmr ( 1040637) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/bin/ |
Upload File : |
#!/usr/bin/perl
use strict;
use Font::TTF::Font;
use Getopt::Std;
use Pod::Usage;
use Font::TTF::Scripts::Name;
our $CHAIN_CALL;
our ($if, $of, %opts);
unless ($CHAIN_CALL)
{
getopts('f:hl:n:pqr:s:t:w:', \%opts);
# NB: -q formerly meant "disable signon message" but is no longer used
# (as there isn't a signon message). However permitted for backwards
# compatibility.
unless (defined $ARGV[1] || defined $opts{'h'})
{
pod2usage(1);
exit;
}
if ($opts{'h'})
{
pod2usage( -verbose => 2, -noperldoc => 1);
exit;
}
$if = Font::TTF::Font->open($ARGV[0]) || die "Can't read font $ARGV[0]";
}
$of = ttfname($if, %opts);
unless ($CHAIN_CALL)
{ $of->out($ARGV[1]) || die "Can't write to font file $ARGV[1]. Do you have it installed?"; }
__END__
=head1 NAME
ttfname - renames font files
=head1 SYNOPSIS
ttfname [-n "name" | -s filename] [-t num] options infile.ttf outfile.ttf
ttfname -f "full_name" options infile.ttf outfile.ttf
Renames the TTF with the given name and outputs the newly named font to
out.ttf.
=head1 OPTIONS
-n "name" specifies new font family name.
-f "name" specifies new full name.
-s filename overrides -n and gets string from file. Useful for -t
-l lang language number to use (default all langs)
if specified name entries will be added for all platforms and
encodings covered by the cmap if not already there
-p Don't update postscript font name
-r nums Removes all strings of the given ids. Space- or comma-separated
ids or id ranges (denoted by "..") may be specified.
-t num overrides the normal naming areas to change another
string -f becomes inactive. Use -l as well to create entry.
-w "name" overrides subfamily in the font (think weight). So a full name
may be made from -n and -w together.
=head1 AUTHOR
Martin Hosken L<http://scripts.sil.org/FontUtils>.
(see CONTRIBUTORS for other authors).
=head1 LICENSING
Copyright (c) 1998-2016, SIL International (http://www.sil.org)
This script 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