File: gfont_mkgdf_all.pl

package info (click to toggle)
gfont 1.0.2-5
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 640 kB
  • ctags: 457
  • sloc: ansic: 6,265; sh: 452; makefile: 225; perl: 179
file content (42 lines) | stat: -rw-r--r-- 826 bytes parent folder | download | duplicates (2)
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
#!@PATH_PERL@
eval 'exec @PATH_PERL@ -S $0 ${1+"$@"}'
    if $running_under_some_shell;
##
##  mkgdf_pre -- Pregenerate GdF Files from Fontmap
##  Copyright (c) 1997 Ralf S. Engelschall, <rse@engelschall.com>
##

require 5.003;
use strict;

use vars qw($mkgdf $fontmap $gdfdir $tmpgdfdir);
use vars qw(@FONT, $font);

$mkgdf     = "@libdir@@libsubdir@/exec/gfont_mkgdf";
$fontmap   = "@libdir@@libsubdir@/etc/Fontmap";
$gdfdir    = "@libdir@@libsubdir@/gdf";
$tmpgdfdir = "@tmpgdfdir@";

sub system {
    my ($cmd) = @_;

    printf("$cmd\n");
    system($cmd);
}

@main::FONT = ();
open(FP, "<$fontmap");
while (<FP>) {
    next if (m|^\s*#.+|);
    next if (m|^\s+$|);
    if (m|^(\S+)\s+\S+\s*\n?$|) {
        push(@main::FONT, $1);
    }
}
close(FP);

foreach $font (@main::FONT) {
    &system("$mkgdf $font");
}

##EOF##