diff options
author | gregor herrmann <gregoa@debian.org> | 2023-12-15 21:25:55 +0100 |
---|---|---|
committer | gregor herrmann <gregoa@debian.org> | 2023-12-15 21:25:55 +0100 |
commit | 900134cb227e50fe9047d0f48707ec7899c8c1f0 (patch) | |
tree | fe5bc6f0e7e00ccf9ad39ee858720d842bb82a1f /examples/020_corefonts | |
parent | 00c23136faf4a0a7015ba5f8daecb98fb33ba6cc (diff) | |
parent | e2f017af7599617065e54b1ad68a0ccc6afaf980 (diff) |
Update upstream source from tag 'upstream/3.026'
Update to upstream version '3.026'
with Debian dir d8536bf85ae20bcf7ac21ae3322a229ea3f49b28
Diffstat (limited to 'examples/020_corefonts')
-rw-r--r-- | examples/020_corefonts | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/examples/020_corefonts b/examples/020_corefonts index bd99bfa..515e785 100644 --- a/examples/020_corefonts +++ b/examples/020_corefonts @@ -1,7 +1,7 @@ #!/usr/bin/perl -# wants one or more font names on the command line. If none, use list of -# core fonts. +# wants one or more font names on the command line. If none given, use full +# list of core fonts. If -s given as first arg, use the short list. # CAUTION: the displayed Unicode value (U=xxxx) appears to be correct in most # cases, except that the MS Smart Quotes (32 characters) are given as U=0080 @@ -21,8 +21,8 @@ use lib '../lib'; use PDF::Builder; use PDF::Builder::Util; -my $compress = 'none'; # uncompressed streams -#my $compress = 'flate'; # compressed streams +#my $compress = 'none'; # uncompressed streams +my $compress = 'flate'; # compressed streams my $sx = 33; my $sy = 45; @@ -70,6 +70,16 @@ my @fns=qw{ # bankgothicbolditalic # bankgothicitalic +my @ARGVcopy = @ARGV; +# 'short' (-s flag)? +if (@ARGVcopy > 0 && $ARGVcopy[0] eq '-s') { + @ARGVcopy = qw{ + Courier-Bold + Times-Italic + Symbol + }; +} + # use only with single byte encodings, as multibyte (including UTF-8) don't # appear to be compatible with these core fonts # there may be a number of aliases available for each encoding. @@ -111,8 +121,8 @@ my @ecs = qw{ my ($y, $pdf, $f1); # override default list with command line entries -if (scalar @ARGV) { - @fns = @ARGV; +if (scalar @ARGVcopy && $ARGVcopy[0] ne '-s') { + @fns = @ARGVcopy; } # loop through list of font names |