|
Server : Apache/2.4.18 (Ubuntu) System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 User : oppastar ( 1041) PHP Version : 7.0.33-0ubuntu0.16.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Directory : /var/www/vajra.id/public_html/application/third_party/dompdf/lib/ttf2ufm/src/app/TeX/ |
Upload File : |
#!/usr/bin/perl -w
#
# Copyright (c) 2002 Mike Fabian <mike.fabian@gmx.de>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
use English;
use Getopt::Long;
sub usage {
print "Usage: sfd2map [-debug|d]\n\n";
print "Converts a .sfd files in the format used by ttf2pk and ttf2tfm\n";
print "into .map files in the format expected by ttf2pt1. For example:\n\n";
print " sfd2map < UJIS.sfd > UJIS.map \n\n";
exit 1;
}
# Process command line options
my %opt;
unless (GetOptions(\%opt,
'-debug|d' , \$OPT_DEBUG
)) {
&usage();
exit 1;
}
if($OPT_DEBUG) {
}
open (MAP, ">&STDOUT");
open (SFD, "<&STDIN");
print MAP "# generated from a .sfd file by sfd2map to make it usable with ttf2pt1\n";
print MAP "#\n";
while (<SFD>) {
if ( ! ($ARG =~ /^[[:space:]]*\#/)) { # skip comment lines
# handle plane numbers:
if ( $ARG =~ /^([[:xdigit:]]{2})[[:space:]]*/ ) {
$ARG =~ s/^([[:xdigit:]]{2})[[:space:]]*/ /;
print MAP "plane $1\n";
print MAP "at 0x00\n";
}
# remove continuation chars '\':
$ARG =~ s/\\$//;
$ARG =~ s/(0x[[:xdigit:]]{1,4})/$1,/g;
# handle ranges like 0xF800_0xF8FF
$ARG =~ s/(0x[[:xdigit:]]{1,4}),_/$1-/g;
}
print MAP $ARG;
}