LEFT | RIGHT |
(no file at all) | |
1 #!@PERL@ | 1 #!@PERL@ |
2 | 2 |
3 ################################################## | 3 ################################################## |
4 # Convert stylized Metafont to PostScript Type 1 # | 4 # Convert stylized Metafont to PostScript Type 1 # |
5 # By Scott Pakin <scott+mf@pakin.org> # | 5 # By Scott Pakin <scott+mf@pakin.org> # |
6 ################################################## | 6 ################################################## |
7 | 7 |
8 ######################################################################## | 8 ######################################################################## |
9 # mf2pt1 # | 9 # mf2pt1 # |
10 # Copyright (C) 2012 Scott Pakin # | 10 # Copyright (C) 2012 Scott Pakin # |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 ENDHEADER | 419 ENDHEADER |
420 } | 420 } |
421 | 421 |
422 | 422 |
423 # Use MetaPost to generate one PostScript file per character. We | 423 # Use MetaPost to generate one PostScript file per character. We |
424 # calculate the font bounding box from these characters and store them | 424 # calculate the font bounding box from these characters and store them |
425 # in @fontbbox. If the input parameter is 1, set other font | 425 # in @fontbbox. If the input parameter is 1, set other font |
426 # parameters, too. | 426 # parameters, too. |
427 sub get_bboxes ($) | 427 sub get_bboxes ($) |
428 { | 428 { |
429 execute_command 1, ("mpost", "-mem=mf2pt1", "-progname=mpost", | 429 execute_command 1, ("mpost", "-mem=mf2pt1", "-recorder", "-progname=mpost", |
430 "\\mode:=localfont; mag:=$mag; bpppix $bpppix; nonstopmo
de; input $mffile"); | 430 "\\mode:=localfont; mag:=$mag; bpppix $bpppix; nonstopmo
de; input $mffile"); |
431 opendir (CURDIR, ".") || die "${progname}: $! ($filedir)\n"; | 431 opendir (CURDIR, ".") || die "${progname}: $! ($filedir)\n"; |
432 @charfiles = sort | 432 @charfiles = sort |
433 { ($a=~ /\.(\d+)$/)[0] <=> ($b=~ /\.(\d+)$/)[0] } | 433 { ($a=~ /\.(\d+)$/)[0] <=> ($b=~ /\.(\d+)$/)[0] } |
434 grep /^$filebase.*\.\d+$/, readdir(CURDIR); | 434 grep /^$filebase.*\.\d+$/, readdir(CURDIR); |
435 close CURDIR; | 435 close CURDIR; |
436 @fontbbox = (1000000, 1000000, -1000000, -1000000); | 436 @fontbbox = (1000000, 1000000, -1000000, -1000000); |
437 foreach my $psfile (@charfiles) { | 437 foreach my $psfile (@charfiles) { |
438 # Read the character number from the output file's extension. | 438 # Read the character number from the output file's extension. |
439 $psfile =~ /\.(\d+)$/; | 439 $psfile =~ /\.(\d+)$/; |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 | 1081 |
1082 | 1082 |
1083 =head1 SEE ALSO | 1083 =head1 SEE ALSO |
1084 | 1084 |
1085 mf(1), mpost(1), t1asm(1), fontforge(1) | 1085 mf(1), mpost(1), t1asm(1), fontforge(1) |
1086 | 1086 |
1087 | 1087 |
1088 =head1 AUTHOR | 1088 =head1 AUTHOR |
1089 | 1089 |
1090 Scott Pakin, I<scott+mf@pakin.org> | 1090 Scott Pakin, I<scott+mf@pakin.org> |
LEFT | RIGHT |