libpostscript-file-perl-2.20+dfsg.orig/0000755000175000017500000000000011715743427017376 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/Makefile.PL0000644000175000017500000000227111715531042021336 0ustar gregoagregoa use strict; use warnings; use 5.008; use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "Class for creating Adobe PostScript files", "AUTHOR" => "Christopher J. Madsen ", "BUILD_REQUIRES" => { "FindBin" => 0, "List::Util" => 0, "Test::More" => "0.88" }, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.30" }, "DISTNAME" => "PostScript-File", "EXE_FILES" => [], "LICENSE" => "perl", "NAME" => "PostScript::File", "PREREQ_PM" => { "Carp" => 0, "Encode" => "2.21", "Exporter" => "5.57", "File::Spec" => 0, "Scalar::Util" => 0, "Sys::Hostname" => 0 }, "VERSION" => "2.20", "test" => { "TESTS" => "t/*.t" } ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; my $pp = $WriteMakefileArgs{PREREQ_PM}; for my $mod ( keys %$br ) { if ( exists $pp->{$mod} ) { $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; } else { $pp->{$mod} = $br->{$mod}; } } } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); libpostscript-file-perl-2.20+dfsg.orig/META.json0000644000175000017500000001603311715531042021006 0ustar gregoagregoa{ "abstract" : "Class for creating Adobe PostScript files", "author" : [ "Christopher J. Madsen " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 4.300006, CPAN::Meta::Converter version 2.113640", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "PostScript-File", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.30" } }, "runtime" : { "recommends" : { "Font::AFM" : 0 }, "requires" : { "Carp" : 0, "Encode" : "2.21", "Exporter" : "5.57", "File::Spec" : 0, "Scalar::Util" : 0, "Sys::Hostname" : 0, "perl" : "5.008" } }, "test" : { "recommends" : { "File::Temp" : "0.15" }, "requires" : { "FindBin" : 0, "List::Util" : 0, "Test::More" : "0.88" }, "suggests" : { "Test::Differences" : 0 } } }, "release_status" : "stable", "resources" : { "repository" : { "type" : "git", "url" : "git://github.com/madsen/postscript-file.git", "web" : "http://github.com/madsen/postscript-file" } }, "version" : "2.20", "x_Dist_Zilla" : { "plugins" : [ { "class" : "tools::FixupPSFilePOD", "name" : "=tools::FixupPSFilePOD", "version" : "2.20" }, { "class" : "tools::ExtractFunctionDocs", "name" : "=tools::ExtractFunctionDocs", "version" : "2.20" }, { "class" : "Dist::Zilla::Plugin::VersionFromModule", "name" : "CJM/VersionFromModule", "version" : "0.08" }, { "class" : "Dist::Zilla::Plugin::GatherDir", "name" : "CJM/GatherDir", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "CJM/PruneCruft", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "CJM/ManifestSkip", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "CJM/MetaJSON", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "CJM/MetaYAML", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "CJM/License", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::Test::PrereqsFromMeta", "name" : "CJM/Test::PrereqsFromMeta", "version" : "4.04" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "CJM/PodSyntaxTests", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::ExtraTests", "name" : "CJM/ExtraTests", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::PodLoom", "config" : { "Pod::Loom version" : "0.05" }, "name" : "CJM/PodLoom", "version" : "4.10" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "name" : "CJM/MakeMaker", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "CJM/MetaConfig", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::MatchManifest", "name" : "CJM/MatchManifest", "version" : "4.00" }, { "class" : "Dist::Zilla::Plugin::RecommendedPrereqs", "name" : "CJM/RecommendedPrereqs", "version" : "4.06" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "CJM/CheckPrereqsIndexed", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::GitVersionCheckCJM", "name" : "CJM/GitVersionCheckCJM", "version" : "4.03" }, { "class" : "Dist::Zilla::Plugin::TemplateCJM", "name" : "CJM/TemplateCJM", "version" : "4.00" }, { "class" : "Dist::Zilla::Plugin::Repository", "name" : "CJM/Repository", "version" : "0.18" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "name" : "CJM/@Git/Check", "version" : "1.112510" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "name" : "CJM/@Git/Commit", "version" : "1.112510" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "name" : "CJM/@Git/Tag", "version" : "1.112510" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "name" : "CJM/@Git/Push", "version" : "1.112510" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "CJM/TestRelease", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "CJM/UploadToCPAN", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::ArchiveRelease", "name" : "CJM/ArchiveRelease", "version" : "4.00" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "AutoPrereqs", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "4.300006" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "4.300006" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "4.300006" } } } libpostscript-file-perl-2.20+dfsg.orig/Changes0000644000175000017500000001751011715531042020661 0ustar gregoagregoaRevision history for Perl extension PostScript::File. 2.20 February 11, 2012 API improvements: - Added use_functions method, which selects functions from a library provided by new module PostScript::File::Functions. - Added set_min_langlevel method - Added all_comments strip type - Renamed methods add_function, get_functions, & has_function to add_procset, get_procsets, & has_procset. The old names are still available for backwards compatibility, but their use is deprecated. - Multi-line string literals are now protected from comment/whitespace stripping. - Fixed bug: add_preview might strip the preview - Fixed bug: check_tilde treated "0" like the empty string - Private methods bbox_comment, pre_pages, post_pages, & print_file were renamed. You shouldn't have been using them anyway. - The get_ordinal method is now private. While it was formerly documented, it unnecessarily exposed the internals and had no real use. - The documentation has been cleaned up. 2.11 October 11, 2011 Improvements to word wrapping provided by Metrics objects: - Added optional \%param to wrap method - Added set_wrap_chars method - You can now use ZERO WIDTH SPACE (U+200B) to allow breaking a line at any point. - Fixed bug: wrap method didn't wrap after hyphens. By default, it now wraps after hyphens, dashes, and forward slashes. - Word wrapping now has tests 2.10 May 5, 2011 API improvements: - You can pass "newpage => 0" to the constructor to prevent it from creating the first page. This leads to more natural loops, because you call newpage before each page (instead of "before each page except the first"). - Added get_printable_width, get_printable_height, get_page_printable_width, & get_page_printable_height methods - Fixed bug: clipping never actually worked - Fixed bug: errx parameter was not handled correctly in new - Documentation fixes 2.02 December 24, 2010 - Revised the rules for hyphen-minus processing: If it's preceded by punctuation and followed by a digit, or it's followed by a currency symbol, it's a minus sign (U+2212). - Clean up use of eval and properly localize $@ 2.01 March 3, 2010 - The metrics for the cp1252 encoding did not reflect the accents mapped to control characters (but those characters are not normally used, anyway). - Fixed some warnings in the test suite - Version 2.00 actually needs Encode 2.21, but only specified 2.12 2.00 February 26, 2010 - Numerous API changes, mostly minor, but there could be problems with backwards compatibility. - Changed ISOLatin1Encoding to match PostScript's The HYPHEN-MINUS (\x2D) is now /minus instead of /hyphen. Use SOFT-HYPHEN (\xAD) to get a proper hyphen. Made the same change to Win1252Encoding (cp1252). Please read Hyphens and Minus Signs in PostScript::File for details. - Added auto_hyphen attribute with get/set methods - Added need_fonts attribute - Added as_string, embed_font, need_resource, & testable_output methods - add_resource accepts all DSC 3.0 resource types, but no longer accepts generic 'Resource' type - Reencode fonts added using embed_font or add_resource - Added PostScript::File::Metrics, which includes the metrics for the standard PostScript fonts. No more trying to configure Font::AFM!!! - PNG output has been removed. Use PostScript::Convert instead. - embed_document now handles & removes TIFF, WMF, or EPSI preview - output accepts an open filehandle as a filename alternative - Passing undef to output always returns the PostScript as a string Minor changes in 2.00: - Don't reencode Symbol; it doesn't use the StandardEncoding. This is not backwards compatible, but I doubt anyone was using Symbol-iso, as it's not very useful. - Mapped some control characters as accents in Win1252Encoding, since the Red Book suggests they are required in langlevel 1 - add_default, add_resource, add_setup, add_page_setup, add_page_trailer, & add_trailer now append instead of overwriting previous value - add_function is now a no-op if has_function returns true - add_resource uses BeginResource instead of deprecated comments - get_strip now returns 'none', 'space', or 'comments' instead of the regular expression being used - In eps mode, output now returns a list of pages - Multiple calls to output no longer cause duplicate resources - Passing a filename to output does not permanently set the filename - Fonts & resources appear in the document Setup section instead of the Prolog - Include a Local Variables section for Emacs in the %%Trailer describing the file's encoding 1.05 October 29, 2009 - Major change in the way reencode works Setting it to 'cp1252' or 'iso-8859-1' causes automatic character set translation from Unicode strings. - Added cp1252 (Win1252Encoding) support Most people should now use reencode => 'cp1252', even if they are not on Windows, to get the best Unicode support (which is still quite limited). - When writing to a file, the output method now returns the pathname - The %%BoundingBox must be integers. If it's not, round up and also add a %%HiResBoundingBox comment. - Fixed bug in pstr (wasn't quoting backslashes) - It's %%PageOrder, not %%Order (and the order should be capitalized) - Added an examples directory 1.04 October 22, 2009 - add_comment now appends to comments (as originally documented) (fixes RT#25786) - Allow WIDTHxHEIGHT as a paper size - Remove spaces before DSC comments even when strip none - pstr now wraps strings longer than 240 characters - strip comments is more aggressive (but won't remove DSC comments) 1.03 October 20, 2009 - Added pstr function/method - Added embed_document method - The dir & file parameters to new now actually work - The file_ext parameter and {get,set}_file_ext methods allow you to change the way PostScript::File appends an extension to the output filename - The PNG output added in 1.01 is now documented - Using Ghostscript to generate PNG should work on Windows now - Include resource types in %%DocumentSuppliedResources comment - Fixed has_function to avoid false positives - Include procset PostScript_File in %%DocumentSuppliedResources - PostScript::File now requires Perl 5.8.0 or later 1.02 September 21, 2009 - Now maintained by Christopher J. Madsen - Stripping leading whitespace now works with Perl 5.10 (RT#49838) 1.01 Wed Aug 27 19:23:26 GMT 2003 support for PNG format from Ghostscript 1.00 Wed May 14 12:05:50 GMT 2003 minor alterations promoted to beta licensing changed from Artistic to 'as Perl' 0.13 fix paper size bug 0.10 Wed Nov 20 11:14:30 GMT 2002 1cm borders by default support for user variables support for by-page user variables errors now on by default db_where, db_on and db_off added to postscript code corrected usage of db_active 0.09 Mon Nov 11 20:05:59 UTC 2002 corrected version number in test 0.08 Sun Nov 10 10:22:10 GMT 2002 minor changes Correct attribution to Latin1Encoding 0.07 Sun Oct 20 10:56:05 GMT 2002 Namespace changed from PostScript::Graph::File 0.06 Fri Oct 11 11:56:06 GMT 2002 Namespace changed from PostScript::File 0.05 Sun Oct 6 11:23:20 GMT 2002 bugfix: page orientation with gv 0.04 Fri Sep 27 07:35:48 GMT 2002 tidied up v0.03 pod changes added 'has_function()' 0.03 Tue Sep 24 12:06:21 GMT 2002 bugfix: interaction between debug 2 and custom dicts added tests 'new' now accepts hash ref as well as hash keys/values bugfix: only add 1 function set bugfix: %%Orientation now always shown pod now makes use of html indexing 0.02 Sun Sep 22 18:18:32 GMT 2002 debug => (not 2) wasn't working. fixed. restored many functions to new-option only page_number renamed to page_label added comment stripping streamlined packaging 0.01 Sat Sep 21 15:41:55 2002 - original version; created by h2xs 1.21 with options -X -n PostScript::File libpostscript-file-perl-2.20+dfsg.orig/META.yml0000644000175000017500000001056611715531042020643 0ustar gregoagregoa--- abstract: 'Class for creating Adobe PostScript files' author: - 'Christopher J. Madsen ' build_requires: FindBin: 0 List::Util: 0 Test::More: 0.88 configure_requires: ExtUtils::MakeMaker: 6.30 dynamic_config: 0 generated_by: 'Dist::Zilla version 4.300006, CPAN::Meta::Converter version 2.113640' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: PostScript-File recommends: Font::AFM: 0 requires: Carp: 0 Encode: 2.21 Exporter: 5.57 File::Spec: 0 Scalar::Util: 0 Sys::Hostname: 0 perl: 5.008 resources: repository: git://github.com/madsen/postscript-file.git version: 2.20 x_Dist_Zilla: plugins: - class: tools::FixupPSFilePOD name: '=tools::FixupPSFilePOD' version: 2.20 - class: tools::ExtractFunctionDocs name: '=tools::ExtractFunctionDocs' version: 2.20 - class: Dist::Zilla::Plugin::VersionFromModule name: CJM/VersionFromModule version: 0.08 - class: Dist::Zilla::Plugin::GatherDir name: CJM/GatherDir version: 4.300006 - class: Dist::Zilla::Plugin::PruneCruft name: CJM/PruneCruft version: 4.300006 - class: Dist::Zilla::Plugin::ManifestSkip name: CJM/ManifestSkip version: 4.300006 - class: Dist::Zilla::Plugin::MetaJSON name: CJM/MetaJSON version: 4.300006 - class: Dist::Zilla::Plugin::MetaYAML name: CJM/MetaYAML version: 4.300006 - class: Dist::Zilla::Plugin::License name: CJM/License version: 4.300006 - class: Dist::Zilla::Plugin::Test::PrereqsFromMeta name: CJM/Test::PrereqsFromMeta version: 4.04 - class: Dist::Zilla::Plugin::PodSyntaxTests name: CJM/PodSyntaxTests version: 4.300006 - class: Dist::Zilla::Plugin::ExtraTests name: CJM/ExtraTests version: 4.300006 - class: Dist::Zilla::Plugin::PodLoom config: Pod::Loom version: 0.05 name: CJM/PodLoom version: 4.10 - class: Dist::Zilla::Plugin::MakeMaker name: CJM/MakeMaker version: 4.300006 - class: Dist::Zilla::Plugin::MetaConfig name: CJM/MetaConfig version: 4.300006 - class: Dist::Zilla::Plugin::MatchManifest name: CJM/MatchManifest version: 4.00 - class: Dist::Zilla::Plugin::RecommendedPrereqs name: CJM/RecommendedPrereqs version: 4.06 - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: CJM/CheckPrereqsIndexed version: 0.006 - class: Dist::Zilla::Plugin::GitVersionCheckCJM name: CJM/GitVersionCheckCJM version: 4.03 - class: Dist::Zilla::Plugin::TemplateCJM name: CJM/TemplateCJM version: 4.00 - class: Dist::Zilla::Plugin::Repository name: CJM/Repository version: 0.18 - class: Dist::Zilla::Plugin::Git::Check name: CJM/@Git/Check version: 1.112510 - class: Dist::Zilla::Plugin::Git::Commit name: CJM/@Git/Commit version: 1.112510 - class: Dist::Zilla::Plugin::Git::Tag name: CJM/@Git/Tag version: 1.112510 - class: Dist::Zilla::Plugin::Git::Push name: CJM/@Git/Push version: 1.112510 - class: Dist::Zilla::Plugin::TestRelease name: CJM/TestRelease version: 4.300006 - class: Dist::Zilla::Plugin::UploadToCPAN name: CJM/UploadToCPAN version: 4.300006 - class: Dist::Zilla::Plugin::ArchiveRelease name: CJM/ArchiveRelease version: 4.00 - class: Dist::Zilla::Plugin::AutoPrereqs name: AutoPrereqs version: 4.300006 - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: 4.300006 - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: 4.300006 - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: 4.300006 - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: 4.300006 - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: 4.300006 - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: 4.300006 zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 version: 4.300006 libpostscript-file-perl-2.20+dfsg.orig/t/0000755000175000017500000000000011715531042017625 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/t/recycle-i.epsi0000444000175000017500000001220611715531042022362 0ustar gregoagregoa%!PS-Adobe-3.0 EPSF-3.0 %%Creator: inkscape 0.46 %%Pages: 1 %%Orientation: Portrait %%BoundingBox: 1 0 64 63 %%HiResBoundingBox: 1.0000001 0.99999201 63.000026 63 %%EndComments %%BeginPreview: 101 101 1 101 % 0000000007FFFFFFF000000000 % 00000001FFFFFFFFFE00000000 % 00000007FFFFFFFFFF00000000 % 0000000FFFBFFFFFFF80000000 % 0000001FFFDFFFFFFFC0000000 % 0000003FFFEFFFFFFFE0000000 % 0000003FFFF7FFFFFFE0000000 % 0000007FFFFBFFFFFFF0000000 % 0000007FFFFDFFFFFFF0000000 % 000000FFFFFEFFFFFFF8000000 % 000001FFFFFEFFFFFFF8000000 % 000001FFFFFF7FFFFFFC000000 % 000003FFFFFFFFFFFFFC060000 % 000007FFFFFFBFFFFFFE1E0000 % 000007FFFFFFFFFFFFFF7C0000 % 00000FFFFFFFDFFFFFFFF80000 % 00001FFFFFFFCFFFFFFFF80000 % 00001FFFFFFF8FFFFFFFF00000 % 00003FFFFFFF87FFFFFFF00000 % 00007FFFFFFF07FFFFFFE00000 % 00007FFFFFFE03FFFFFFC00000 % 0000FFFFFFFE03FFFFFFC00000 % 00003FFFFFFC01FFFFFF800000 % 00001FFFFFF801FFFFFF800000 % 000007FFFFF800FFFFFF000000 % 000001FFFFF000FFFFFE000000 % 000000FFFFF0007FFFFE000000 % 0000003FFFE0003FFFFC000000 % 0000000FFFC000FFFFFC000000 % 00000007FFC001FFFFF8000000 % 00000001FF8007FFFFF0000000 % 000000007F800FFFFFF0000000 % 00FFFF003F000000006000C000 % FFFFFF800E000000000001C000 % 7FFFFFC000000000000007E000 % 1FFFFFC00000000000001FE000 % 0FFFFFE00000000000003FF000 % 07FFFFE0000000000000FFF000 % 03FFFFF0000000000003FFF800 % 03FFFFF0000000000007FFF800 % 07FFFFF800000000001FFFFC00 % 07FFFFF800000000007FFFFC00 % 0FFFFFFC0000000000FFFFFE00 % 0FFFFFFC0000000003FFFFFE00 % 1FFFFFFE0000000007FFFFFF00 % 1FFFFFFE000000000FFFFFFF00 % 3FFFFFFF000000000FFFFFFF80 % 3FFFFFFF800000000FFFFFFF80 % 7FFFFFFF8000000007FFFFFFC0 % 7FFFFFFFC000000003FFFFFFE0 % FFFFFFFFC000000003FFFFFFE0 % FFFFFFFFE000000001FFFFFFE0 % FFFFFFF1E000000001FFFFFFE0 % FFFFFFF07000000000FFFFFFE0 % FFFFFFE01000000000FFFFFFE0 % FFFFFFC000000000007FFFFFE0 % FFFFFFC000000000007FFFFFE0 % FFFFFF8000000000003FFFFFE0 % 7FFFFF8000000001003FFFFFC0 % 3FFFFF0000000003001FFFFF80 % 5FFFFE0000000003001FFFFF80 % 6FFFFE0000000007000FFFFF80 % 3FFFFC00000000070007FFFF80 % 3DFFFC000000000F0007FFE700 % 1F3FF8000000001F0003FF3F00 % 1FE000000000001F000003FE00 % 0FFFFFFFFFF8003FFFFFFFFE00 % 07FFFFFFFFF8003FFFFFFFFC00 % 07FFFFFFFFF8007FFFFFFFFC00 % 03FFFFFFFFF8007FFFFFFFF800 % 03FFFFFFFFF800FFFFFFFFF800 % 01FFFFFFFFF800FFFFFFFFF000 % 01FFFFFFFFF801FFFFFFFFF000 % 00FFFFFFFFF803FFFFFFFFE000 % 00FFFFFFFFF803FFFFFFFFE000 % 007FFFFFFFF807FFFFFFFFC000 % 007FFFFFFFF807FFFFFFFF8000 % 003FFFFFFFF80FFFFFFFFF8000 % 001FFFFFFFF80FFFFFFFFF0000 % 001FFFFFFFF80FFFFFFFFF0000 % 000FFFFFFFF80FFFFFFFFE0000 % 000FFFFFFFF807FFFFFFFE0000 % 0007FFFFFFF807FFFFFFFC0000 % 0007FFFFFFF803FFFFFFFC0000 % 0003FFFFFFF803FFFFFFF80000 % 0003FFFFFFF801FFFFFFF80000 % 0001FFFFFFF801FFFFFFF00000 % 0001FFFFFFF800FFFFFFE00000 % 00007FFFFFF8007FFFFFC00000 % 00003FFFFFF8007FFFFF800000 % 00000FFFFFF8003FFFFF000000 % 000000FFFFF8003FFFF8000000 % 000000000000001F0000000000 % 000000000000001F0000000000 % 000000000000000F0000000000 % 000000000000000F0000000000 % 00000000000000070000000000 % 00000000000000070000000000 % 00000000000000030000000000 % 00000000000000010000000000 % 00000000000000000000000000 %%EndPreview %%Page: 1 1 0 64 translate 0.8 -0.8 scale 0 setgray [] 0 setdash 1 setlinewidth 0 setlinejoin 0 setlinecap gsave [1 0 0 1 0 0] concat gsave [0.968751 0 0 0.98751 1.250108 -0.250791] concat gsave newpath 54.962334 37.280594 moveto 72.099779 27.019014 lineto 79.778255 41.853688 lineto 81.632958 49.958845 71.469188 52.933218 63.308493 52.449886 curveto 54.962334 37.280594 lineto closepath eofill grestore gsave newpath 51.067463 47.876791 moveto 42.053608 63.826855 lineto 51.067463 80.000001 lineto 51.29002 73.530745 lineto 59.524901 73.530745 lineto 62.529519 73.790994 66.42439 71.820476 67.87106 68.95765 curveto 78.442863 49.549882 lineto 74.956026 53.007587 70.472444 53.899894 65.311568 53.899894 curveto 51.401311 53.899894 lineto 51.067463 47.876791 lineto closepath eofill grestore gsave newpath 30.928372 28.211849 moveto 13.659051 18.174838 lineto 22.872119 4.2455192 lineto 29.041895 -1.3139163 36.569755 6.1490507 40.109239 13.53501 curveto 30.928372 28.211849 lineto closepath eofill grestore gsave newpath 42.061814 26.481749 moveto 60.350049 26.63881 lineto 70.082475 10.889601 lineto 64.3314 13.834655 lineto 60.334303 6.6182881 lineto 59.102915 3.8589686 55.493541 1.4022881 52.294142 1.5241211 curveto 30.23359 1.680123 lineto 34.942164 3.0573777 37.89678 6.5533043 40.401797 11.075868 curveto 47.153644 23.265664 lineto 42.061814 26.481749 lineto closepath eofill grestore gsave newpath 0.44400982 27.380869 moveto 5.7948147 31.482111 lineto 0.75876087 40.946493 lineto -1.7592722 45.310624 2.5665138 49.562043 5.3226757 51.041841 curveto 8.0359564 52.498618 12.247261 52.671816 16.181673 52.61924 curveto 23.263621 41.26197 lineto 28.614426 44.101291 lineto 19.329208 27.22313 lineto 0.44400982 27.380869 lineto closepath eofill grestore gsave newpath 1.2308874 49.306704 moveto 12.719387 70.128368 lineto 15.027578 73.020264 19.381675 73.703806 23.893136 73.598643 curveto 36.011137 73.598643 lineto 36.011137 53.881162 lineto 13.034138 53.723423 lineto 9.4669308 53.933737 4.7980948 53.197619 1.2308874 49.306704 curveto closepath eofill grestore grestore grestore showpage %%EOF libpostscript-file-perl-2.20+dfsg.orig/t/recycle-wmf.epsf0000444000175000017500000010055011715531042022720 0ustar gregoagregoaХагЦъ `xџџ%!PS-Adobe-3.0 EPSF-3.0 %%Creator: inkscape 0.46 %%Pages: 1 %%Orientation: Portrait %%BoundingBox: 1 0 64 63 %%HiResBoundingBox: 1.0000001 0.99999201 63.000026 63 %%EndComments %%Page: 1 1 0 64 translate 0.8 -0.8 scale 0 setgray [] 0 setdash 1 setlinewidth 0 setlinejoin 0 setlinecap gsave [1 0 0 1 0 0] concat gsave [0.968751 0 0 0.98751 1.250108 -0.250791] concat gsave newpath 54.962334 37.280594 moveto 72.099779 27.019014 lineto 79.778255 41.853688 lineto 81.632958 49.958845 71.469188 52.933218 63.308493 52.449886 curveto 54.962334 37.280594 lineto closepath eofill grestore gsave newpath 51.067463 47.876791 moveto 42.053608 63.826855 lineto 51.067463 80.000001 lineto 51.29002 73.530745 lineto 59.524901 73.530745 lineto 62.529519 73.790994 66.42439 71.820476 67.87106 68.95765 curveto 78.442863 49.549882 lineto 74.956026 53.007587 70.472444 53.899894 65.311568 53.899894 curveto 51.401311 53.899894 lineto 51.067463 47.876791 lineto closepath eofill grestore gsave newpath 30.928372 28.211849 moveto 13.659051 18.174838 lineto 22.872119 4.2455192 lineto 29.041895 -1.3139163 36.569755 6.1490507 40.109239 13.53501 curveto 30.928372 28.211849 lineto closepath eofill grestore gsave newpath 42.061814 26.481749 moveto 60.350049 26.63881 lineto 70.082475 10.889601 lineto 64.3314 13.834655 lineto 60.334303 6.6182881 lineto 59.102915 3.8589686 55.493541 1.4022881 52.294142 1.5241211 curveto 30.23359 1.680123 lineto 34.942164 3.0573777 37.89678 6.5533043 40.401797 11.075868 curveto 47.153644 23.265664 lineto 42.061814 26.481749 lineto closepath eofill grestore gsave newpath 0.44400982 27.380869 moveto 5.7948147 31.482111 lineto 0.75876087 40.946493 lineto -1.7592722 45.310624 2.5665138 49.562043 5.3226757 51.041841 curveto 8.0359564 52.498618 12.247261 52.671816 16.181673 52.61924 curveto 23.263621 41.26197 lineto 28.614426 44.101291 lineto 19.329208 27.22313 lineto 0.44400982 27.380869 lineto closepath eofill grestore gsave newpath 1.2308874 49.306704 moveto 12.719387 70.128368 lineto 15.027578 73.020264 19.381675 73.703806 23.893136 73.598643 curveto 36.011137 73.598643 lineto 36.011137 53.881162 lineto 13.034138 53.723423 lineto 9.4669308 53.933737 4.7980948 53.197619 1.2308874 49.306704 curveto closepath eofill grestore grestore grestore showpage %%EOF  0<<  ee<C Ьeeee(eeџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџнннџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ™™™ЛЛЛџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџююю"""ЛЛЛџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwww™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююwwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwwwwwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџнннwwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџfffwwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџнннЛЛЛЛЛЛЛЛЛЛЛЛwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЛЛЛfffЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛюююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџнннwwwDDDDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџDDD333™™™юююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ™™™DDDDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЛЛЛЊЊЊџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџfffDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ"""fffџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююUUUDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ™™™fffџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџfffDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџююю"""wwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџнннDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwwwнннџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџUUUDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџюююfffџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЛЛЛDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџwwwнннџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџDDDDDDџџџџџџџџџџџџџџџџџџџџџџџџнннDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЛЛЛDDDџџџџџџџџџџџџџџџџџџџџџџџџUUUЛЛЛџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ"""DDDџџџџџџџџџџџџџџџџџџџџџЛЛЛDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ™™™DDDџџџџџџџџџџџџџџџџџџџџџDDDЛЛЛџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ"""DDDџџџџџџџџџџџџџџџџџџџџџDDD"""џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwwwDDDџџџџџџџџџџџџџџџџџџџџџЛЛЛ™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююDDDџџџџџџџџџџџџџџџџџџџџџџџџfff"""џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwwwDDDџџџџџџџџџџџџџџџџџџџџџџџџнннˆˆˆџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџнннDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџwwwюююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџfffDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџюююwwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџнннDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџˆˆˆюююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџDDDDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ"""fffџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЛЛЛDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЊЊЊнннџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџDDDDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџDDDfffџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ™™™DDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЛЛЛЬЬЬџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ"""DDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџUUUDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ™™™DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDfff™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџннн"""wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwfffDDDDDDDDD"""ЛЛЛџџџџџџџџџџџџџџџџџџџџџџџџџџџџююю333wwwЛЛЛџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwwwUUUџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююЛЛЛwwwUUUDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџwwwfffЬЬЬџџџџџџЛЛЛˆˆˆwwwDDDDDDDDDЊЊЊџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююwwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџfffDDDDDDDDDDDDfffwwwˆˆˆЛЛЛюююџџџџџџюююwww"""ЊЊЊџџџџџџџџџџџџџџџџџџџџџџююю333ЛЛЛџџџЊЊЊUUUюююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwwwwwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ™™™333wwwЬЬЬџџџџџџ™™™"""џџџџџџџџџџџџџџџџџџџџџџffffffюююЛЛЛ"""wwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ"""wwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ""""""ˆˆˆюююЬЬЬ333™™™џџџџџџџџџџџџџџџџнннwwwџџџwwwЬЬЬџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ™™™wwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџˆˆˆ"""ЊЊЊюююwwwџџџџџџџџџџџџџџџџюююџџџfffDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџDDD™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююfffюююџџџџџџџџџџџџџџџџџџџwwwˆˆˆџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЛЛЛЛЛЛџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwwwfffџџџџџџџџџџџџџџџџЊЊЊюююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююwwwџџџџџџџџџџюююfffџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџfffнннџџџџџџџ™™™ЛЛЛџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџнннfffџџџџџџџDDD333џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџfff"""џџџџџџџwwwџџџџџџџџџџџџџџџџџџџџџџџџюююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЛЛЛџџџџџџџнннџџџџџџџџџџџџџџџнннDDDЬЬЬџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџDDDџџџџџџџUUUџџџџџџџџџнннffffffџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЛЛЛџџџџџџџUUUЊЊЊюююwwwнннџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ333"""џџџџџџџЊЊЊwwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ™™™wwwџџџџџџџџџџ"""юююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ"""юююџџџџџџџџџџЛЛЛwwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџˆˆˆwwwџџџџџџџџџџџџџџџџDDDюююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџююю"""џџџџџџџџџџџџџџџџџџџЛЛЛ™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwww™™™џџџџџџџџџџџџџџџџџџџџџџDDD"""џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ333"""џџџџџџџџџџџџџџџџџџџџџџџџџЛЛЛ™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwww™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџDDDDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџнннDDD"""џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџнннЛЛЛџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЊЊЊ"""™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџfffDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююwww"""џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџнннЬЬЬџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЬЬЬDDD™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџffffffџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ™™™"""џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџннннннџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююwww™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююDDDwwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЛЛЛ333"""џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЬЬЬюююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџˆˆˆ™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџˆˆˆwwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююUUU"""џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююfff"""юююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЛЛЛ"""™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџннн333™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџнннUUUDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwww"""џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛЛџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююwwwЊЊЊџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююЬЬЬџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџнннЛЛЛџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЊЊЊ"""юююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwwwЬЬЬџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџнннDDDwwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЬЬЬ333DDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююwwwЬЬЬџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџˆˆˆ™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ™™™DDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџнннDDDюююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЬЬЬDDDˆˆˆџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююwwwюююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџˆˆˆЬЬЬџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ™™™fffџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЛЛЛ333ЛЛЛџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwww™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююfff"""џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџнннюююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџˆˆˆwwwџџџџџџџџџџџџџџџџџџџџџџџџџџџffffffџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџююю333нннџџџџџџџџџџџџџџџџџџџџџнннЛЛЛџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџfffDDDџџџџџџџџџџџџџџџџџџџџџDDD333џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююЊЊЊџџџџџџџџџџџџџџџЛЛЛˆˆˆџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЊЊЊ"""юююџџџџџџџџџџџџDDDюююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџUUUwwwџџџџџџџџџ™™™fffџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџюююЬЬЬџџџџџџ"""ЛЛЛџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ™™™fffџџџ™™™wwwfff333џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџDDDЛЛЛююююююџџџнннfffwwwџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџнннDDDџџџwww™™™џџџџџџџџџџџџЛЛЛDDDнннџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџˆˆˆнннююю"""џџџџџџџџџџџџџџџџџџџџџЛЛЛ™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџDDDwwwџџџUUU™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџннн333џџџЛЛЛDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwwwЬЬЬџџџ"""ЛЛЛџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ333™™™џџџwwwDDDџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЬЬЬfffџџџ™™™нннџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwwwfffџџџЬЬЬfffџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџююю"""fffџџџююю"""нннџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЛЛЛwwwџџџЬЬЬ"""ЊЊЊџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ™™™ЊЊЊџџџ™™™™™™џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЬЬЬDDDwwwююююююwww"""ЬЬЬџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЬЬЬwwwfffUUUwwwЊЊЊюююнннfffwwwюююџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЬЬЬwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwDDDDDDDDDDDDDDDDDDDDDDDDUUUwwwЊЊЊџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџlibpostscript-file-perl-2.20+dfsg.orig/t/76-Helvetica-BoldOblique.t0000644000175000017500000000050311715531042024345 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Compare pre-compiled Helvetica-BoldOblique metrics against Font::AFM #--------------------------------------------------------------------- use strict; use warnings; use lib 't'; use Font_Test; test_font('Helvetica-BoldOblique'); libpostscript-file-perl-2.20+dfsg.orig/t/00-all_prereqs.t0000644000175000017500000000431711715531042022545 0ustar gregoagregoa#!perl use strict; use warnings; # This doesn't use Test::More because I don't want to clutter %INC # with modules that aren't prerequisites. my $test = 0; sub ok ($$) { my ($ok, $name) = @_; printf "%sok %d - %s\n", ($ok ? '' : 'not '), ++$test, $name; return $ok; } # end ok END { ok(0, 'unknown failure') unless $test; print "1..$test\n"; } sub get_version { my ($package) = @_; local $@; my $version = eval { $package->VERSION }; defined $version ? $version : 'undef'; } # end get_version TEST: { ok(open(META, ') { last if /^\s*"prereqs" : \{\s*\z/; } # end while ok(defined $_, 'found prereqs') or last TEST; while () { last if /^\s*\},?\s*\z/; ok(/^\s*"(.+)" : \{\s*\z/, "found phase $1") or last TEST; my $phase = $1; while () { last if /^\s*\},?\s*\z/; ok(/^\s*"(.+)" : \{\s*\z/, "found relationship $phase $1") or last TEST; my $rel = $1; while () { last if /^\s*\},?\s*\z/; ok(/^\s*"([^"]+)"\s*:\s*(\S+?),?\s*\z/, "found prereq $1") or last TEST; my ($prereq, $version) = ($1, $2); next if $phase ne 'runtime' or $prereq eq 'perl'; my $loaded = eval "require $prereq; $prereq->VERSION($version); 1"; if ($rel eq 'requires') { ok($loaded, "loaded $prereq $version") or printf STDERR "\n# Got: %s %s\n# Wanted: %s %s\n", $prereq, get_version($prereq), $prereq, $version; } else { ok(1, ($loaded ? 'loaded' : 'failed to load') . " $prereq $version"); } } # end while in prerequisites } # end while in relationship } # end while in phase close META; # Print version of all loaded modules: if ($ENV{AUTOMATED_TESTING}) { print STDERR "# Listing %INC\n"; my @packages = grep { s/\.pm\Z// and do { s![\\/]!::!g; 1 } } sort keys %INC; my $len = 0; for (@packages) { $len = length if length > $len } $len = 68 if $len > 68; for my $package (@packages) { printf STDERR "# %${len}s %s\n", $package, get_version($package); } } # end if AUTOMATED_TESTING } # end TEST libpostscript-file-perl-2.20+dfsg.orig/t/70-Courier.t0000644000175000017500000000044711715531042021653 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Compare pre-compiled Courier metrics against Font::AFM #--------------------------------------------------------------------- use strict; use warnings; use lib 't'; use Font_Test; test_font('Courier'); libpostscript-file-perl-2.20+dfsg.orig/t/72-Courier-BoldOblique.t0000644000175000017500000000047711715531042024057 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Compare pre-compiled Courier-BoldOblique metrics against Font::AFM #--------------------------------------------------------------------- use strict; use warnings; use lib 't'; use Font_Test; test_font('Courier-BoldOblique'); libpostscript-file-perl-2.20+dfsg.orig/t/release-perlcritic.t0000644000175000017500000000221311715531042023566 0ustar gregoagregoa#! /usr/bin/perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } #--------------------------------------------------------------------- # $Id: perlcritic.t 2035 2008-06-25 23:41:21Z cjm $ #--------------------------------------------------------------------- use Test::More; plan skip_all => "Don't want automated Perl::Critic reports" if $ENV{AUTOMATED_TESTING}; # ProhibitAccessOfPrivateData is a badly implemented policy that bans # all use of hashrefs eval <<''; use Test::Perl::Critic (qw(-verbose 10 -exclude) => ['ProhibitAccessOfPrivateData']); use Perl::Critic::Utils 'all_perl_files'; use File::Spec (); plan skip_all => "Test::Perl::Critic required for testing PBP compliance" if $@; # I don't want to check the Metrics data files: my $skipRE = File::Spec->catfile(qw(lib PostScript File Metrics x)); chop $skipRE; # Remove the x $skipRE = qr/\Q$skipRE\E(?!Loader)/; my @files = grep { not $_ =~ $skipRE } all_perl_files('lib'); plan tests => scalar @files; critic_ok($_) for @files; libpostscript-file-perl-2.20+dfsg.orig/t/7B-Times-Roman.t0000644000175000017500000000045711715531042022421 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Compare pre-compiled Times-Roman metrics against Font::AFM #--------------------------------------------------------------------- use strict; use warnings; use lib 't'; use Font_Test; test_font('Times-Roman'); libpostscript-file-perl-2.20+dfsg.orig/t/78-Times-Bold.t0000644000175000017500000000045511715531042022211 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Compare pre-compiled Times-Bold metrics against Font::AFM #--------------------------------------------------------------------- use strict; use warnings; use lib 't'; use Font_Test; test_font('Times-Bold'); libpostscript-file-perl-2.20+dfsg.orig/t/71-Courier-Bold.t0000644000175000017500000000046111715531042022526 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Compare pre-compiled Courier-Bold metrics against Font::AFM #--------------------------------------------------------------------- use strict; use warnings; use lib 't'; use Font_Test; test_font('Courier-Bold'); libpostscript-file-perl-2.20+dfsg.orig/t/10-simple.t0000755000175000017500000000156711715531042021535 0ustar gregoagregoa#!/usr/bin/perl use strict; use warnings; use Test::More; use File::Spec (); BEGIN { # RECOMMEND PREREQ: File::Temp 0.15 - need tempdir eval "use File::Temp 0.15 'tempdir';"; plan skip_all => "File::Temp 0.15 required for testing" if $@; plan tests => 8; } use PostScript::File 2.00 qw(check_file); ok(1); # module found my $ps = PostScript::File->new(); isa_ok($ps, 'PostScript::File'); # object created my $dir = $ARGV[0] || tempdir(CLEANUP => 1); my $name = "fi01simple"; my $out = $ps->output( $name, $dir ); ok(1); # survived so far is($ps->get_filename, undef, 'Did not set filename'); is($out, File::Spec->catfile( $dir, "$name.ps" ), 'expected output filename'); my $file = check_file( "$name.ps", $dir ); ok($file); ok(-e $file); # PNG output is disabled eval { PostScript::File->new(png => 1) }; like($@, qr/^PNG output is no longer supported/, 'no PNG'); libpostscript-file-perl-2.20+dfsg.orig/t/73-Courier-Oblique.t0000644000175000017500000000046711715531042023256 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Compare pre-compiled Courier-Oblique metrics against Font::AFM #--------------------------------------------------------------------- use strict; use warnings; use lib 't'; use Font_Test; test_font('Courier-Oblique'); libpostscript-file-perl-2.20+dfsg.orig/t/55-wrapping.t0000644000175000017500000001437011715531042022075 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Copyright 2011 Christopher J. Madsen # # Author: Christopher J. Madsen # Created: 6 Oct 2011 # # This program is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. # # 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 either the # GNU General Public License or the Artistic License for more details. # # Test word wrapping in PostScript::File::Metrics #--------------------------------------------------------------------- use 5.008; use strict; use warnings; use Test::More 0.88; # want done_testing use List::Util qw(sum); use PostScript::File::Metrics (); #===================================================================== sub iName () { 0 } sub iText () { 1 } sub iExpected () { 2 } sub iWarnings () { 3 } my @tests = ( [ "basic", "Basic test", [ "Basic test" ] ], [ "long", "This is a long text to be wrapped on four lines", [ "This is a long", "text to be", "wrapped on", "four lines" ] ], [ "long hyphens", "This is-a long-text to be-wrapped with-hyphens", [ "This is\x{ad}a long\x{ad}", "text to be\x{ad}", "wrapped with\x{ad}", "hyphens" ] ], [ "long dashes", "This is\x{2013}a long\x{2014}text to be\x{2013}wrapped with\x{2014}dashes", [ "This is\x{2013}a long\x{2014}", "text to be\x{2013}", "wrapped with\x{2014}", "dashes" ] ], [ "long slashes", "This is/a long/text to be/wrapped with/slashes", [ "This is/a long/", "text to be/", "wrapped with/", "slashes" ] ], [ "newlines", "This is\na long text\nwith\nnewlines to mark most of the places\n\nit should be wrapped.", [ "This is", "a long text", "with", "newlines to", "mark most of", "the places", "", "it should be", "wrapped." ] ], [ "non-breaking spaces", "This is\240a long\240text to be\240wrapped with non-breaking spaces", [ "This is\x{a0}a", "long\x{a0}text to", "be\x{a0}wrapped", "with non\x{ad}", "breaking", "spaces" ] ], [ "negative numbers", "This is -123456789 -987654321 -12\x{2212} -34\x{2212} -56\x{2212} -78\x{2212} -90\x{2212} -1234567890", [ "This is", "\x{2212}123456789", "\x{2212}987654321", "\x{2212}12\x{2212} \x{2212}34\x{2212}", "\x{2212}56\x{2212} \x{2212}78\x{2212}", "\x{2212}90\x{2212}", "\x{2212}1234567890" ] ], [ "zero-width space", "This\x{200b}is\x{200b}a\x{200b}long\x{200b}text\x{200b}containing\x{200b}only\x{200b}zero\x{200b}width\x{200b}spaces", [ "Thisisalongtext", "containingonly", "zerowidth", "spaces" ] ], [ "maxlines 1", [ "This is a long text to be wrapped on only one line", { maxlines => 1, quiet => 1 } ], [ "This is a long text to be wrapped on only one line" ] ], [ "maxlines 3", [ "This is a long text to be wrapped on only three lines", { maxlines => 3, quiet => 1 } ], [ "This is a long", "text to be", "wrapped on only three lines" ] ], [ "maxlines 3 not quiet", [ "This is a long text to be wrapped on only three lines", { maxlines => 3 } ], [ "This is a long", "text to be", "wrapped on only three lines" ], [ "'wrapped on only three lines' is too wide (122.28) for field width 72" ] ], [ "ends with newline", "newline after\n", [ "newline after" ] ], [ "only at whitespace", [ "This is-a long-text to be-wrapped with-hyphens", { chars => "" } ], [ "This is\x{ad}a", "long\x{ad}text to", "be\x{ad}wrapped", "with\x{ad}hyphens" ] ], [ "word too long", "ThisWordIsTooLongToWrapAnywhere so it warns.", [ "ThisWordIsTooLongToWrapAnywhere", "so it warns." ], [ "ThisWordIsTooLongToWrapAnywhere is too wide (170.05) for field width 72" ] ], ); # end @tests #--------------------------------------------------------------------- # Capture warning messages: my @warnings; $SIG{__WARN__} = sub { push @warnings, $_[0] }; #--------------------------------------------------------------------- my $generateResults; if (@ARGV and $ARGV[0] eq 'gen') { # Just output the actual results, so they can be diffed against this file $generateResults = 1; } else { my $warnings = sum(map { $_ ? scalar @$_ : 0 } map { $_->[iWarnings] } @tests); plan tests => 2 * @tests + $warnings; } my $metrics = PostScript::File::Metrics->new(qw(Helvetica 10 cp1252)); for my $test (@tests) { @warnings = (); my @got = (ref $test->[iText] ? $metrics->wrap(72, @{ $test->[iText] }) : $metrics->wrap(72, $test->[iText] )); if ($generateResults) { $test->[iExpected] = \@got; if (@warnings) { s/ at \S*55-wrapping\.t.*//s or die for @warnings; $test->[iWarnings] = [ @warnings ]; } else { pop @$test if $test->[iWarnings]; } } else { is_deeply(\@got, @$test[iExpected, iName]); if (my $w = $test->[iWarnings]) { is(scalar @warnings, scalar @$w, "$test->[iName] warnings"); for my $i (0 .. $#$w) { like($warnings[$i], qr/^\Q$w->[$i] at /, "$test->[iName] warning $i"); } } else { is(scalar @warnings, 0, "$test->[iName] no warnings"); } } } # end for each $test in @tests #--------------------------------------------------------------------- if ($generateResults) { require Data::Dumper; my $d = Data::Dumper->new([ \@tests ], ['*tests']) ->Indent(1)->Useqq(1)->Quotekeys(0)->Sortkeys(1)->Dump; $d =~ s/\]\n\);\n\z/],\n); # end \@tests\n/; open(my $out, '>:utf8', '/tmp/55-wrapping.t') or die $!; print $out "my $d"; } else { done_testing; } # Local Variables: # compile-command: "perl 55-wrapping.t gen" # End: libpostscript-file-perl-2.20+dfsg.orig/t/30-debug.t0000755000175000017500000000233411715531042021325 0ustar gregoagregoa#!/usr/bin/perl use strict; use warnings; use Test::More; use File::Spec (); BEGIN { # RECOMMEND PREREQ: File::Temp 0.15 - need tempdir eval "use File::Temp 0.15 'tempdir';"; plan skip_all => "File::Temp 0.15 required for testing" if $@; plan tests => 9; } use PostScript::File qw(check_file); ok(1); # module found my $ps = PostScript::File->new( headings => 1, paper => "A5", landscape => 1, left => 36, right => 36, top => 72, bottom => 72, clipping => 1, clipcmd => "stroke", errors => 1, debug => 2, ); isa_ok($ps, 'PostScript::File'); # object created $ps->add_to_page( <get_page_label(); is($page, '1', "page 1"); ok($ps->get_page()); my $dir = $ARGV[0] || tempdir(CLEANUP => 1); my $name = "fi03debug"; my $out = $ps->output( $name, $dir ); ok(1); # survived so far is($ps->get_filename, undef, 'Did not set filename'); is($out, File::Spec->catfile( $dir, "$name.ps" ), 'expected output filename'); my $file = check_file( "$name.ps", $dir ); ok($file); ok(-e $file); libpostscript-file-perl-2.20+dfsg.orig/t/Font_Test.pm0000644000175000017500000000743511715531042022101 0ustar gregoagregoa#--------------------------------------------------------------------- package Font_Test; # # Copyright 2009 Christopher J. Madsen # # Author: Christopher J. Madsen # Created: 31 Oct 2009 # # This program is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. # # 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 either the # GNU General Public License or the Artistic License for more details. # # Compare our font metrics against Font::AFM #--------------------------------------------------------------------- use 5.008; our $VERSION = '2.00'; use strict; use warnings; use Exporter 5.57 'import'; use constant number_of_tests => 275; use Test::More tests => number_of_tests; use PostScript::File::Metrics; our @EXPORT = qw(test_font); our %attribute = qw( FullName full_name FamilyName family Weight weight IsFixedPitch fixed_pitch ItalicAngle italic_angle FontBBox font_bbox ); our %dimension_attribute = qw( UnderlinePosition underline_position UnderlineThickness underline_thickness CapHeight cap_height XHeight x_height Ascender ascender Descender descender ); # We don't test this: # Version version #===================================================================== sub test_font { my ($font) = @_; my $size = 125; my $factor = 1000 / $size; my $metrics = PostScript::File::Metrics->new($font, $size, 'iso-8859-1'); isa_ok($metrics, 'PostScript::File::Metrics'); ok(!$INC{'PostScript/File/Metrics/Loader.pm'}, 'used pre-compiled metrics'); SKIP: { my $testsInBlock = number_of_tests - 2; # RECOMMEND PREREQ: Font::AFM # Construct the Font::AFM object, or skip the remaining tests: eval { require Font::AFM }; skip "Font::AFM not installed", $testsInBlock if $@; my $afm = eval { Font::AFM->new($font) }; skip "Font::AFM can't find $font.afm", $testsInBlock if $@; # Compare the font attributes: foreach my $afm_method (sort keys %attribute) { my $metrics_method = $attribute{$afm_method}; my $got = $metrics->$metrics_method; if ($afm_method eq 'FontBBox') { $_ *= $factor for @$got; $got = "@$got" ; } # end if FontBBox $got = $got ? 'true' : 'false' if $afm_method eq 'IsFixedPitch'; is($got, $afm->$afm_method, $afm_method); } # Compare the font dimension attributes: foreach my $afm_method (sort keys %dimension_attribute) { my $metrics_method = $dimension_attribute{$afm_method}; my $got = $metrics->$metrics_method; is($got * $factor, $afm->$afm_method, $afm_method); } # Compare the character widths: my $wx = $afm->latin1_wx_table; $metrics->set_auto_hyphen(0); # Font::AFM doesn't translate hyphen-minus $metrics->set_size(undef); # Switch to default size to match Font::AFM for my $char (0 .. 255) { my $name = sprintf 'width of char \%03o, \x%02X', $char, $char; $name = sprintf '%s (%c)', $name, $char if $char >= 0x20 and $char < 0x7F; is( $metrics->width(pack 'C', $char), $wx->[$char], $name); } # end for $char # Test width vs stringwidth: $metrics->set_size($size); # Switch back to old size while () { chomp $_; is( $metrics->width($_), $afm->stringwidth($_, $size), $_); } } # end SKIP } # end test_font #===================================================================== # Package Return Value: 1; __DATA__ Now is the time for all good men to come to the aid of their country. The quick brown fox jumps over the lazy dog. car­wash car-wash -1 libpostscript-file-perl-2.20+dfsg.orig/t/recycle-tiff4.eps0000444000175000017500000001074711715531042023005 0ustar gregoagregoaХагЦъ пџџ%!PS-Adobe-3.0 EPSF-3.0 %%Creator: inkscape 0.46 %%Pages: 1 %%Orientation: Portrait %%BoundingBox: 1 0 64 63 %%HiResBoundingBox: 1.0000001 0.99999201 63.000026 63 %%EndComments %%Page: 1 1 0 64 translate 0.8 -0.8 scale 0 setgray [] 0 setdash 1 setlinewidth 0 setlinejoin 0 setlinecap gsave [1 0 0 1 0 0] concat gsave [0.968751 0 0 0.98751 1.250108 -0.250791] concat gsave newpath 54.962334 37.280594 moveto 72.099779 27.019014 lineto 79.778255 41.853688 lineto 81.632958 49.958845 71.469188 52.933218 63.308493 52.449886 curveto 54.962334 37.280594 lineto closepath eofill grestore gsave newpath 51.067463 47.876791 moveto 42.053608 63.826855 lineto 51.067463 80.000001 lineto 51.29002 73.530745 lineto 59.524901 73.530745 lineto 62.529519 73.790994 66.42439 71.820476 67.87106 68.95765 curveto 78.442863 49.549882 lineto 74.956026 53.007587 70.472444 53.899894 65.311568 53.899894 curveto 51.401311 53.899894 lineto 51.067463 47.876791 lineto closepath eofill grestore gsave newpath 30.928372 28.211849 moveto 13.659051 18.174838 lineto 22.872119 4.2455192 lineto 29.041895 -1.3139163 36.569755 6.1490507 40.109239 13.53501 curveto 30.928372 28.211849 lineto closepath eofill grestore gsave newpath 42.061814 26.481749 moveto 60.350049 26.63881 lineto 70.082475 10.889601 lineto 64.3314 13.834655 lineto 60.334303 6.6182881 lineto 59.102915 3.8589686 55.493541 1.4022881 52.294142 1.5241211 curveto 30.23359 1.680123 lineto 34.942164 3.0573777 37.89678 6.5533043 40.401797 11.075868 curveto 47.153644 23.265664 lineto 42.061814 26.481749 lineto closepath eofill grestore gsave newpath 0.44400982 27.380869 moveto 5.7948147 31.482111 lineto 0.75876087 40.946493 lineto -1.7592722 45.310624 2.5665138 49.562043 5.3226757 51.041841 curveto 8.0359564 52.498618 12.247261 52.671816 16.181673 52.61924 curveto 23.263621 41.26197 lineto 28.614426 44.101291 lineto 19.329208 27.22313 lineto 0.44400982 27.380869 lineto closepath eofill grestore gsave newpath 1.2308874 49.306704 moveto 12.719387 70.128368 lineto 15.027578 73.020264 19.381675 73.703806 23.893136 73.598643 curveto 36.011137 73.598643 lineto 36.011137 53.881162 lineto 13.034138 53.723423 lineto 9.4669308 53.933737 4.7980948 53.197619 1.2308874 49.306704 curveto closepath eofill grestore grestore grestore showpage %%EOF II* џeee†eЎЖОЫихђџ &3@MZgtŽ›ЈЕТЯмщі*7DQ^kx…’ŸЌЙЦгрэњ!.;HUbo|‰–ЃАНЪзфёў %2?LYfs€šЇДСЮлшѕ)6CP]jw„‘žЋИХв ssџџџџјџџџџџџџўџџџџџџџјџџџџџџџ№@џџџџџџр ?џџџџџџРџџџџџџРџџџџџџ€џџџџџџ€џџџџџџџџџџџўџџџџџў€џџџџџќљџџџџј@сџџџџјƒџџџџ№ џџџџр0џџџџрpџџџџРxџџџџ€јџџџџ€ќ?џџџџќ?џџџџРўџџџџрўџџџџјџџџџџџўџџџџџџџџ€џџџџџџРџРџџџџџџ№?џџџџџџџј?ўџџџџџџўјџџџџџџџ€№џџџџџРџџџџŸџ?џёџџџџџў?џ€?џџџџџџјџр?џџџџџџрџ№џџџџџџРџјџџџџџџџќџџџџџќџќџџџџџјџјџџџџџрџјџџџџџ€џ№џџџџџџ№џџџџќџрџџџџјџрџџџџ№џРџџџџ№Рџџџ№€џџџј?€?џџџќ?џџџќџџџўџџџўџџџџяџџџџ?џџџџџ€?џџџџџ€џџџџџР€џџџўџР?Рџџџџќџр џџџџќџрџџџџјџ№РџџџџјџјТџџџџ№џјџрРџџџџрџќРџрџџџџџрџџќџ№џРџјџРџјџ€џќџ€џќџџўџџўўџџќџџќџџ€ј?џџ€јџџР№џџр№џџџр№џџџ№№џџџ№јџџџјјџџџјќџџџќќџџџќўџџџўўџџџўџџџџџ€џ€?џџџџРџ€џџџџ№џРџџџџџџџРџџџџџџџџџџрџџџџџџџџџџџџрџџџџџџџџџџџџ№џџџџџџџџџџџџ№џџџџџџџџџџџџјџџџџџџџџџџџџјџџџџџџџџџџџџќџџџџџџџџџџџџўџџџџџџџџџџџџџџџџџџlibpostscript-file-perl-2.20+dfsg.orig/t/75-Helvetica-Bold.t0000644000175000017500000000046511715531042023032 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Compare pre-compiled Helvetica-Bold metrics against Font::AFM #--------------------------------------------------------------------- use strict; use warnings; use lib 't'; use Font_Test; test_font('Helvetica-Bold'); libpostscript-file-perl-2.20+dfsg.orig/t/50-pstr.t0000644000175000017500000000755611715531042021241 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Copyright 2009 Christopher J. Madsen # # Author: Christopher J. Madsen # Created: 12 Oct 2009 # # This program is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. # # 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 either the # GNU General Public License or the Artistic License for more details. # # Test the pstr function/method #--------------------------------------------------------------------- use strict; use warnings; use Test::More; use PostScript::File 'pstr'; #--------------------------------------------------------------------- my %char = qw( 8208 8722 ); sub U { join '', map { $char{$_} || ($_ < 0x7F ? chr($_) : sprintf '', $_) } unpack 'U*', $_[0]; } # end U #===================================================================== # Run the tests. my @standardTests = ( 'Hello, world' => '(Hello, world)', 'is (' => '(is \()', "has\n newline" => '(has\n newline)', 'xxxx ' x 100 => '(' . ('xxxx ' x 48) . "\\\n" . ('xxxx ' x 48) . "x\\\nxxx " . ('xxxx ' x 3) . ')', 'a ' x 50 => '(' . ('a ' x 24) . "\\\n" . ('a ' x 24) . "a\\\n\\ " . ('a ' x 1) . ')', (grep { $_ } split /\s+/, <<'END BACKSLASHES'), has\backslash (has\\backslash) double\\backslash (double\\\\backslash) END BACKSLASHES "have\n newline" => '(have\n newline)', "have\r\n CRLF" => '(have\r\n CRLF)', "have\t tab" => '(have\t tab)', "have\b backspace" => '(have\b backspace)', "have\f form feed" => '(have\f form feed)', "have () parens" => '(have \(\) parens)', ); # end @standardTests my $hyphen = chr(0x2010); my $minus = chr(0x2212); my @hyphenTests = ( @standardTests, 'non-invasive' => '(noninvasive)', 'black-and-white' => '(blackandwhite)', '-' => '()', '-s' => '(s)', 'but-' => '(but)', 'night-owl' => '(nightowl)', '-1' => '(1)', '2 - 3' => '(2 3)', '4-5' => '(45)', '6-' => '(6)', "$hyphen $minus -" => '( )', ); # end @hyphenTests plan tests => 1 + @standardTests + @hyphenTests / 2; #--------------------------------------------------------------------- # Test pstr as exported subroutine: my @tests = @standardTests; while (@tests) { my $in = shift @tests; (my $name = $in) =~ s/[\b\s]+/ /g; $name = substr($name, 0, 50); is(pstr($in), shift @tests, $name); } # end while @tests #--------------------------------------------------------------------- # Test pstr as class method: @tests = @standardTests; while (@tests) { my $in = shift @tests; (my $name = $in) =~ s/[\b\s]+/ /g; $name = substr($name, 0, 50); is(PostScript::File->pstr($in), shift @tests, "class method $name"); } # end while @tests #--------------------------------------------------------------------- # Test pstr as class method with nowrap: my $text = 'xxxx ' x 60; is(PostScript::File->pstr($text, 1), "($text)", "class method with nowrap"); #--------------------------------------------------------------------- # Test pstr as object method with hyphen processing: @tests = @hyphenTests; my $ps = PostScript::File->new(reencode => 'cp1252'); while (@tests) { my $in = shift @tests; my $out = shift @tests; (my $name = $out) =~ s/[\b\s]+/ /g; $name = substr($name, 0, 50); is(U($ps->pstr($in)), $out, "hypen $name"); } # end while @tests libpostscript-file-perl-2.20+dfsg.orig/t/40-pages.t0000755000175000017500000000305611715531042021341 0ustar gregoagregoa#!/usr/bin/perl use strict; use warnings; use Test::More; use File::Spec (); BEGIN { # RECOMMEND PREREQ: File::Temp 0.15 - need tempdir eval "use File::Temp 0.15 'tempdir';"; plan skip_all => "File::Temp 0.15 required for testing" if $@; plan tests => 6; } use charnames qw(:full); use PostScript::File qw(check_file incpage_label incpage_roman); my $hash = { headings => 1, paper => 'US-Letter', errors => 1, debug => 2, page => "viii", incpage_handler => \&incpage_roman, reencode => "ISOLatin1Encoding", fontsuffix => "-latin1", }; my $ps = PostScript::File->new( $hash ); isa_ok($ps, 'PostScript::File'); # object created my $label = $ps->get_page_label(); is($label, "viii", 'page viii'); $ps->add_to_page( <newpage(); $label = $ps->get_page_label(); is($label, "ix", 'page ix'); my $msg = "Second Page: \N{LATIN SMALL LETTER E WITH CIRCUMFLEX} Ѓ"; $ps->add_to_page( < 1); my $name = "fi04pages"; my $out = $ps->output( $name, $dir ); is($ps->get_filename, undef, 'Did not set filename'); is($out, File::Spec->catfile( $dir, "$name.ps" ), 'expected output filename'); my $file = check_file( "$name.ps", $dir ); ok(-e $file); __END__ libpostscript-file-perl-2.20+dfsg.orig/t/45-hyphens.t0000644000175000017500000000346311715531042021724 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Copyright 2009 Christopher J. Madsen # # Author: Christopher J. Madsen # Created: 1 Nov 2009 # # This program is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. # # 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 either the # GNU General Public License or the Artistic License for more details. # # Test the convert_hyphens method #--------------------------------------------------------------------- use strict; use warnings; use Test::More; use PostScript::File 2.00; #--------------------------------------------------------------------- my %char = qw( 8208 8722 ); sub U { join '', map { $char{$_} || ($_ < 0x7F ? chr($_) : sprintf '', $_) } unpack 'U*', $_[0]; } # end U #--------------------------------------------------------------------- my $hyphen = chr(0x2010); my $minus = chr(0x2212); my @tests = ( '-' => '', '-s' => 's', 'but-' => 'but', 'night-owl' => 'nightowl', '-1' => '1', '2 - 3' => '2 3', '4-5' => '45', '6-' => '6', '(-7)' => '(7)', '-$8' => '$8', "-\x{20AC}9"=> '9', # euro sign "$hyphen $minus -" => ' ', ); plan tests => @tests / 2; #--------------------------------------------------------------------- my $ps = PostScript::File->new(reencode => 'cp1252'); while (@tests) { my $in = shift @tests; is(U($ps->convert_hyphens($in)), shift @tests, U($in)); } # end while @tests libpostscript-file-perl-2.20+dfsg.orig/t/recycle.eps0000444000175000017500000000435211715531042021766 0ustar gregoagregoa%!PS-Adobe-3.0 EPSF-3.0 %%Creator: inkscape 0.46 %%Pages: 1 %%Orientation: Portrait %%BoundingBox: 1 0 64 63 %%HiResBoundingBox: 1.0000001 0.99999201 63.000026 63 %%EndComments %%Page: 1 1 0 64 translate 0.8 -0.8 scale 0 setgray [] 0 setdash 1 setlinewidth 0 setlinejoin 0 setlinecap gsave [1 0 0 1 0 0] concat gsave [0.968751 0 0 0.98751 1.250108 -0.250791] concat gsave newpath 54.962334 37.280594 moveto 72.099779 27.019014 lineto 79.778255 41.853688 lineto 81.632958 49.958845 71.469188 52.933218 63.308493 52.449886 curveto 54.962334 37.280594 lineto closepath eofill grestore gsave newpath 51.067463 47.876791 moveto 42.053608 63.826855 lineto 51.067463 80.000001 lineto 51.29002 73.530745 lineto 59.524901 73.530745 lineto 62.529519 73.790994 66.42439 71.820476 67.87106 68.95765 curveto 78.442863 49.549882 lineto 74.956026 53.007587 70.472444 53.899894 65.311568 53.899894 curveto 51.401311 53.899894 lineto 51.067463 47.876791 lineto closepath eofill grestore gsave newpath 30.928372 28.211849 moveto 13.659051 18.174838 lineto 22.872119 4.2455192 lineto 29.041895 -1.3139163 36.569755 6.1490507 40.109239 13.53501 curveto 30.928372 28.211849 lineto closepath eofill grestore gsave newpath 42.061814 26.481749 moveto 60.350049 26.63881 lineto 70.082475 10.889601 lineto 64.3314 13.834655 lineto 60.334303 6.6182881 lineto 59.102915 3.8589686 55.493541 1.4022881 52.294142 1.5241211 curveto 30.23359 1.680123 lineto 34.942164 3.0573777 37.89678 6.5533043 40.401797 11.075868 curveto 47.153644 23.265664 lineto 42.061814 26.481749 lineto closepath eofill grestore gsave newpath 0.44400982 27.380869 moveto 5.7948147 31.482111 lineto 0.75876087 40.946493 lineto -1.7592722 45.310624 2.5665138 49.562043 5.3226757 51.041841 curveto 8.0359564 52.498618 12.247261 52.671816 16.181673 52.61924 curveto 23.263621 41.26197 lineto 28.614426 44.101291 lineto 19.329208 27.22313 lineto 0.44400982 27.380869 lineto closepath eofill grestore gsave newpath 1.2308874 49.306704 moveto 12.719387 70.128368 lineto 15.027578 73.020264 19.381675 73.703806 23.893136 73.598643 curveto 36.011137 73.598643 lineto 36.011137 53.881162 lineto 13.034138 53.723423 lineto 9.4669308 53.933737 4.7980948 53.197619 1.2308874 49.306704 curveto closepath eofill grestore grestore grestore showpage %%EOF libpostscript-file-perl-2.20+dfsg.orig/t/65-testable.t0000644000175000017500000005002611715531042022050 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Copyright 2009 Christopher J. Madsen # # Author: Christopher J. Madsen # Created: 26 Feb 2010 # # This program is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. # # 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 either the # GNU General Public License or the Artistic License for more details. # # Test the testable_output method #--------------------------------------------------------------------- use strict; use warnings; use FindBin '$Bin'; chdir $Bin or die "Unable to cd $Bin: $!"; use Test::More; # Load Test::Differences, if available: BEGIN { # SUGGEST PREREQ: Test::Differences if (eval "use Test::Differences; 1") { # Not all versions of Test::Differences support changing the style: eval { Test::Differences::unified_diff() } } else { *eq_or_diff = \&is; # Just use "is" instead } } # end BEGIN use PostScript::File (); my $psVer = PostScript::File->VERSION; my $generateResults; if (@ARGV and $ARGV[0] eq 'gen') { # Just output the actual results, so they can be diffed against this file $generateResults = 1; open(OUT, '>', '/tmp/65-testable.t') or die $!; printf OUT "#%s\n\n__DATA__\n", '=' x 69; } else { plan tests => 14 * 2; } my ($name, %param, @methods); my $builder = Test::More->builder; while () { print OUT $_ if $generateResults; if (/^(\w+):(.+)/) { $param{$1} = eval $2; die $@ if $@; } # end if constructor parameter (key: value) elsif (/^(->.+)/) { push @methods, $1; } # end if method to call (->method(param)) elsif ($_ eq "===\n") { # Read the expected results: my $expected = ''; while () { last if $_ eq "---\n"; $expected .= $_; } # Run the test: my $ps = PostScript::File->new(%param); foreach my $call (@methods) { eval '$ps' . $call; die $@ if $@; } # end foreach $call in @methods if ($generateResults) { $expected = $ps->testable_output; print OUT "$expected---\n"; } else { my $todo = ($name =~ s/^TODO +//); $builder->todo_start('') if $todo; eq_or_diff($ps->testable_output, $expected, $name); # Calling output again should produce exactly the same output: eq_or_diff($ps->testable_output, $expected, "repeat $name"); $builder->todo_end if $todo; } # end else running tests # Clean up: @methods = (); %param = (); undef $name; } # end elsif expected contents (=== ... ---) elsif (/^::\s*(.+)/) { $name = $1; } # end elsif test name (:: name) else { die "Unrecognized line $_" if /\S/ and not /^# /; } } # end while #===================================================================== __DATA__ :: no parameters === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%EndComments %%BeginProlog %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 568 814 %%PageHiResBoundingBox: 28 28 567.27559 813.88976 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: strip none strip: 'none' === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%EndComments %%BeginProlog %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 568 814 %%PageHiResBoundingBox: 28 28 567.27559 813.88976 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: strip comments strip: 'comments' paper: 'US-Letter' ->add_to_page("% strip this\n"); ->add_to_page("%%%%%%%%%%%%%\n"); ->add_to_page("%------------\n"); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%EndComments %%BeginProlog %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%%%%%%%%%%%% %%PageTrailer end pagelevel restore showpage %%EOF --- :: custom paper paper: '123x456' === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%EndComments %%BeginProlog %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 95 428 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: multiple comments paper: 'Letter' order: 'ascend' need_fonts: [qw( Paladin Paladin-Bold )] ->add_comment("ProofMode: NotifyMe"); ->add_comment("Requirements: manualfeed"); ->add_default("PageResources: font Paladin"); ->add_default("+ font Paladin-Bold"); === %!PS-Adobe-3.0 %%ProofMode: NotifyMe %%Requirements: manualfeed %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold Paladin Paladin-Bold %%DocumentSuppliedResources: %%PageOrder: Ascend %%EndComments %%BeginDefaults %%PageResources: font Paladin %%+ font Paladin-Bold %%EndDefaults %%BeginProlog %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: cp1252 strip: 'comments' paper: 'US-Letter' reencode: 'cp1252' ->add_to_page("(\x{201C}Hello, world.\x{201D}) show\n"); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier Courier-Bold Courier-BoldOblique Courier-Oblique Helvetica %%+ font Helvetica-Bold Helvetica-BoldOblique Helvetica-Oblique Symbol %%+ font Times-Bold Times-BoldItalic Times-Italic Times-Roman %%DocumentSuppliedResources: %%EndComments %%BeginProlog %%EndProlog %%BeginSetup %%EndSetup %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup (“Hello, world.”) show %%PageTrailer end pagelevel restore showpage %%EOF --- :: multiple resources paper: 'Letter' ->add_resource(Font => 'Random', '', "% The Random font would go here\n"); ->add_resource(File => 'SomeFile', '', "% SomeFile would go here\n"); ->need_resource(pattern => qw(Pattern1 Pattern2)); ->need_resource(procset => [qw(SomeProcset 1.2 0)]); ->need_resource(font => qw(SomeFont OtherFont)); ->need_resource(file => 'AFile', 'filename with spaces.txt'); ->need_resource(form => qw(SomeForm)); ->need_resource(encoding => qw(SomeEncoding)); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ encoding SomeEncoding %%+ file (filename with spaces.txt) AFile %%+ font Courier-Bold OtherFont SomeFont %%+ form SomeForm %%+ pattern Pattern1 Pattern2 %%+ procset SomeProcset 1.2 0 %%DocumentSuppliedResources: %%+ font Random %%+ file SomeFile %%EndComments %%BeginProlog %%EndProlog %%BeginSetup %%BeginResource: font Random % The Random font would go here %%EndResource %%BeginResource: file SomeFile % SomeFile would go here %%EndResource %%EndSetup %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: setup & trailers paper: 'Letter' ->add_setup("% Setup line 1\n"); ->add_setup("% Setup line 2\n"); ->add_page_setup("% Page Setup line 1\n"); ->add_page_setup("% Page Setup line 2\n"); ->add_page_trailer("% Page Trailer line 1\n"); ->add_page_trailer("% Page Trailer line 2\n"); ->add_trailer("% Trailer line 1\n"); ->add_trailer("% Trailer line 2\n"); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%EndComments %%BeginProlog %%EndProlog %%BeginSetup % Setup line 1 % Setup line 2 %%EndSetup %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin % Page Setup line 1 % Page Setup line 2 %%EndPageSetup %%PageTrailer % Page Trailer line 1 % Page Trailer line 2 end pagelevel restore showpage %%Trailer % Trailer line 1 % Trailer line 2 %%EOF --- :: embed recycle.eps strip: 'comments' paper: 'US-Letter' ->add_to_page($ps->embed_document("recycle.eps")); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%+ file recycle.eps %%EndComments %%BeginProlog %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%BeginDocument: recycle.eps %!PS-Adobe-3.0 EPSF-3.0 %%Creator: inkscape 0.46 %%Pages: 1 %%Orientation: Portrait %%BoundingBox: 1 0 64 63 %%HiResBoundingBox: 1.0000001 0.99999201 63.000026 63 %%EndComments %%Page: 1 1 0 64 translate 0.8 -0.8 scale 0 setgray [] 0 setdash 1 setlinewidth 0 setlinejoin 0 setlinecap gsave [1 0 0 1 0 0] concat gsave [0.968751 0 0 0.98751 1.250108 -0.250791] concat gsave newpath 54.962334 37.280594 moveto 72.099779 27.019014 lineto 79.778255 41.853688 lineto 81.632958 49.958845 71.469188 52.933218 63.308493 52.449886 curveto 54.962334 37.280594 lineto closepath eofill grestore gsave newpath 51.067463 47.876791 moveto 42.053608 63.826855 lineto 51.067463 80.000001 lineto 51.29002 73.530745 lineto 59.524901 73.530745 lineto 62.529519 73.790994 66.42439 71.820476 67.87106 68.95765 curveto 78.442863 49.549882 lineto 74.956026 53.007587 70.472444 53.899894 65.311568 53.899894 curveto 51.401311 53.899894 lineto 51.067463 47.876791 lineto closepath eofill grestore gsave newpath 30.928372 28.211849 moveto 13.659051 18.174838 lineto 22.872119 4.2455192 lineto 29.041895 -1.3139163 36.569755 6.1490507 40.109239 13.53501 curveto 30.928372 28.211849 lineto closepath eofill grestore gsave newpath 42.061814 26.481749 moveto 60.350049 26.63881 lineto 70.082475 10.889601 lineto 64.3314 13.834655 lineto 60.334303 6.6182881 lineto 59.102915 3.8589686 55.493541 1.4022881 52.294142 1.5241211 curveto 30.23359 1.680123 lineto 34.942164 3.0573777 37.89678 6.5533043 40.401797 11.075868 curveto 47.153644 23.265664 lineto 42.061814 26.481749 lineto closepath eofill grestore gsave newpath 0.44400982 27.380869 moveto 5.7948147 31.482111 lineto 0.75876087 40.946493 lineto -1.7592722 45.310624 2.5665138 49.562043 5.3226757 51.041841 curveto 8.0359564 52.498618 12.247261 52.671816 16.181673 52.61924 curveto 23.263621 41.26197 lineto 28.614426 44.101291 lineto 19.329208 27.22313 lineto 0.44400982 27.380869 lineto closepath eofill grestore gsave newpath 1.2308874 49.306704 moveto 12.719387 70.128368 lineto 15.027578 73.020264 19.381675 73.703806 23.893136 73.598643 curveto 36.011137 73.598643 lineto 36.011137 53.881162 lineto 13.034138 53.723423 lineto 9.4669308 53.933737 4.7980948 53.197619 1.2308874 49.306704 curveto closepath eofill grestore grestore grestore showpage %%EOF %%EndDocument %%PageTrailer end pagelevel restore showpage %%EOF --- :: embed recycle-i.epsi strip: 'comments' paper: 'US-Letter' ->add_to_page($ps->embed_document("recycle-i.epsi")); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%+ file recycle-i.epsi %%EndComments %%BeginProlog %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%BeginDocument: recycle-i.epsi %!PS-Adobe-3.0 EPSF-3.0 %%Creator: inkscape 0.46 %%Pages: 1 %%Orientation: Portrait %%BoundingBox: 1 0 64 63 %%HiResBoundingBox: 1.0000001 0.99999201 63.000026 63 %%EndComments %%Page: 1 1 0 64 translate 0.8 -0.8 scale 0 setgray [] 0 setdash 1 setlinewidth 0 setlinejoin 0 setlinecap gsave [1 0 0 1 0 0] concat gsave [0.968751 0 0 0.98751 1.250108 -0.250791] concat gsave newpath 54.962334 37.280594 moveto 72.099779 27.019014 lineto 79.778255 41.853688 lineto 81.632958 49.958845 71.469188 52.933218 63.308493 52.449886 curveto 54.962334 37.280594 lineto closepath eofill grestore gsave newpath 51.067463 47.876791 moveto 42.053608 63.826855 lineto 51.067463 80.000001 lineto 51.29002 73.530745 lineto 59.524901 73.530745 lineto 62.529519 73.790994 66.42439 71.820476 67.87106 68.95765 curveto 78.442863 49.549882 lineto 74.956026 53.007587 70.472444 53.899894 65.311568 53.899894 curveto 51.401311 53.899894 lineto 51.067463 47.876791 lineto closepath eofill grestore gsave newpath 30.928372 28.211849 moveto 13.659051 18.174838 lineto 22.872119 4.2455192 lineto 29.041895 -1.3139163 36.569755 6.1490507 40.109239 13.53501 curveto 30.928372 28.211849 lineto closepath eofill grestore gsave newpath 42.061814 26.481749 moveto 60.350049 26.63881 lineto 70.082475 10.889601 lineto 64.3314 13.834655 lineto 60.334303 6.6182881 lineto 59.102915 3.8589686 55.493541 1.4022881 52.294142 1.5241211 curveto 30.23359 1.680123 lineto 34.942164 3.0573777 37.89678 6.5533043 40.401797 11.075868 curveto 47.153644 23.265664 lineto 42.061814 26.481749 lineto closepath eofill grestore gsave newpath 0.44400982 27.380869 moveto 5.7948147 31.482111 lineto 0.75876087 40.946493 lineto -1.7592722 45.310624 2.5665138 49.562043 5.3226757 51.041841 curveto 8.0359564 52.498618 12.247261 52.671816 16.181673 52.61924 curveto 23.263621 41.26197 lineto 28.614426 44.101291 lineto 19.329208 27.22313 lineto 0.44400982 27.380869 lineto closepath eofill grestore gsave newpath 1.2308874 49.306704 moveto 12.719387 70.128368 lineto 15.027578 73.020264 19.381675 73.703806 23.893136 73.598643 curveto 36.011137 73.598643 lineto 36.011137 53.881162 lineto 13.034138 53.723423 lineto 9.4669308 53.933737 4.7980948 53.197619 1.2308874 49.306704 curveto closepath eofill grestore grestore grestore showpage %%EOF %%EndDocument %%PageTrailer end pagelevel restore showpage %%EOF --- :: embed recycle-tiff4.eps strip: 'comments' paper: 'US-Letter' ->add_to_page($ps->embed_document("recycle-tiff4.eps")); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%+ file recycle-tiff4.eps %%EndComments %%BeginProlog %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%BeginDocument: recycle-tiff4.eps %!PS-Adobe-3.0 EPSF-3.0 %%Creator: inkscape 0.46 %%Pages: 1 %%Orientation: Portrait %%BoundingBox: 1 0 64 63 %%HiResBoundingBox: 1.0000001 0.99999201 63.000026 63 %%EndComments %%Page: 1 1 0 64 translate 0.8 -0.8 scale 0 setgray [] 0 setdash 1 setlinewidth 0 setlinejoin 0 setlinecap gsave [1 0 0 1 0 0] concat gsave [0.968751 0 0 0.98751 1.250108 -0.250791] concat gsave newpath 54.962334 37.280594 moveto 72.099779 27.019014 lineto 79.778255 41.853688 lineto 81.632958 49.958845 71.469188 52.933218 63.308493 52.449886 curveto 54.962334 37.280594 lineto closepath eofill grestore gsave newpath 51.067463 47.876791 moveto 42.053608 63.826855 lineto 51.067463 80.000001 lineto 51.29002 73.530745 lineto 59.524901 73.530745 lineto 62.529519 73.790994 66.42439 71.820476 67.87106 68.95765 curveto 78.442863 49.549882 lineto 74.956026 53.007587 70.472444 53.899894 65.311568 53.899894 curveto 51.401311 53.899894 lineto 51.067463 47.876791 lineto closepath eofill grestore gsave newpath 30.928372 28.211849 moveto 13.659051 18.174838 lineto 22.872119 4.2455192 lineto 29.041895 -1.3139163 36.569755 6.1490507 40.109239 13.53501 curveto 30.928372 28.211849 lineto closepath eofill grestore gsave newpath 42.061814 26.481749 moveto 60.350049 26.63881 lineto 70.082475 10.889601 lineto 64.3314 13.834655 lineto 60.334303 6.6182881 lineto 59.102915 3.8589686 55.493541 1.4022881 52.294142 1.5241211 curveto 30.23359 1.680123 lineto 34.942164 3.0573777 37.89678 6.5533043 40.401797 11.075868 curveto 47.153644 23.265664 lineto 42.061814 26.481749 lineto closepath eofill grestore gsave newpath 0.44400982 27.380869 moveto 5.7948147 31.482111 lineto 0.75876087 40.946493 lineto -1.7592722 45.310624 2.5665138 49.562043 5.3226757 51.041841 curveto 8.0359564 52.498618 12.247261 52.671816 16.181673 52.61924 curveto 23.263621 41.26197 lineto 28.614426 44.101291 lineto 19.329208 27.22313 lineto 0.44400982 27.380869 lineto closepath eofill grestore gsave newpath 1.2308874 49.306704 moveto 12.719387 70.128368 lineto 15.027578 73.020264 19.381675 73.703806 23.893136 73.598643 curveto 36.011137 73.598643 lineto 36.011137 53.881162 lineto 13.034138 53.723423 lineto 9.4669308 53.933737 4.7980948 53.197619 1.2308874 49.306704 curveto closepath eofill grestore grestore grestore showpage %%EOF %%EndDocument %%PageTrailer end pagelevel restore showpage %%EOF --- :: embed recycle-wmf.epsf strip: 'comments' paper: 'US-Letter' ->add_to_page($ps->embed_document("recycle-wmf.epsf")); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%+ file recycle-wmf.epsf %%EndComments %%BeginProlog %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%BeginDocument: recycle-wmf.epsf %!PS-Adobe-3.0 EPSF-3.0 %%Creator: inkscape 0.46 %%Pages: 1 %%Orientation: Portrait %%BoundingBox: 1 0 64 63 %%HiResBoundingBox: 1.0000001 0.99999201 63.000026 63 %%EndComments %%Page: 1 1 0 64 translate 0.8 -0.8 scale 0 setgray [] 0 setdash 1 setlinewidth 0 setlinejoin 0 setlinecap gsave [1 0 0 1 0 0] concat gsave [0.968751 0 0 0.98751 1.250108 -0.250791] concat gsave newpath 54.962334 37.280594 moveto 72.099779 27.019014 lineto 79.778255 41.853688 lineto 81.632958 49.958845 71.469188 52.933218 63.308493 52.449886 curveto 54.962334 37.280594 lineto closepath eofill grestore gsave newpath 51.067463 47.876791 moveto 42.053608 63.826855 lineto 51.067463 80.000001 lineto 51.29002 73.530745 lineto 59.524901 73.530745 lineto 62.529519 73.790994 66.42439 71.820476 67.87106 68.95765 curveto 78.442863 49.549882 lineto 74.956026 53.007587 70.472444 53.899894 65.311568 53.899894 curveto 51.401311 53.899894 lineto 51.067463 47.876791 lineto closepath eofill grestore gsave newpath 30.928372 28.211849 moveto 13.659051 18.174838 lineto 22.872119 4.2455192 lineto 29.041895 -1.3139163 36.569755 6.1490507 40.109239 13.53501 curveto 30.928372 28.211849 lineto closepath eofill grestore gsave newpath 42.061814 26.481749 moveto 60.350049 26.63881 lineto 70.082475 10.889601 lineto 64.3314 13.834655 lineto 60.334303 6.6182881 lineto 59.102915 3.8589686 55.493541 1.4022881 52.294142 1.5241211 curveto 30.23359 1.680123 lineto 34.942164 3.0573777 37.89678 6.5533043 40.401797 11.075868 curveto 47.153644 23.265664 lineto 42.061814 26.481749 lineto closepath eofill grestore gsave newpath 0.44400982 27.380869 moveto 5.7948147 31.482111 lineto 0.75876087 40.946493 lineto -1.7592722 45.310624 2.5665138 49.562043 5.3226757 51.041841 curveto 8.0359564 52.498618 12.247261 52.671816 16.181673 52.61924 curveto 23.263621 41.26197 lineto 28.614426 44.101291 lineto 19.329208 27.22313 lineto 0.44400982 27.380869 lineto closepath eofill grestore gsave newpath 1.2308874 49.306704 moveto 12.719387 70.128368 lineto 15.027578 73.020264 19.381675 73.703806 23.893136 73.598643 curveto 36.011137 73.598643 lineto 36.011137 53.881162 lineto 13.034138 53.723423 lineto 9.4669308 53.933737 4.7980948 53.197619 1.2308874 49.306704 curveto closepath eofill grestore grestore grestore showpage %%EOF %%EndDocument %%PageTrailer end pagelevel restore showpage %%EOF --- :: do not strip whitespace in strings paper: 'US-Letter' ->add_to_page("( don't strip this\n 4 spaces\n)\n do strip this\n"); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%EndComments %%BeginProlog %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup ( don't strip this 4 spaces ) do strip this %%PageTrailer end pagelevel restore showpage %%EOF --- :: do not strip comments in strings strip: 'comments' paper: 'US-Letter' ->add_to_page("(% don't strip this\n % not this either\n% nor this)\n% do strip this\n"); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%EndComments %%BeginProlog %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup (% don't strip this % not this either % nor this) %%PageTrailer end pagelevel restore showpage %%EOF --- # Local Variables: # compile-command: "perl 65-testable.t gen" # End: libpostscript-file-perl-2.20+dfsg.orig/t/7A-Times-Italic.t0000644000175000017500000000046111715531042022544 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Compare pre-compiled Times-Italic metrics against Font::AFM #--------------------------------------------------------------------- use strict; use warnings; use lib 't'; use Font_Test; test_font('Times-Italic'); libpostscript-file-perl-2.20+dfsg.orig/t/79-Times-BoldItalic.t0000644000175000017500000000047111715531042023336 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Compare pre-compiled Times-BoldItalic metrics against Font::AFM #--------------------------------------------------------------------- use strict; use warnings; use lib 't'; use Font_Test; test_font('Times-BoldItalic'); libpostscript-file-perl-2.20+dfsg.orig/t/release-pod-coverage.t0000644000175000017500000000146011715531042024004 0ustar gregoagregoa#! /usr/bin/perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } #--------------------------------------------------------------------- use Test::More; eval "use Test::Pod::Coverage 1.08; 1" or plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage"; eval "use Pod::Coverage::TrustPod 0.100001; 1" or plan skip_all => "Pod::Coverage::TrustPod 0.100001 required for testing POD coverage"; my $opts = { coverage_class => 'Pod::Coverage::TrustPod' }; plan tests => 4; pod_coverage_ok('PostScript::File', $opts); pod_coverage_ok('PostScript::File::Functions', $opts); pod_coverage_ok('PostScript::File::Metrics', $opts); pod_coverage_ok('PostScript::File::Metrics::Loader', $opts); libpostscript-file-perl-2.20+dfsg.orig/t/00-load.t0000644000175000017500000000074211715531042021151 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- use Test::More tests => 4; BEGIN { use_ok('PostScript::File'); use_ok('PostScript::File::Functions'); use_ok('PostScript::File::Metrics'); SKIP: { # RECOMMEND PREREQ: Font::AFM eval { require Font::AFM }; skip "Font::AFM not installed", 1 if $@; use_ok('PostScript::File::Metrics::Loader'); }; } diag("Testing PostScript::File $PostScript::File::VERSION"); libpostscript-file-perl-2.20+dfsg.orig/t/release-pod-syntax.t0000644000175000017500000000045011715531042023535 0ustar gregoagregoa#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::Pod 1.41"; plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; all_pod_files_ok(); libpostscript-file-perl-2.20+dfsg.orig/t/20-eps.t0000755000175000017500000000202511715531042021022 0ustar gregoagregoa#!/usr/bin/perl use strict; use warnings; use Test::More; use File::Spec (); BEGIN { # RECOMMEND PREREQ: File::Temp 0.15 - need tempdir eval "use File::Temp 0.15 'tempdir';"; plan skip_all => "File::Temp 0.15 required for testing" if $@; plan tests => 9; } use PostScript::File qw(check_file); ok(1); # module found my $ps = PostScript::File->new( eps => 1, headings => 1, width => 160, height => 112, ); isa_ok($ps, 'PostScript::File'); # object created $ps->add_to_page( <get_page_label(); is($page, '1', "page 1"); ok($ps->get_page()); my $dir = $ARGV[0] || tempdir(CLEANUP => 1); my $name = "fi02eps"; my $out = $ps->output( $name, $dir ); ok(1); # survived so far is($ps->get_filename, undef, 'Did not set filename'); is($out, File::Spec->catfile( $dir, "$name.epsf" ), 'expected output filename'); my $file = check_file( "$name.epsf", $dir ); ok($file); ok(-e $file); libpostscript-file-perl-2.20+dfsg.orig/t/60-content.t0000644000175000017500000010770111715531042021715 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Copyright 2011 Christopher J. Madsen # # Author: Christopher J. Madsen # Created: 21 Oct 2009 # # This program is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. # # 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 either the # GNU General Public License or the Artistic License for more details. # # Test the content of generated PostScript #--------------------------------------------------------------------- use strict; use warnings; use FindBin '$Bin'; chdir $Bin or die "Unable to cd $Bin: $!"; use Test::More; # Load Test::Differences, if available: BEGIN { # SUGGEST PREREQ: Test::Differences if (eval "use Test::Differences; 1") { # Not all versions of Test::Differences support changing the style: eval { Test::Differences::unified_diff() } } else { *eq_or_diff = \&is; # Just use "is" instead } } # end BEGIN use PostScript::File (); my $psVer = sprintf('%g', PostScript::File->VERSION); my $generateResults; if (@ARGV and $ARGV[0] eq 'gen') { # Just output the actual results, so they can be diffed against this file $generateResults = 1; open(OUT, '>', '/tmp/60-content.t') or die $!; printf OUT "#%s\n\n__DATA__\n", '=' x 69; } else { plan tests => 24 * 3; } my ($name, %param, @methods); while () { print OUT $_ if $generateResults; if (/^(\w+):(.+)/) { $param{$1} = eval $2; die $@ if $@; } # end if constructor parameter (key: value) elsif (/^(->.+)/) { push @methods, $1; } # end if method to call (->method(param)) elsif ($_ eq "===\n") { # Read the expected results: my $expected = ''; while () { last if $_ eq "---\n"; $expected .= $_; } $expected =~ s{(procset PostScript_File(?:[-_]\S+)?) 0 0} {$1 $psVer 0}g; # Run the test: my $ps = PostScript::File->new(%param); foreach my $call (@methods) { eval '$ps' . $call; die $@ if $@; } # end foreach $call in @methods if ($generateResults) { $expected = $ps->output; # Suppress version numbers: $expected =~ s{(procset PostScript_File(?:[-_]\S+)?) \Q$psVer\E 0} {$1 0 0}g; print OUT "$expected---\n"; } else { eq_or_diff($ps->output, $expected, $name); # Calling output again should produce exactly the same output: eq_or_diff($ps->output, $expected, "repeat $name"); eq_or_diff(output_to_fh($ps), $expected, "$name to filehandle"); } # Clean up: @methods = (); %param = (); undef $name; } # end elsif expected contents (=== ... ---) elsif (/^::\s*(.+)/) { $name = $1; } # end elsif test name (:: name) else { die "Unrecognized line $_" if /\S/ and not /^# /; } } # end while done_testing unless $generateResults; #--------------------------------------------------------------------- # Test output to a filehandle: sub output_to_fh { my ($ps) = @_; my $buffer = ''; open(my $fh, '>', \$buffer) or return undef; $ps->output($fh); return $buffer; } # end output_to_fh #===================================================================== __DATA__ :: no parameters === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%+ procset PostScript_File 0 0 %%EndComments %%BeginProlog %%BeginResource: procset PostScript_File 0 0 /errx 72 def /erry 72 def /errmsg (ERROR:) def /errfont /Courier-Bold def /errsize 12 def % Report fatal error on page % _ str => _ /report_error { 0 setgray errfont findfont errsize scalefont setfont errmsg errx erry moveto show 80 string cvs errx erry errsize sub moveto show stop } bind def % PostScript errors printed on page % not called directly errordict begin /handleerror { $error begin false binary 0 setgray errfont findfont errsize scalefont setfont errx erry moveto errmsg show errx erry errsize sub moveto errorname 80 string cvs show stop } def end %%EndResource %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 568 814 %%PageHiResBoundingBox: 28 28 567.27559 813.88976 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: strip none strip: 'none' === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%+ procset PostScript_File 0 0 %%EndComments %%BeginProlog %%BeginResource: procset PostScript_File 0 0 /errx 72 def /erry 72 def /errmsg (ERROR:) def /errfont /Courier-Bold def /errsize 12 def % Report fatal error on page % _ str => _ /report_error { 0 setgray errfont findfont errsize scalefont setfont errmsg errx erry moveto show 80 string cvs errx erry errsize sub moveto show stop } bind def % PostScript errors printed on page % not called directly errordict begin /handleerror { $error begin false binary 0 setgray errfont findfont errsize scalefont setfont errx erry moveto errmsg show errx erry errsize sub moveto errorname 80 string cvs show stop } def end %%EndResource %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 568 814 %%PageHiResBoundingBox: 28 28 567.27559 813.88976 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: strip comments strip: 'comments' paper: 'US-Letter' ->add_to_page("% strip this\n"); ->add_to_page("%%%%%%%%%%%%%\n"); ->add_to_page("%------------\n"); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%+ procset PostScript_File 0 0 %%EndComments %%BeginProlog %%BeginResource: procset PostScript_File 0 0 /errx 72 def /erry 72 def /errmsg (ERROR:) def /errfont /Courier-Bold def /errsize 12 def /report_error { 0 setgray errfont findfont errsize scalefont setfont errmsg errx erry moveto show 80 string cvs errx erry errsize sub moveto show stop } bind def errordict begin /handleerror { $error begin false binary 0 setgray errfont findfont errsize scalefont setfont errx erry moveto errmsg show errx erry errsize sub moveto errorname 80 string cvs show stop } def end %%EndResource %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%%%%%%%%%%%% %%PageTrailer end pagelevel restore showpage %%EOF --- :: custom paper errors: 0 paper: '123x456' === %!PS-Adobe-3.0 %%Orientation: Portrait %%EndComments %%BeginProlog %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 95 428 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: multiple comments paper: 'Letter' order: 'ascend' need_fonts: [qw( Paladin Paladin-Bold )] ->add_comment("ProofMode: NotifyMe"); ->add_comment("Requirements: manualfeed"); ->add_default("PageResources: font Paladin"); ->add_default("+ font Paladin-Bold"); === %!PS-Adobe-3.0 %%ProofMode: NotifyMe %%Requirements: manualfeed %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold Paladin Paladin-Bold %%DocumentSuppliedResources: %%+ procset PostScript_File 0 0 %%PageOrder: Ascend %%EndComments %%BeginDefaults %%PageResources: font Paladin %%+ font Paladin-Bold %%EndDefaults %%BeginProlog %%BeginResource: procset PostScript_File 0 0 /errx 72 def /erry 72 def /errmsg (ERROR:) def /errfont /Courier-Bold def /errsize 12 def % Report fatal error on page % _ str => _ /report_error { 0 setgray errfont findfont errsize scalefont setfont errmsg errx erry moveto show 80 string cvs errx erry errsize sub moveto show stop } bind def % PostScript errors printed on page % not called directly errordict begin /handleerror { $error begin false binary 0 setgray errfont findfont errsize scalefont setfont errx erry moveto errmsg show errx erry errsize sub moveto errorname 80 string cvs show stop } def end %%EndResource %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: cp1252 strip: 'comments' paper: 'US-Letter' reencode: 'cp1252' ->add_to_page("(\x{201C}Hello, world.\x{201D}) show\n"); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier Courier-Bold Courier-BoldOblique Courier-Oblique Helvetica %%+ font Helvetica-Bold Helvetica-BoldOblique Helvetica-Oblique Symbol %%+ font Times-Bold Times-BoldItalic Times-Italic Times-Roman %%DocumentSuppliedResources: %%+ procset PostScript_File 0 0 %%EndComments %%BeginProlog %%BeginResource: procset PostScript_File 0 0 /errx 72 def /erry 72 def /errmsg (ERROR:) def /errfont /Courier-Bold def /errsize 12 def /report_error { 0 setgray errfont findfont errsize scalefont setfont errmsg errx erry moveto show 80 string cvs errx erry errsize sub moveto show stop } bind def errordict begin /handleerror { $error begin false binary 0 setgray errfont findfont errsize scalefont setfont errx erry moveto errmsg show errx erry errsize sub moveto errorname 80 string cvs show stop } def end %%EndResource %%EndProlog %%BeginSetup % Handle font encoding: /STARTDIFFENC { mark } bind def /ENDDIFFENC { counttomark 2 add -1 roll 256 array copy /TempEncode exch def /EncodePointer 0 def { counttomark -1 roll dup type dup /marktype eq { pop pop exit } { /nametype eq { TempEncode EncodePointer 3 -1 roll put /EncodePointer EncodePointer 1 add def } { /EncodePointer exch def } ifelse } ifelse } loop TempEncode def } bind def /Win1252Encoding StandardEncoding STARTDIFFENC 17 /dotlessi /dotaccent /ring /caron 45 /minus 96 /grave 128 /Euro /.notdef /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl /circumflex /perthousand /Scaron /guilsinglleft /OE /.notdef /Zcaron /.notdef /.notdef /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash /tilde /trademark /scaron /guilsinglright /oe /.notdef /zcaron /Ydieresis /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ENDDIFFENC /REENCODEFONT { % /Newfont NewEncoding /Oldfont findfont dup length 4 add dict begin { % forall 1 index /FID ne 2 index /UniqueID ne and 2 index /XUID ne and { def } { pop pop } ifelse } forall /Encoding exch def /BitmapWidths false def /ExactSize 0 def /InBetweenSize 0 def /TransformedChar 0 def currentdict end definefont pop } bind def % Reencode the fonts: /Courier-iso Win1252Encoding /Courier REENCODEFONT /Courier-Bold-iso Win1252Encoding /Courier-Bold REENCODEFONT /Courier-BoldOblique-iso Win1252Encoding /Courier-BoldOblique REENCODEFONT /Courier-Oblique-iso Win1252Encoding /Courier-Oblique REENCODEFONT /Helvetica-iso Win1252Encoding /Helvetica REENCODEFONT /Helvetica-Bold-iso Win1252Encoding /Helvetica-Bold REENCODEFONT /Helvetica-BoldOblique-iso Win1252Encoding /Helvetica-BoldOblique REENCODEFONT /Helvetica-Oblique-iso Win1252Encoding /Helvetica-Oblique REENCODEFONT /Times-Bold-iso Win1252Encoding /Times-Bold REENCODEFONT /Times-BoldItalic-iso Win1252Encoding /Times-BoldItalic REENCODEFONT /Times-Italic-iso Win1252Encoding /Times-Italic REENCODEFONT /Times-Roman-iso Win1252Encoding /Times-Roman REENCODEFONT % end font encoding %%EndSetup %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup (“Hello, world.”) show %%PageTrailer end pagelevel restore showpage %%Trailer % Local Variables: % coding: windows-1252 % End: %%EOF --- :: multiple resources paper: 'Letter' ->add_resource(Font => 'Random', '', "% The Random font would go here\n"); ->add_resource(File => 'SomeFile', '', "% SomeFile would go here\n"); ->need_resource(pattern => qw(Pattern1 Pattern2)); ->need_resource(procset => [qw(SomeProcset 1.2 0)]); ->need_resource(font => qw(SomeFont OtherFont)); ->need_resource(file => 'AFile', 'filename with spaces.txt'); ->need_resource(form => qw(SomeForm)); ->need_resource(encoding => qw(SomeEncoding)); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ encoding SomeEncoding %%+ file (filename with spaces.txt) AFile %%+ font Courier-Bold OtherFont SomeFont %%+ form SomeForm %%+ pattern Pattern1 Pattern2 %%+ procset SomeProcset 1.2 0 %%DocumentSuppliedResources: %%+ font Random %%+ file SomeFile %%+ procset PostScript_File 0 0 %%EndComments %%BeginProlog %%BeginResource: procset PostScript_File 0 0 /errx 72 def /erry 72 def /errmsg (ERROR:) def /errfont /Courier-Bold def /errsize 12 def % Report fatal error on page % _ str => _ /report_error { 0 setgray errfont findfont errsize scalefont setfont errmsg errx erry moveto show 80 string cvs errx erry errsize sub moveto show stop } bind def % PostScript errors printed on page % not called directly errordict begin /handleerror { $error begin false binary 0 setgray errfont findfont errsize scalefont setfont errx erry moveto errmsg show errx erry errsize sub moveto errorname 80 string cvs show stop } def end %%EndResource %%EndProlog %%BeginSetup %%BeginResource: font Random % The Random font would go here %%EndResource %%BeginResource: file SomeFile % SomeFile would go here %%EndResource %%EndSetup %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: setup & trailers paper: 'Letter' ->add_setup("% Setup line 1\n"); ->add_setup("% Setup line 2\n"); ->add_page_setup("% Page Setup line 1\n"); ->add_page_setup("% Page Setup line 2\n"); ->add_page_trailer("% Page Trailer line 1\n"); ->add_page_trailer("% Page Trailer line 2\n"); ->add_trailer("% Trailer line 1\n"); ->add_trailer("% Trailer line 2\n"); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%+ procset PostScript_File 0 0 %%EndComments %%BeginProlog %%BeginResource: procset PostScript_File 0 0 /errx 72 def /erry 72 def /errmsg (ERROR:) def /errfont /Courier-Bold def /errsize 12 def % Report fatal error on page % _ str => _ /report_error { 0 setgray errfont findfont errsize scalefont setfont errmsg errx erry moveto show 80 string cvs errx erry errsize sub moveto show stop } bind def % PostScript errors printed on page % not called directly errordict begin /handleerror { $error begin false binary 0 setgray errfont findfont errsize scalefont setfont errx erry moveto errmsg show errx erry errsize sub moveto errorname 80 string cvs show stop } def end %%EndResource %%EndProlog %%BeginSetup % Setup line 1 % Setup line 2 %%EndSetup %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin % Page Setup line 1 % Page Setup line 2 %%EndPageSetup %%PageTrailer % Page Trailer line 1 % Page Trailer line 2 end pagelevel restore showpage %%Trailer % Trailer line 1 % Trailer line 2 %%EOF --- :: embed recycle.eps strip: 'comments' paper: 'US-Letter' ->add_to_page($ps->embed_document("recycle.eps")); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%+ file recycle.eps %%+ procset PostScript_File 0 0 %%EndComments %%BeginProlog %%BeginResource: procset PostScript_File 0 0 /errx 72 def /erry 72 def /errmsg (ERROR:) def /errfont /Courier-Bold def /errsize 12 def /report_error { 0 setgray errfont findfont errsize scalefont setfont errmsg errx erry moveto show 80 string cvs errx erry errsize sub moveto show stop } bind def errordict begin /handleerror { $error begin false binary 0 setgray errfont findfont errsize scalefont setfont errx erry moveto errmsg show errx erry errsize sub moveto errorname 80 string cvs show stop } def end %%EndResource %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%BeginDocument: recycle.eps %!PS-Adobe-3.0 EPSF-3.0 %%Creator: inkscape 0.46 %%Pages: 1 %%Orientation: Portrait %%BoundingBox: 1 0 64 63 %%HiResBoundingBox: 1.0000001 0.99999201 63.000026 63 %%EndComments %%Page: 1 1 0 64 translate 0.8 -0.8 scale 0 setgray [] 0 setdash 1 setlinewidth 0 setlinejoin 0 setlinecap gsave [1 0 0 1 0 0] concat gsave [0.968751 0 0 0.98751 1.250108 -0.250791] concat gsave newpath 54.962334 37.280594 moveto 72.099779 27.019014 lineto 79.778255 41.853688 lineto 81.632958 49.958845 71.469188 52.933218 63.308493 52.449886 curveto 54.962334 37.280594 lineto closepath eofill grestore gsave newpath 51.067463 47.876791 moveto 42.053608 63.826855 lineto 51.067463 80.000001 lineto 51.29002 73.530745 lineto 59.524901 73.530745 lineto 62.529519 73.790994 66.42439 71.820476 67.87106 68.95765 curveto 78.442863 49.549882 lineto 74.956026 53.007587 70.472444 53.899894 65.311568 53.899894 curveto 51.401311 53.899894 lineto 51.067463 47.876791 lineto closepath eofill grestore gsave newpath 30.928372 28.211849 moveto 13.659051 18.174838 lineto 22.872119 4.2455192 lineto 29.041895 -1.3139163 36.569755 6.1490507 40.109239 13.53501 curveto 30.928372 28.211849 lineto closepath eofill grestore gsave newpath 42.061814 26.481749 moveto 60.350049 26.63881 lineto 70.082475 10.889601 lineto 64.3314 13.834655 lineto 60.334303 6.6182881 lineto 59.102915 3.8589686 55.493541 1.4022881 52.294142 1.5241211 curveto 30.23359 1.680123 lineto 34.942164 3.0573777 37.89678 6.5533043 40.401797 11.075868 curveto 47.153644 23.265664 lineto 42.061814 26.481749 lineto closepath eofill grestore gsave newpath 0.44400982 27.380869 moveto 5.7948147 31.482111 lineto 0.75876087 40.946493 lineto -1.7592722 45.310624 2.5665138 49.562043 5.3226757 51.041841 curveto 8.0359564 52.498618 12.247261 52.671816 16.181673 52.61924 curveto 23.263621 41.26197 lineto 28.614426 44.101291 lineto 19.329208 27.22313 lineto 0.44400982 27.380869 lineto closepath eofill grestore gsave newpath 1.2308874 49.306704 moveto 12.719387 70.128368 lineto 15.027578 73.020264 19.381675 73.703806 23.893136 73.598643 curveto 36.011137 73.598643 lineto 36.011137 53.881162 lineto 13.034138 53.723423 lineto 9.4669308 53.933737 4.7980948 53.197619 1.2308874 49.306704 curveto closepath eofill grestore grestore grestore showpage %%EOF %%EndDocument %%PageTrailer end pagelevel restore showpage %%EOF --- :: embed recycle-i.epsi strip: 'comments' paper: 'US-Letter' ->add_to_page($ps->embed_document("recycle-i.epsi")); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%+ file recycle-i.epsi %%+ procset PostScript_File 0 0 %%EndComments %%BeginProlog %%BeginResource: procset PostScript_File 0 0 /errx 72 def /erry 72 def /errmsg (ERROR:) def /errfont /Courier-Bold def /errsize 12 def /report_error { 0 setgray errfont findfont errsize scalefont setfont errmsg errx erry moveto show 80 string cvs errx erry errsize sub moveto show stop } bind def errordict begin /handleerror { $error begin false binary 0 setgray errfont findfont errsize scalefont setfont errx erry moveto errmsg show errx erry errsize sub moveto errorname 80 string cvs show stop } def end %%EndResource %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%BeginDocument: recycle-i.epsi %!PS-Adobe-3.0 EPSF-3.0 %%Creator: inkscape 0.46 %%Pages: 1 %%Orientation: Portrait %%BoundingBox: 1 0 64 63 %%HiResBoundingBox: 1.0000001 0.99999201 63.000026 63 %%EndComments %%Page: 1 1 0 64 translate 0.8 -0.8 scale 0 setgray [] 0 setdash 1 setlinewidth 0 setlinejoin 0 setlinecap gsave [1 0 0 1 0 0] concat gsave [0.968751 0 0 0.98751 1.250108 -0.250791] concat gsave newpath 54.962334 37.280594 moveto 72.099779 27.019014 lineto 79.778255 41.853688 lineto 81.632958 49.958845 71.469188 52.933218 63.308493 52.449886 curveto 54.962334 37.280594 lineto closepath eofill grestore gsave newpath 51.067463 47.876791 moveto 42.053608 63.826855 lineto 51.067463 80.000001 lineto 51.29002 73.530745 lineto 59.524901 73.530745 lineto 62.529519 73.790994 66.42439 71.820476 67.87106 68.95765 curveto 78.442863 49.549882 lineto 74.956026 53.007587 70.472444 53.899894 65.311568 53.899894 curveto 51.401311 53.899894 lineto 51.067463 47.876791 lineto closepath eofill grestore gsave newpath 30.928372 28.211849 moveto 13.659051 18.174838 lineto 22.872119 4.2455192 lineto 29.041895 -1.3139163 36.569755 6.1490507 40.109239 13.53501 curveto 30.928372 28.211849 lineto closepath eofill grestore gsave newpath 42.061814 26.481749 moveto 60.350049 26.63881 lineto 70.082475 10.889601 lineto 64.3314 13.834655 lineto 60.334303 6.6182881 lineto 59.102915 3.8589686 55.493541 1.4022881 52.294142 1.5241211 curveto 30.23359 1.680123 lineto 34.942164 3.0573777 37.89678 6.5533043 40.401797 11.075868 curveto 47.153644 23.265664 lineto 42.061814 26.481749 lineto closepath eofill grestore gsave newpath 0.44400982 27.380869 moveto 5.7948147 31.482111 lineto 0.75876087 40.946493 lineto -1.7592722 45.310624 2.5665138 49.562043 5.3226757 51.041841 curveto 8.0359564 52.498618 12.247261 52.671816 16.181673 52.61924 curveto 23.263621 41.26197 lineto 28.614426 44.101291 lineto 19.329208 27.22313 lineto 0.44400982 27.380869 lineto closepath eofill grestore gsave newpath 1.2308874 49.306704 moveto 12.719387 70.128368 lineto 15.027578 73.020264 19.381675 73.703806 23.893136 73.598643 curveto 36.011137 73.598643 lineto 36.011137 53.881162 lineto 13.034138 53.723423 lineto 9.4669308 53.933737 4.7980948 53.197619 1.2308874 49.306704 curveto closepath eofill grestore grestore grestore showpage %%EOF %%EndDocument %%PageTrailer end pagelevel restore showpage %%EOF --- :: embed recycle-tiff4.eps strip: 'comments' paper: 'US-Letter' ->add_to_page($ps->embed_document("recycle-tiff4.eps")); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%+ file recycle-tiff4.eps %%+ procset PostScript_File 0 0 %%EndComments %%BeginProlog %%BeginResource: procset PostScript_File 0 0 /errx 72 def /erry 72 def /errmsg (ERROR:) def /errfont /Courier-Bold def /errsize 12 def /report_error { 0 setgray errfont findfont errsize scalefont setfont errmsg errx erry moveto show 80 string cvs errx erry errsize sub moveto show stop } bind def errordict begin /handleerror { $error begin false binary 0 setgray errfont findfont errsize scalefont setfont errx erry moveto errmsg show errx erry errsize sub moveto errorname 80 string cvs show stop } def end %%EndResource %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%BeginDocument: recycle-tiff4.eps %!PS-Adobe-3.0 EPSF-3.0 %%Creator: inkscape 0.46 %%Pages: 1 %%Orientation: Portrait %%BoundingBox: 1 0 64 63 %%HiResBoundingBox: 1.0000001 0.99999201 63.000026 63 %%EndComments %%Page: 1 1 0 64 translate 0.8 -0.8 scale 0 setgray [] 0 setdash 1 setlinewidth 0 setlinejoin 0 setlinecap gsave [1 0 0 1 0 0] concat gsave [0.968751 0 0 0.98751 1.250108 -0.250791] concat gsave newpath 54.962334 37.280594 moveto 72.099779 27.019014 lineto 79.778255 41.853688 lineto 81.632958 49.958845 71.469188 52.933218 63.308493 52.449886 curveto 54.962334 37.280594 lineto closepath eofill grestore gsave newpath 51.067463 47.876791 moveto 42.053608 63.826855 lineto 51.067463 80.000001 lineto 51.29002 73.530745 lineto 59.524901 73.530745 lineto 62.529519 73.790994 66.42439 71.820476 67.87106 68.95765 curveto 78.442863 49.549882 lineto 74.956026 53.007587 70.472444 53.899894 65.311568 53.899894 curveto 51.401311 53.899894 lineto 51.067463 47.876791 lineto closepath eofill grestore gsave newpath 30.928372 28.211849 moveto 13.659051 18.174838 lineto 22.872119 4.2455192 lineto 29.041895 -1.3139163 36.569755 6.1490507 40.109239 13.53501 curveto 30.928372 28.211849 lineto closepath eofill grestore gsave newpath 42.061814 26.481749 moveto 60.350049 26.63881 lineto 70.082475 10.889601 lineto 64.3314 13.834655 lineto 60.334303 6.6182881 lineto 59.102915 3.8589686 55.493541 1.4022881 52.294142 1.5241211 curveto 30.23359 1.680123 lineto 34.942164 3.0573777 37.89678 6.5533043 40.401797 11.075868 curveto 47.153644 23.265664 lineto 42.061814 26.481749 lineto closepath eofill grestore gsave newpath 0.44400982 27.380869 moveto 5.7948147 31.482111 lineto 0.75876087 40.946493 lineto -1.7592722 45.310624 2.5665138 49.562043 5.3226757 51.041841 curveto 8.0359564 52.498618 12.247261 52.671816 16.181673 52.61924 curveto 23.263621 41.26197 lineto 28.614426 44.101291 lineto 19.329208 27.22313 lineto 0.44400982 27.380869 lineto closepath eofill grestore gsave newpath 1.2308874 49.306704 moveto 12.719387 70.128368 lineto 15.027578 73.020264 19.381675 73.703806 23.893136 73.598643 curveto 36.011137 73.598643 lineto 36.011137 53.881162 lineto 13.034138 53.723423 lineto 9.4669308 53.933737 4.7980948 53.197619 1.2308874 49.306704 curveto closepath eofill grestore grestore grestore showpage %%EOF %%EndDocument %%PageTrailer end pagelevel restore showpage %%EOF --- :: embed recycle-wmf.epsf strip: 'comments' paper: 'US-Letter' ->add_to_page($ps->embed_document("recycle-wmf.epsf")); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentNeededResources: %%+ font Courier-Bold %%DocumentSuppliedResources: %%+ file recycle-wmf.epsf %%+ procset PostScript_File 0 0 %%EndComments %%BeginProlog %%BeginResource: procset PostScript_File 0 0 /errx 72 def /erry 72 def /errmsg (ERROR:) def /errfont /Courier-Bold def /errsize 12 def /report_error { 0 setgray errfont findfont errsize scalefont setfont errmsg errx erry moveto show 80 string cvs errx erry errsize sub moveto show stop } bind def errordict begin /handleerror { $error begin false binary 0 setgray errfont findfont errsize scalefont setfont errx erry moveto errmsg show errx erry errsize sub moveto errorname 80 string cvs show stop } def end %%EndResource %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%BeginDocument: recycle-wmf.epsf %!PS-Adobe-3.0 EPSF-3.0 %%Creator: inkscape 0.46 %%Pages: 1 %%Orientation: Portrait %%BoundingBox: 1 0 64 63 %%HiResBoundingBox: 1.0000001 0.99999201 63.000026 63 %%EndComments %%Page: 1 1 0 64 translate 0.8 -0.8 scale 0 setgray [] 0 setdash 1 setlinewidth 0 setlinejoin 0 setlinecap gsave [1 0 0 1 0 0] concat gsave [0.968751 0 0 0.98751 1.250108 -0.250791] concat gsave newpath 54.962334 37.280594 moveto 72.099779 27.019014 lineto 79.778255 41.853688 lineto 81.632958 49.958845 71.469188 52.933218 63.308493 52.449886 curveto 54.962334 37.280594 lineto closepath eofill grestore gsave newpath 51.067463 47.876791 moveto 42.053608 63.826855 lineto 51.067463 80.000001 lineto 51.29002 73.530745 lineto 59.524901 73.530745 lineto 62.529519 73.790994 66.42439 71.820476 67.87106 68.95765 curveto 78.442863 49.549882 lineto 74.956026 53.007587 70.472444 53.899894 65.311568 53.899894 curveto 51.401311 53.899894 lineto 51.067463 47.876791 lineto closepath eofill grestore gsave newpath 30.928372 28.211849 moveto 13.659051 18.174838 lineto 22.872119 4.2455192 lineto 29.041895 -1.3139163 36.569755 6.1490507 40.109239 13.53501 curveto 30.928372 28.211849 lineto closepath eofill grestore gsave newpath 42.061814 26.481749 moveto 60.350049 26.63881 lineto 70.082475 10.889601 lineto 64.3314 13.834655 lineto 60.334303 6.6182881 lineto 59.102915 3.8589686 55.493541 1.4022881 52.294142 1.5241211 curveto 30.23359 1.680123 lineto 34.942164 3.0573777 37.89678 6.5533043 40.401797 11.075868 curveto 47.153644 23.265664 lineto 42.061814 26.481749 lineto closepath eofill grestore gsave newpath 0.44400982 27.380869 moveto 5.7948147 31.482111 lineto 0.75876087 40.946493 lineto -1.7592722 45.310624 2.5665138 49.562043 5.3226757 51.041841 curveto 8.0359564 52.498618 12.247261 52.671816 16.181673 52.61924 curveto 23.263621 41.26197 lineto 28.614426 44.101291 lineto 19.329208 27.22313 lineto 0.44400982 27.380869 lineto closepath eofill grestore gsave newpath 1.2308874 49.306704 moveto 12.719387 70.128368 lineto 15.027578 73.020264 19.381675 73.703806 23.893136 73.598643 curveto 36.011137 73.598643 lineto 36.011137 53.881162 lineto 13.034138 53.723423 lineto 9.4669308 53.933737 4.7980948 53.197619 1.2308874 49.306704 curveto closepath eofill grestore grestore grestore showpage %%EOF %%EndDocument %%PageTrailer end pagelevel restore showpage %%EOF --- :: newpage 0 errors: 0 newpage: 0 ->newpage(); ->add_to_page("(Hello) show"); ->newpage(); ->add_to_page("(World) show"); === %!PS-Adobe-3.0 %%Orientation: Portrait %%Pages: 2 %%EndComments %%BeginProlog %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 568 814 %%PageHiResBoundingBox: 28 28 567.27559 813.88976 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup (Hello) show %%PageTrailer end pagelevel restore showpage %%Page: 2 2 %%PageBoundingBox: 28 28 568 814 %%PageHiResBoundingBox: 28 28 567.27559 813.88976 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup (World) show %%PageTrailer end pagelevel restore showpage %%EOF --- :: newpage alpha errors: 0 newpage: 0 ->newpage('alpha'); ->add_to_page("(Hello) show"); ->newpage('beta'); ->add_to_page("(World) show"); === %!PS-Adobe-3.0 %%Orientation: Portrait %%Pages: 2 %%EndComments %%BeginProlog %%EndProlog %%Page: alpha 1 %%PageBoundingBox: 28 28 568 814 %%PageHiResBoundingBox: 28 28 567.27559 813.88976 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup (Hello) show %%PageTrailer end pagelevel restore showpage %%Page: beta 2 %%PageBoundingBox: 28 28 568 814 %%PageHiResBoundingBox: 28 28 567.27559 813.88976 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup (World) show %%PageTrailer end pagelevel restore showpage %%EOF --- :: landscape errors: 0 landscape: 1 paper: 'Letter' === %!PS-Adobe-3.0 %%Orientation: Landscape %%DocumentSuppliedResources: %%+ procset PostScript_File 0 0 %%EndComments %%BeginProlog %%BeginResource: procset PostScript_File 0 0 % Rotate page 90 degrees % _ => _ /landscape { 612 0 translate 90 rotate } bind def %%EndResource %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def landscape userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: normal with left/right/top/bottom errors: 0 left: 10 right: 20 top: 30 bottom: 40 paper: 'Letter' === %!PS-Adobe-3.0 %%Orientation: Portrait %%EndComments %%BeginProlog %%EndProlog %%Page: 1 1 %%PageBoundingBox: 10 40 592 762 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: landscape with left/right/top/bottom errors: 0 landscape: 1 left: 10 right: 20 top: 30 bottom: 40 paper: 'Letter' === %!PS-Adobe-3.0 %%Orientation: Landscape %%DocumentSuppliedResources: %%+ procset PostScript_File 0 0 %%EndComments %%BeginProlog %%BeginResource: procset PostScript_File 0 0 % Rotate page 90 degrees % _ => _ /landscape { 612 0 translate 90 rotate } bind def %%EndResource %%EndProlog %%Page: 1 1 %%PageBoundingBox: 40 10 582 772 %%BeginPageSetup /pagelevel save def landscape userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: normal with clipping errors: 0 clipping: 1 left: 10 right: 20 top: 30 bottom: 40 paper: 'Letter' === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentSuppliedResources: %%+ procset PostScript_File 0 0 %%EndComments %%BeginProlog %%BeginResource: procset PostScript_File 0 0 % Draw box as clipping path % x0 y0 x1 y1 => _ /cliptobox { 4 dict begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def newpath x0 y0 moveto x0 y1 lineto x1 y1 lineto x1 y0 lineto closepath clip end } bind def %%EndResource %%EndProlog %%Page: 1 1 %%PageBoundingBox: 10 40 592 762 %%BeginPageSetup /pagelevel save def 10 40 592 762 cliptobox userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: landscape with clipping errors: 0 clipping: 1 landscape: 1 left: 10 right: 20 top: 30 bottom: 40 paper: 'Letter' === %!PS-Adobe-3.0 %%Orientation: Landscape %%DocumentSuppliedResources: %%+ procset PostScript_File 0 0 %%EndComments %%BeginProlog %%BeginResource: procset PostScript_File 0 0 % Rotate page 90 degrees % _ => _ /landscape { 612 0 translate 90 rotate } bind def % Draw box as clipping path % x0 y0 x1 y1 => _ /cliptobox { 4 dict begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def newpath x0 y0 moveto x0 y1 lineto x1 y1 lineto x1 y0 lineto closepath clip end } bind def %%EndResource %%EndProlog %%Page: 1 1 %%PageBoundingBox: 40 10 582 772 %%BeginPageSetup /pagelevel save def landscape 10 40 772 582 cliptobox userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: normal with stroked bounding box errors: 0 clipping: 1 clip_command: 'stroke' left: 10 right: 20 top: 30 bottom: 40 paper: 'Letter' === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentSuppliedResources: %%+ procset PostScript_File 0 0 %%EndComments %%BeginProlog %%BeginResource: procset PostScript_File 0 0 % Draw box as clipping path % x0 y0 x1 y1 => _ /cliptobox { 4 dict begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def newpath x0 y0 moveto x0 y1 lineto x1 y1 lineto x1 y0 lineto closepath gsave 0 setgray 0.5 setlinewidth stroke grestore newpath end } bind def %%EndResource %%EndProlog %%Page: 1 1 %%PageBoundingBox: 10 40 592 762 %%BeginPageSetup /pagelevel save def 10 40 592 762 cliptobox userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: use functions errors: 0 paper: 'Letter' ->use_functions(qw(drawBox)); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentSuppliedResources: %%+ procset PostScript_File_Functions-BD 0 0 %%EndComments %%BeginProlog %%BeginResource: procset PostScript_File_Functions-BD 0 0 /boxPath { newpath 2 copy moveto 3 index exch lineto 1 index 4 2 roll lineto lineto closepath } bind def /drawBox { boxPath stroke } bind def %%EndResource %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: use more functions errors: 0 paper: 'Letter' ->use_functions(qw(clipBox)); ->use_functions(qw(setColor)); === %!PS-Adobe-3.0 %%Orientation: Portrait %%DocumentSuppliedResources: %%+ procset PostScript_File_Functions-ABC 0 0 %%EndComments %%BeginProlog %%BeginResource: procset PostScript_File_Functions-ABC 0 0 /setColor { dup type (arraytype) eq { aload pop setrgbcolor }{ setgray } ifelse } bind def /boxPath { newpath 2 copy moveto 3 index exch lineto 1 index 4 2 roll lineto lineto closepath } bind def /clipBox { boxPath clip } bind def %%EndResource %%EndProlog %%Page: 1 1 %%PageBoundingBox: 28 28 584 764 %%BeginPageSetup /pagelevel save def userdict begin %%EndPageSetup %%PageTrailer end pagelevel restore showpage %%EOF --- :: preview errors: 0 eps: 1 paper: 'Letter' strip: 'comments' ->add_preview(1,2,3,4, "%line1\n%line2\n"); === %!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: 28 28 584 764 %%Orientation: Portrait %%EndComments %%BeginPreview: 1 2 3 4 %line1 %line2 %%EndPreview %%BeginProlog %%EndProlog userdict begin end %%EOF --- :: preview with all_comments errors: 0 eps: 1 strip: 'all_comments' paper: 'Letter' ->add_preview(1,2,3,4, "%line1\n%line2\n"); ->add_to_page("(testing) show %comment\n"); === %!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: 28 28 584 764 %%Orientation: Portrait %%EndComments %%BeginPreview: 1 2 3 4 %line1 %line2 %%EndPreview %%BeginProlog %%EndProlog userdict begin (testing) show end %%EOF --- # Local Variables: # coding: windows-1252 # compile-command: "perl 60-content.t gen" # End: libpostscript-file-perl-2.20+dfsg.orig/t/77-Helvetica-Oblique.t0000644000175000017500000000047311715531042023553 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Compare pre-compiled Helvetica-Oblique metrics against Font::AFM #--------------------------------------------------------------------- use strict; use warnings; use lib 't'; use Font_Test; test_font('Helvetica-Oblique'); libpostscript-file-perl-2.20+dfsg.orig/t/74-Helvetica.t0000644000175000017500000000045311715531042022150 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Compare pre-compiled Helvetica metrics against Font::AFM #--------------------------------------------------------------------- use strict; use warnings; use lib 't'; use Font_Test; test_font('Helvetica'); libpostscript-file-perl-2.20+dfsg.orig/lib/0000755000175000017500000000000011715531042020130 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/0000755000175000017500000000000011715531042022242 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/0000755000175000017500000000000011715531042023121 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Functions.pm0000644000175000017500000003700611715531042025435 0ustar gregoagregoa#--------------------------------------------------------------------- package PostScript::File::Functions; # # Copyright 2012 Christopher J. Madsen # # Author: Christopher J. Madsen # Created: 2 Feb 2012 # # This program is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. # # 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 either the # GNU General Public License or the Artistic License for more details. # # ABSTRACT: Collection of useful PostScript functions #--------------------------------------------------------------------- use 5.008; use strict; use warnings; our $VERSION = '2.20'; # This file is part of PostScript-File 2.20 (February 11, 2012) use Carp qw(croak); use PostScript::File 2.20 (); # strip method # Constant indexes of the arrayrefs in the _functions hash: sub _id_ () { 0 } ## no critic sub _code_ () { 1 } ## no critic sub _requires_ () { 2 } ## no critic #===================================================================== # Initialization: # # Subclasses should call __PACKAGE__->_init_module(\*DATA); sub _init_module { my ($class, $fh) = @_; my $function = $class->_functions; my @keys; my $routine; while (<$fh>) { if (/^%-+$/) { PostScript::File::->strip(all_comments => $routine); next unless $routine; $routine =~ m!^/(\w+)! or die "Can't find name in $routine"; push @keys, $1; $function->{$1} = [ undef, $routine ]; $routine = ''; } $routine .= $_; } # end while my $id = 'A'; $id .= 'A' while @keys > 26 ** length $id; my $re = join('|', @keys); $re = qr/\b($re)\b/; for my $name (@keys) { my $f = $function->{$name}; $$f[_id_] = $id++; my %req; $req{$_} = 1 for $$f[_code_] =~ m/$re/g; delete $req{$name}; $$f[_requires_] = [ keys %req ] if %req; } # end for each $f in @keys close $fh; 1; } # end _init_module #===================================================================== sub new { my ($class) = @_; # Create the object: bless {}, $class; } # end new #--------------------------------------------------------------------- # The hash of available functions (class attribute): # # This is automatically per-class, so subclasses normally don't need # to override it. { my %functions; sub _functions { my $self = shift; $functions{ref($self) || $self} ||= {}; } # end _functions } # end scope of %functions #--------------------------------------------------------------------- sub add { my ($self, @names) = @_; my $available = $self->_functions; while (@names) { my $name = shift @names; croak "$name is not an available function" unless $available->{$name}; $self->{$name} = 1; next unless my $need = $available->{$name}[_requires_]; push @names, grep { not $self->{$_} } @$need; } # end while @names to add return $self; } # end add #--------------------------------------------------------------------- sub generate_procset { my ($self, $name) = @_; my @list = sort { $a->[_id_] cmp $b->[_id_] } @{ $self->_functions }{ keys %$self }; my $code = join('', map { $_->[_code_] } @list); my $blkid = join('', map { $_->[_id_] } @list); unless (defined $name) { $name = ref $self; $name =~ s/::/_/g; } return wantarray ? ("$name-$blkid", $code, $self->VERSION) : $code; } # end generate_procset #--------------------------------------------------------------------- sub add_to_file { my $self = shift; my $ps = shift; $ps->add_procset( $self->generate_procset(@_) ); } # end add_to_file #===================================================================== # Package Return Value: __PACKAGE__->_init_module(\*DATA); #use YAML::Tiny; print Dump(\%function); =head1 NAME PostScript::File::Functions - Collection of useful PostScript functions =head1 VERSION This document describes version 2.20 of PostScript::File::Functions, released February 11, 2012 as part of PostScript-File version 2.20. =head1 SYNOPSIS use PostScript::File; my $ps = PostScript::File->new; $ps->use_functions(qw( setColor showCenter )); $ps->add_to_page("1 setColor\n" . "400 400 (Hello, World!) showCenter\n"); =head1 DESCRIPTION PostScript::File::Functions provides a library of handy PostScript functions that can be used in documents created with PostScript::File. You don't normally use this module directly; PostScript::File's C method loads it automatically. =head1 POSTSCRIPT FUNCTIONS =head2 boxPath LEFT TOP RIGHT BOTTOM boxPath Given the coordinates of the sides of a box, this creates a new, closed path starting at the bottom right corner, across to the bottom left, up to the top left, over to the top right, and then back to the bottom right. =head2 clipBox LEFT TOP RIGHT BOTTOM clipBox This clips to the box defined by the coordinates. =head2 drawBox LEFT TOP RIGHT BOTTOM drawBox This calls L to and then strokes the path using the current pen. =head2 fillBox LEFT TOP RIGHT BOTTOM COLOR fillBox This fills the path created by L with C, which can be anything accepted by L. =head2 hLine WIDTH X Y hline Stroke a horizontal line with the current pen with the left endpoint at position C, extending C points rightwards. =head2 setColor RGB-ARRAY|BW-NUMBER setColor This combines C and C into a single function. You can provide either an array of 3 numbers for C, or a single number for C. The L function was designed to format the parameter to this function. =head2 showCenter X Y STRING showCenter This prints C centered horizontally at position X using baseline Y and the current font. =head2 showLeft X Y STRING showLeft This prints C left justified at position X using baseline Y and the current font. =head2 showLines X Y LINES SPACING FUNC showLines This calls C for each element of C, which should be an array of strings. C is called with C on the stack, and it must pop those off. C is subtracted from C after every line. C will normally be C, C, or C. =head2 showRight X Y STRING showRight This prints C right justified at position X using baseline Y and the current font. =head2 vLine HEIGHT X Y vline Stroke a vertical line with the current pen with the bottom endpoint at position C, extending C points upwards. =head1 METHODS While you don't normally deal with PostScript::File::Functions objects directly, it is possible. The following methods are available: =head2 new $funcs = PostScript::File::Functions->new; The constructor takes no parameters. =head2 add $funcs->add('functionRequested', ...); Add one or more functions to the procset to be generated. All dependencies of the requsted functions are added automatically. See L for the list of available functions. =head2 add_to_file $funcs->add_to_file($ps, $basename); This is short for $ps->add_procset( $funcs->generate_procset($basename) ); C<$ps> should normally be a PostScript::File object. See L. =head2 generate_procset ($name, $code, $version) = $funcs->generate_procset($basename); This collects the requsted functions into a block of PostScript code. C<$name> is a suitable name for the procset, created by appending the ids of the requsted functions to C<$basename>. If C<$basename> is omitted, it defaults to the class name with C<::> replaced by C<_>. C<$code> is a block of PostScript code that defines the functions. It contains no comments or excess whitespace. C<$version> is the version number of the procset. In scalar context, returns C<$code>. =head1 DIAGNOSTICS =over =item C<< %s is not an available function >> You requsted a function that this version of PostScript::File::Functions doesn't provide. =back =head1 CONFIGURATION AND ENVIRONMENT PostScript::File::Functions requires no configuration files or environment variables. =head1 INCOMPATIBILITIES None reported. =head1 BUGS AND LIMITATIONS No bugs have been reported. =head1 AUTHOR Christopher J. Madsen S >>> Please report any bugs or feature requests to S >>> or through the web interface at L<< http://rt.cpan.org/Public/Bug/Report.html?Queue=PostScript-File >>. You can follow or contribute to PostScript-File's development at L<< http://github.com/madsen/postscript-file >>. =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2012 by Christopher J. Madsen. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =head1 DISCLAIMER OF WARRANTY BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. =cut __DATA__ %--------------------------------------------------------------------- % Set the color: RGB-ARRAY|BW-NUMBER setColor % % This combines C and C into a single function. % You can provide either an array of 3 numbers for C, or % a single number for C. The L % function was designed to format the parameter to this function. /setColor { dup type (arraytype) eq { % We have an array, so it's RGB: aload pop setrgbcolor }{ % Otherwise, it must be a gray level: setgray } ifelse } bind def %--------------------------------------------------------------------- % Create a rectangular path: LEFT TOP RIGHT BOTTOM boxPath % % Given the coordinates of the sides of a box, this creates a new, % closed path starting at the bottom right corner, across to the % bottom left, up to the top left, over to the top right, and then % back to the bottom right. /boxPath { % stack L T R B newpath 2 copy moveto % move to BR 3 index exch lineto % line to BL % stack L T R 1 index % stack L T R T 4 2 roll % stack R T L T lineto % line to TL lineto % line to TR closepath } bind def %--------------------------------------------------------------------- % Clip to a rectangle: LEFT TOP RIGHT BOTTOM clipBox % % This clips to the box defined by the coordinates. /clipBox { boxPath clip } bind def %--------------------------------------------------------------------- % Draw a rectangle: LEFT TOP RIGHT BOTTOM drawBox % % This calls L to and then strokes the path using the current % pen. /drawBox { boxPath stroke } bind def %--------------------------------------------------------------------- % Fill a box with color: LEFT TOP RIGHT BOTTOM COLOR fillBox % % This fills the path created by L with C, which can % be anything accepted by L. /fillBox { gsave setColor boxPath fill grestore } bind def %--------------------------------------------------------------------- % Print text centered at a point: X Y STRING showCenter % % This prints C centered horizontally at position X using % baseline Y and the current font. /showCenter { newpath 0 0 moveto % stack X Y STRING dup 4 1 roll % Put a copy of STRING on bottom % stack STRING X Y STRING false charpath flattenpath pathbbox % Compute bounding box of STRING % stack STRING X Y Lx Ly Ux Uy pop exch pop % Discard Y values (... Lx Ux) add 2 div neg % Compute X offset % stack STRING X Y Ox 0 % Use 0 for y offset newpath moveto rmoveto show } bind def %--------------------------------------------------------------------- % Print left justified text: X Y STRING showLeft % % This prints C left justified at position X using baseline Y % and the current font. /showLeft { newpath 3 1 roll % STRING X Y moveto show } bind def %--------------------------------------------------------------------- % Print right justified text: X Y STRING showRight % % This prints C right justified at position X using baseline Y % and the current font. /showRight { newpath 0 0 moveto % stack X Y STRING dup 4 1 roll % Put a copy of STRING on bottom % stack STRING X Y STRING false charpath flattenpath pathbbox % Compute bounding box of STRING % stack STRING X Y Lx Ly Ux Uy pop exch pop % Discard Y values (... Lx Ux) add neg % Compute X offset % stack STRING X Y Ox 0 % Use 0 for y offset newpath moveto rmoveto show } bind def %--------------------------------------------------------------------- % Print text on multiple lines: X Y LINES SPACING FUNC showLines % % This calls C for each element of C, which should be an % array of strings. C is called with C on the % stack, and it must pop those off. C is subtracted from % C after every line. C will normally be C, % C, or C. /showLines { cvx % convert name of FUNC to executable function 5 2 roll % stack SPACING FUNC X Y LINES { % stack SPACING FUNC X Y STRING 2 index % stack SPACING FUNC X Y STRING X 2 index % stack SPACING FUNC X Y STRING X Y 6 index sub % subtract SPACING from Y 5 2 roll % stack SPACING FUNC X Y' X Y STRING 5 index exec % execute FUNC; stack SPACING FUNC X Y' } forall pop pop pop pop } bind def %--------------------------------------------------------------------- % Stroke a horizontal line: WIDTH X Y hline % % Stroke a horizontal line with the current pen with the left endpoint % at position C, extending C points rightwards. /hLine { newpath moveto 0 rlineto stroke } bind def %--------------------------------------------------------------------- % Stroke a vertical line: HEIGHT X Y vline % % Stroke a vertical line with the current pen with the bottom endpoint % at position C, extending C points upwards. /vLine { newpath moveto 0 exch rlineto stroke } bind def %--------------------------------------------------------------------- %EOF libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics.pm0000644000175000017500000004413611715531042025075 0ustar gregoagregoa#--------------------------------------------------------------------- package PostScript::File::Metrics; # # Copyright 2009 Christopher J. Madsen # # Author: Christopher J. Madsen # Created: 29 Oct 2009 # # This program is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. # # 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 either the # GNU General Public License or the Artistic License for more details. # # ABSTRACT: Metrics for PostScript fonts #--------------------------------------------------------------------- use 5.008; our $VERSION = '2.11'; ## no critic # This file is part of PostScript-File 2.20 (February 11, 2012) use strict; use warnings; use Carp qw(carp croak); use Encode qw(find_encoding); use PostScript::File ':metrics_methods'; # Import some methods our (%Info, %Metrics); #===================================================================== # Generate accessor methods: BEGIN { my ($code, $error, $success) = ''; foreach my $attribute (qw( full_name family weight fixed_pitch italic_angle version )) { $code .= "sub $attribute { shift->{info}{$attribute} };\n"; } foreach my $attribute (qw( underline_position underline_thickness cap_height x_height ascender descender )) { $code .= <<"END SUB"; sub $attribute { my \$self = shift; my \$v = \$self->{info}{$attribute}; defined \$v ? \$v * \$self->{factor} : \$v; } END SUB } { local $@; $success = eval "$code ; 'OK'"; ## no critic ProhibitStringyEval $error = $@; } # end local $@ unless ($success and $success eq 'OK') { $error ||= 'eval died with false $@'; die "$code\n$error"; } } # end BEGIN #--------------------------------------------------------------------- sub font_bbox { my $self = shift; my $bbox = $self->{info}{font_bbox}; if (1 != (my $f = $self->{factor})) { [ map { $_ * $f } @$bbox ]; } else { $bbox; } } # end font_bbox #--------------------------------------------------------------------- sub auto_hyphen { shift->{auto_hyphen} } sub size { shift->{size} } #===================================================================== sub new { my ($class, $font, $size, $encoding) = @_; $encoding ||= ($font eq 'Symbol' ? 'sym' : 'std'); # Load the metrics if necessary: unless ($Metrics{$font}{$encoding}) { # First, try to load a pre-compiled package: my $package = _get_package_name($font, $encoding); ## no critic (ProhibitStringyEval) unless (do { local $@; eval "require $package; 1" } and $Metrics{$font}{$encoding}) { # No pre-compiled package, we'll have to read the AFM file: ## use critic require PostScript::File::Metrics::Loader; PostScript::File::Metrics::Loader::load($font, [$encoding]); } # end unless metrics have been pre-generated } # end unless the metrics are loaded # Create the Metrics object: my $self = bless { info => $Info{$font}, metrics => $Metrics{$font}{$encoding} || croak "Failed to load metrics for $font in encoding $encoding", }, $class; $self->{encoding} = find_encoding($encoding) or croak "Unknown encoding $encoding" unless $encoding =~ /^(?:std|sym)$/; $self->set_auto_hyphen(1); $self->set_size($size); $self->set_wrap_chars; } # end new #--------------------------------------------------------------------- sub set_size { my ($self, $size) = @_; $self->{size} = $size || 1000; $self->{factor} = ($size ? $size/1000.0 : 1); $self; } # end set_size #--------------------------------------------------------------------- sub width { my $self = shift; # $string return 0.0 unless defined $_[0] and length $_[0]; my $wx = $self->{metrics}; my $string = $_[1] ? $_[0] : $self->encode_text( $self->{auto_hyphen} ? $self->convert_hyphens($_[0]) : $_[0] ); my $width = 0; $width += $wx->[$_] for unpack("C*", $string); $width * $self->{factor}; } # end width #--------------------------------------------------------------------- sub wrap { my $self = shift; my $width = shift; my $text = shift; my %param = @_ ? %{+shift} : (); my $maxlines = delete $param{maxlines}; my $quiet = delete $param{quiet}; my $warnings = delete $param{warnings}; my $re = (exists($param{chars}) ? $self->_build_wrap_re(delete $param{chars}) : $self->{wrap_re}); carp "Unknown wrap parameter(s) @{[ keys %param ]}" if %param; # Remove CRs; convert ZWSP to CR: $text =~ s/\r//g; $text =~ s/\x{200B}/\r/g if Encode::is_utf8($text); $text = $self->encode_text( $self->{auto_hyphen} ? $self->convert_hyphens($text) : $text ); # Do word wrapping: my @lines = ''; for ($text) { if (m/\G[ \t\r]*\n/gc) { push @lines, ''; } else { m/\G($re)/g or last; my $word = $1; check_word: if ($self->width($lines[-1] . $word, 1) <= $width) { $lines[-1] .= $word; } elsif ($lines[-1] eq '') { $lines[-1] = $word; my $w = sprintf("%s is too wide (%g) for field width %g", $word, $self->width($word, 1), $width); push @$warnings, $w if $warnings; carp $w unless $quiet; } else { push @lines, ''; $word =~ s/^[ \t\r]+//; goto check_word; } } # end else not at LF if (defined $maxlines and @lines >= $maxlines) { $lines[-1] .= $1 if m/\G(.*[^ \t\r\n])/sg; if (($warnings or not $quiet) and (my $linewidth = $self->width($lines[-1], 1)) > $width) { my $w = sprintf("'%s' is too wide (%g) for field width %g", $lines[-1], $linewidth, $width); push @$warnings, $w if $warnings; carp $w unless $quiet; } # end if issuing warning about last line last; } # end if reached maximum number of lines redo; # Only the "last" statement above can exit } # end for $text # Remove any remaining CR (ZWSP) chars: s/\r//g for @lines; # Remove the last line if it's blank ($text ended with newline): pop @lines unless @lines == 1 or length $lines[-1]; if ($self->{auto_hyphen}) { # At this point, any hyphen-minus characters are unambiguously # MINUS SIGN. Protect them from further processing: map { $self->decode_text($_, 1) } @lines; } else { @lines; } } # end wrap #--------------------------------------------------------------------- sub set_wrap_chars { my $self = shift; $self->{wrap_re} = $self->_build_wrap_re(@_); $self; } # end set_wrap_chars #--------------------------------------------------------------------- our %_wrap_re_cache; sub _build_wrap_re { my ($self, $chars) = @_; if (not defined $chars) { $chars = '-/'; if ($self->{encoding}) { $chars .= "\xAD"; # Only cp1252 has en dash & em dash: $chars .= "\x{2013}\x{2014}" if $self->{encoding}->name eq 'cp1252'; } } # end if $chars not supplied (use default) $chars = $self->encode_text($chars); return $_wrap_re_cache{$chars} ||= do { if (length $chars) { $chars =~ s/(.)/ sprintf '\x%02X', ord $1 /seg; qr( [ \t\r]* (?: [^$chars \t\r\n]+ | [$chars]+ [^$chars \t\r\n]* ) [$chars]* )x; } else { qr( [ \t\r]* [^ \t\r\n]+ )x; } }; } # end _build_wrap_re #--------------------------------------------------------------------- # Return the package in which the font's metrics are stored: sub _get_package_name { my ($font, $encoding) = @_; my $package = $encoding; $package =~ s/-/_/g; $package .= " $font"; $package =~ s/\W+/::/g; "PostScript::File::Metrics::$package"; } # end _get_package_name #===================================================================== # Package Return Value: 1; __END__ =head1 NAME PostScript::File::Metrics - Metrics for PostScript fonts =head1 VERSION This document describes version 2.11 of PostScript::File::Metrics, released February 11, 2012 as part of PostScript-File version 2.20. =head1 SYNOPSIS use PostScript::File; my $ps = PostScript::File->new(reencode => 'cp1252'); my $metrics = $ps->get_metrics('Helvetica-iso', 9); my $upos = $metrics->underline_position; my $width = $metrics->width('Hello, World!'); my @lines = $metrics->wrap( 72, # wrap it into 1 inch lines 'This is a long string that will not fit on just one line of text.' ); =head1 DESCRIPTION PostScript::File::Metrics provides a subset of the metrics available from L. Its reason for existence is that it allows you to pre-compile the AFM files into Perl modules. This makes loading them more efficient, but more importantly, it means you don't have to install (or configure) Font::AFM. That's important because the locations and filenames of AFM files are not very standardized, which makes configuring Font::AFM quite difficult. PostScript::File::Metrics includes pre-compiled metrics for the 13 standard PostScript fonts: Courier Helvetica Times-Roman Courier-Bold Helvetica-Bold Times-Bold Courier-BoldOblique Helvetica-BoldOblique Times-BoldItalic Courier-Oblique Helvetica-Oblique Times-Italic Symbol If you need metrics for a font not in that list, you'll need to have Font::AFM installed and configured. (You can modify F to create additional pre-compiled modules, but you'll still have to get Font::AFM working on one system.) =head1 ATTRIBUTES All attributes are read-only, except for C and C, which can be set using the corresponding C methods. =head2 size The current font size in points. This is not an attribute of the font, but of this Metrics object. The attributes that describe the font's dimensions are adjusted according to this value. =head2 auto_hyphen If true, the C and C methods will do hyphen-minus processing as described in L, but only if the encoding is C or C. =head2 full_name Unique, human-readable name for an individual font, for instance "Times Roman". =head2 family Human-readable name for a group of fonts that are stylistic variants of a single design. All fonts that are members of such a group should have exactly the same C. Example of a family name is "Times". =head2 weight Human-readable name for the weight, or "boldness", attribute of a font. Examples are C, C, C. =head2 italic_angle Angle in degrees counterclockwise from the vertical of the dominant vertical strokes of the font. (This is normally <= 0.) =head2 fixed_pitch 1 if the font is a fixed-pitch (monospaced) font. 0 otherwise. =head2 font_bbox An arrayref of four numbers giving the lower-left x, lower-left y, upper-right x, and upper-right y of the font bounding box. The font bounding box is the smallest rectangle enclosing the shape that would result if all the characters of the font were placed with their origins coincident at (0,0), and then painted. You must not modify the returned arrayref. =head2 cap_height Usually the y-value of the top of the capital H. Some fonts, like Symbol, may not define this attribute. =head2 x_height Typically the y-value of the top of the lowercase x. Some fonts, like Symbol, may not define this attribute. =head2 ascender Typically the y-value of the top of the lowercase d. Some fonts, like Symbol, may not define this attribute. =head2 descender Typically the y-value of the bottom of the lowercase p. Some fonts, like Symbol, may not define this attribute. =head2 underline_position Recommended distance from the baseline for positioning underline strokes. This number is the y coordinate of the center of the stroke. =head2 underline_thickness Recommended stroke width for underlining. =head2 version Version number of the font. =head1 METHODS =head2 new $metrics = PostScript::File::Metrics->new($font, [$size, [$encoding]]) You would normally use L to construct a Metrics object (because it can get the C<$encoding> from the document), but it is possible to construct one directly. C<$size> is the font size in points, and defaults to 1000. C<$encoding> is the character encoding used by L and L. Valid choices are C, C, C, and C. The default is C, meaning PostScript's StandardEncoding (unless the C<$font> is Symbol, which uses C, meaning PostScript's SymbolEncoding). Neither C nor C does any character set translation. The C attribute is always set to true when character translation is enabled. =head2 set_auto_hyphen( translate ) If translate is a true value, then C and C will do automatic hyphen-minus translation as described in L. =head2 set_size $metrics->set_size($new_size) This method sets the font size (in points). This influences the attributes that concern dimensions and the string width calculations. It returns the Metrics object, so you can chain to the next method. =head2 set_wrap_chars $metrics->set_wrap_chars($new_chars) This method (introduced in version 2.11) sets the characters after which a word can be wrapped. A line can wrap after any character in C<$new_chars>, which I include whitespace. Whitespace is always a valid breakpoint. If C<$new_chars> is omitted or C, restores the default wrap characters, which means C<-/> and (if using cp1252) both en and em dashes. It returns the Metrics object, so you can chain to the next method. =head2 width $width = $metrics->width($string, [$already_encoded]) This calculates the width of C<$string> (in points) when displayed in this font at the current size. If C<$string> has the UTF8 flag set, it is translated into the font's encoding. Otherwise, the C<$string> is expected to be in the correct character set already. C<$string> should not contain newlines. If optional parameter C<$already_encoded> is true, then C<$string> is assumed to be already encoded in the document's character set. This also prevents any hyphen-minus processing. =head2 wrap @lines = $metrics->wrap($width, $text, [\%param]) This wraps C<$text> into lines of no more than C<$width> points. If C<$text> contains newlines, they will also cause line breaks. If C<$text> has the UTF8 flag set, it is translated into the font's encoding. Otherwise, the C<$text> is expected to be in the correct character set already. If the C attribute is true, then any HYPHEN-MINUS (U+002D) characters in C<$text> will be converted to either HYPHEN (U+2010) or MINUS SIGN (U+2212) in the returned strings. The characters after which a line can wrap (other than space and tab, which are always valid line breaks) can be set with the C method. In addition, C<$text> may contain ZERO WIDTH SPACE (U+200B) characters to indicate potential line breaks. All ZWSP characters and CRs will be removed from the returned strings. C<$text> may also contain NO-BREAK SPACE (U+00A0) characters, which indicate whitespace without a potential line break. The optional C<\%param> (introduced in version 2.11) allows additional control over the wrapping. It may contain the following keys: =over =item chars This overrides the line-breaking characters normally set by the C method. The value has the same meaning as for C. =item maxlines The maximum number of lines to return. The final line will contain all the remaining text, even if that exceeds C<$width> or contains newline characters. =item quiet If true, do not warn about words that are too wide to fit in the specified C<$width>. =item warnings If present, must be an arrayref. Warning messages about words that are too wide to fit in the specified C<$width> will be pushed onto the array. You should also pass S 1 >>> if you don't want the warnings printed to STDERR. =back =head1 CONFIGURATION AND ENVIRONMENT PostScript::File::Metrics requires no configuration files or environment variables. =head1 INCOMPATIBILITIES None reported. =head1 BUGS AND LIMITATIONS No bugs have been reported. =head1 AUTHOR Christopher J. Madsen S >>> Please report any bugs or feature requests to S >>> or through the web interface at L<< http://rt.cpan.org/Public/Bug/Report.html?Queue=PostScript-File >>. You can follow or contribute to PostScript-File's development at L<< http://github.com/madsen/postscript-file >>. =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2012 by Christopher J. Madsen. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =head1 DISCLAIMER OF WARRANTY BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. =cut libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/0000755000175000017500000000000011715531042024527 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/sym/0000755000175000017500000000000011715531042025337 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/sym/Symbol.pm0000644000175000017500000000337211715531042027147 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Symbol in the sym encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::sym::Symbol; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Symbol'} ||= { 'ascender' => undef, 'cap_height' => undef, 'descender' => undef, 'family' => 'Symbol', 'fixed_pitch' => 0, 'font_bbox' => [ -180, -293, 1090, 1010 ], 'full_name' => 'Symbol', 'italic_angle' => 0, 'underline_position' => -98, 'underline_thickness' => 54, 'version' => '001.007', 'weight' => 'Medium', 'x_height' => undef }; $PostScript::File::Metrics::Metrics{'Symbol'}{'sym'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 250,333,713,500,549,833,778,439,333,333,500,549,250,549,250,278, 500,500,500,500,500,500,500,500,500,500,278,278,549,549,549,444, 549,722,667,722,612,611,763,603,722,333,631,722,686,889,722,722, 768,741,556,592,611,690,439,768,645,795,611,333,863,333,658,500, 500,631,549,549,494,439,521,411,603,329,603,549,549,576,521,549, 549,521,549,603,439,576,713,686,493,686,494,480,200,480,549,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,620,247,549,167,713,500,753,753,753,753,1042,987,603,987,603, 400,549,411,549,549,713,494,460,549,549,549,549,1000,603,1000,658, 823,686,795,987,768,768,823,768,768,713,713,713,713,713,713,713, 768,713,790,790,890,823,549,250,713,603,603,1042,987,603,987,603, 494,329,790,790,786,713,384,384,384,384,384,384,494,494,494,494, 0,329,274,686,686,686,384,384,384,384,384,384,494,494,494,0, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/Loader.pm0000644000175000017500000003237411715531042026304 0ustar gregoagregoa#--------------------------------------------------------------------- package PostScript::File::Metrics::Loader; # # Copyright 2009 Christopher J. Madsen # # Author: Christopher J. Madsen # Created: 29 Oct 2009 # # This program is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. # # 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 either the # GNU General Public License or the Artistic License for more details. # # ABSTRACT: Load metrics for PostScript fonts using Font::AFM #--------------------------------------------------------------------- use 5.008; our $VERSION = '2.20'; ## no critic # This file is part of PostScript-File 2.20 (February 11, 2012) use strict; use warnings; use Carp 'confess'; # RECOMMEND PREREQ: Font::AFM use Font::AFM; use PostScript::File 2.00 (); our %attribute = qw( FullName full_name FamilyName family Weight weight IsFixedPitch fixed_pitch ItalicAngle italic_angle FontBBox font_bbox UnderlinePosition underline_position UnderlineThickness underline_thickness Version version CapHeight cap_height XHeight x_height Ascender ascender Descender descender ); our @numeric_attributes = qw( ascender cap_height descender italic_angle underline_position underline_thickness x_height ); our @StandardEncoding = qw( .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef space exclam quotedbl numbersign dollar percent ampersand quoteright parenleft parenright asterisk plus comma hyphen period slash zero one two three four five six seven eight nine colon semicolon less equal greater question at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z bracketleft backslash bracketright asciicircum underscore quoteleft a b c d e f g h i j k l m n o p q r s t u v w x y z braceleft bar braceright asciitilde .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef exclamdown cent sterling fraction yen florin section currency quotesingle quotedblleft guillemotleft guilsinglleft guilsinglright fi fl .notdef endash dagger daggerdbl periodcentered .notdef paragraph bullet quotesinglbase quotedblbase quotedblright guillemotright ellipsis perthousand .notdef questiondown .notdef grave acute circumflex tilde macron breve dotaccent dieresis .notdef ring cedilla .notdef hungarumlaut ogonek caron emdash .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef AE .notdef ordfeminine .notdef .notdef .notdef .notdef Lslash Oslash OE ordmasculine .notdef .notdef .notdef .notdef .notdef ae .notdef .notdef .notdef dotlessi .notdef .notdef lslash oslash oe germandbls .notdef .notdef .notdef .notdef ); our @SymbolEncoding = ( ('.notdef') x 32, # \040 qw(space exclam universal numbersign existential percent ampersand suchthat parenleft parenright asteriskmath plus comma minus period slash zero one two three four five six seven eight nine colon semicolon less equal greater question), # \100 qw(congruent Alpha Beta Chi Delta Epsilon Phi Gamma Eta Iota theta1 Kappa Lambda Mu Nu Omicron Pi Theta Rho Sigma Tau Upsilon sigma1 Omega Xi Psi Zeta bracketleft therefore bracketright perpendicular underscore), # \140 qw(radicalex alpha beta chi delta epsilon phi gamma eta iota phi1 kappa lambda mu nu omicron pi theta rho sigma tau upsilon omega1 omega xi psi zeta braceleft bar braceright similar .notdef), # \200 ('.notdef') x 32, # \240 qw(Euro Upsilon1 minute lessequal fraction infinity florin club diamond heart spade arrowboth arrowleft arrowup arrowright arrowdown degree plusminus second greaterequal multiply proportional partialdiff bullet divide notequal equivalence approxequal ellipsis arrowvertex arrowhorizex carriagereturn), # \300 qw(aleph Ifraktur Rfraktur weierstrass circlemultiply circleplus emptyset intersection union propersuperset reflexsuperset notsubset propersubset reflexsubset element notelement angle gradient registerserif copyrightserif trademarkserif product radical dotmath logicalnot logicaland logicalor arrowdblboth arrowdblleft arrowdblup arrowdblright arrowdbldown), # \340 qw(lozenge angleleft registersans copyrightsans trademarksans summation parenlefttp parenleftex parenleftbt bracketlefttp bracketleftex bracketleftbt bracelefttp braceleftmid braceleftbt braceex .notdef angleright integral integraltp integralex integralbt parenrighttp parenrightex parenrightbt bracketrighttp bracketrightex bracketrightbt bracerighttp bracerightmid bracerightbt .notdef), ); #===================================================================== sub load { my ($font, $encodings) = @_; my $afm = Font::AFM->new($font); # Process the encoding-independent font attributes: unless ($PostScript::File::Metrics::Info{$font}) { my %info; while (my ($method, $key) = each %attribute) { # Font::AFM croaks instead of returning undef: $info{$key} = do { local $@; eval { $afm->$method } }; } # Ensure Data::Dumper will dump numbers as such: for (@numeric_attributes) { $info{$_} += 0 if defined $info{$_}; } # Convert attributes to be more "Perlish": $info{fixed_pitch} = ($info{fixed_pitch} eq 'true' ? 1 : 0); $info{font_bbox} = [ map { $_ + 0 } split ' ', $info{font_bbox} ]; $PostScript::File::Metrics::Info{$font} = \%info; } # end unless info has been loaded # Create a width table for each requested encoding: my $wxHash = $afm->Wx; foreach my $encoding (@$encodings) { next if $PostScript::File::Metrics::Metrics{$font}{$encoding}; my $vector = get_encoding_vector($encoding); my @wx; for (0..255) { my $name = $vector->[$_]; if (exists $wxHash->{$name}) { push @wx, $wxHash->{$name} + 0; } else { push @wx, $wxHash->{'.notdef'} + 0; } } # end for 0..255 $PostScript::File::Metrics::Metrics{$font}{$encoding} = \@wx; } # end foreach $encoding } # end load #--------------------------------------------------------------------- sub get_encoding_vector { my ($encoding) = @_; return \@StandardEncoding if $encoding eq 'std'; return \@SymbolEncoding if $encoding eq 'sym'; my $name = $PostScript::File::encoding_name{$encoding} or confess "Unknown encoding $encoding"; $PostScript::File::encoding_def{$name} =~ /\bSTARTDIFFENC\b(.+)\bENDDIFFENC\b/s or confess "Can't find definition for $encoding"; my $def = $1; $def =~ s/%.*//g; # Strip comments my @vec = @StandardEncoding; my $i = 0; while ($def =~ /(\S+)/g) { my $term = $1; if ($term =~ m!^/(.+)!) { $vec[$i++] = $1; } elsif ($term =~ /^\d+$/) { $i = $term; } else { confess "Invalid term $term in $name"; } } return \@vec; } # end get_encoding_vector #===================================================================== # Package Return Value: 1; __END__ =head1 NAME PostScript::File::Metrics::Loader - Load metrics for PostScript fonts using Font::AFM =head1 VERSION This document describes version 2.20 of PostScript::File::Metrics::Loader, released February 11, 2012 as part of PostScript-File version 2.20. =head1 DESCRIPTION PostScript::File::Metrics::Loader is used by L when no pre-compiled metrics are available for the requested font or encoding. It uses Font::AFM to read the AFM file and extract metrics from it. You should not normally need to use this module, since pre-compiled metrics for the standard PostScript fonts are included with this distribution. If you request metrics for a non-standard font, PostScript::File::Metrics will load this module automatically. If you need metrics for additional fonts, you may want to modify and run F to create pre-compiled modules for them. =head1 SUBROUTINES =head2 get_encoding_vector PostScript::File::Metrics::Loader::get_encoding_vector($encoding) This returns the encoding vector for C<$encoding>, an arrayref of 256 glyph names. =head2 load PostScript::File::Metrics::Loader::load($font, \@encodings) This uses Font::AFM to read the metrics for C<$font>, and creates width tables for each of the C<@encodings>. The metrics are stored into the hashes used internally by PostScript::File::Metrics. =head1 DIAGNOSTICS =over =item C<< Can't find definition for %s >> If this happens, it indicates you found a bug in PostScript::File::Metrics::Loader. Please report it as described under L. =item C<< Can't find the AFM file for %s >> Font::AFM could not find F<%s.afm> in any of the directories it searched. See L. =item C<< Invalid term %s in %s >> This also indicates a bug in PostScript::File. Please report it. =item C<< Unknown encoding %s >> You asked for an encoding that PostScript::File::Metrics doesn't know about. =back =head1 CONFIGURATION AND ENVIRONMENT PostScript::File::Metrics::Loader requires no configuration files or environment variables. However, it uses L, and unfortunately that's difficult to configure properly (which is why I created PostScript::File::Metrics in the first place). Font::AFM expects to find a file named F in one of the directories it searches. I wound up creating symlinks in F (which is one of the default paths that Font::AFM searches if you don't have a C environment variable): Courier.afm -> /usr/share/texmf-dist/fonts/afm/adobe/courier/pcrr8a.afm Courier-Bold.afm -> /usr/share/texmf-dist/fonts/afm/adobe/courier/pcrb8a.afm Courier-BoldOblique.afm -> /usr/share/texmf-dist/fonts/afm/adobe/courier/pcrbo8a.afm Courier-Oblique.afm -> /usr/share/texmf-dist/fonts/afm/adobe/courier/pcrro8a.afm Helvetica.afm -> /usr/share/texmf-dist/fonts/afm/adobe/helvetic/phvr8a.afm Helvetica-Bold.afm -> /usr/share/texmf-dist/fonts/afm/adobe/helvetic/phvb8a.afm Helvetica-BoldOblique.afm -> /usr/share/texmf-dist/fonts/afm/adobe/helvetic/phvbo8a.afm Helvetica-Oblique.afm -> /usr/share/texmf-dist/fonts/afm/adobe/helvetic/phvro8a.afm Symbol.afm -> /usr/share/texmf-dist/fonts/afm/adobe/symbol/psyr.afm Times-Bold.afm -> /usr/share/texmf-dist/fonts/afm/adobe/times/ptmb8a.afm Times-BoldItalic.afm -> /usr/share/texmf-dist/fonts/afm/adobe/times/ptmbi8a.afm Times-Italic.afm -> /usr/share/texmf-dist/fonts/afm/adobe/times/ptmri8a.afm Times-Roman.afm -> /usr/share/texmf-dist/fonts/afm/adobe/times/ptmr8a.afm Paths on your system may vary. I suggest searching for C<.afm> files, and then grepping them for "FontName X", where X is the font you need metrics for. =head1 INCOMPATIBILITIES None reported. =head1 BUGS AND LIMITATIONS No bugs have been reported. =head1 AUTHOR Christopher J. Madsen S >>> Please report any bugs or feature requests to S >>> or through the web interface at L<< http://rt.cpan.org/Public/Bug/Report.html?Queue=PostScript-File >>. You can follow or contribute to PostScript-File's development at L<< http://github.com/madsen/postscript-file >>. =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2012 by Christopher J. Madsen. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =head1 DISCLAIMER OF WARRANTY BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. =cut libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/std/0000755000175000017500000000000011715531042025321 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/std/Helvetica.pm0000644000175000017500000000327111715531042027566 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Helvetica in the std encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::std::Helvetica; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Helvetica'} ||= { 'ascender' => 718, 'cap_height' => 718, 'descender' => -207, 'family' => 'Helvetica', 'fixed_pitch' => 0, 'font_bbox' => [ -166, -225, 1000, 931 ], 'full_name' => 'Helvetica', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.006', 'weight' => 'Medium', 'x_height' => 523 }; $PostScript::File::Metrics::Metrics{'Helvetica'}{'std'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 278,278,355,556,556,889,667,222,333,333,389,584,278,333,278,278, 556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556, 1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778, 667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556, 222,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556, 556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,333,556,556,167,556,556,556,556,191,333,556,333,333,500,500, 0,556,556,556,278,0,537,350,222,333,333,556,1000,1000,0,611, 0,333,333,333,333,333,333,333,333,0,333,333,0,333,333,333, 1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1000,0,370,0,0,0,0,556,778,1000,365,0,0,0,0, 0,889,0,0,0,278,0,0,222,611,944,611,0,0,0,0, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/std/Courier.pm0000644000175000017500000000324511715531042027273 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Courier in the std encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::std::Courier; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Courier'} ||= { 'ascender' => 629, 'cap_height' => 562, 'descender' => -157, 'family' => 'Courier', 'fixed_pitch' => 1, 'font_bbox' => [ -28, -250, 628, 805 ], 'full_name' => 'Courier', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '002.004', 'weight' => 'Medium', 'x_height' => 426 }; $PostScript::File::Metrics::Metrics{'Courier'}{'std'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 0,600,600,600,600,0,600,600,600,600,600,600,600,600,0,600, 0,600,600,600,600,600,600,600,600,0,600,600,0,600,600,600, 600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,600,0,600,0,0,0,0,600,600,600,600,0,0,0,0, 0,600,0,0,0,600,0,0,600,600,600,600,0,0,0,0, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/std/Times/0000755000175000017500000000000011715531042026402 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/std/Times/Bold.pm0000644000175000017500000000327211715531042027624 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Times-Bold in the std encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::std::Times::Bold; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Times-Bold'} ||= { 'ascender' => 676, 'cap_height' => 676, 'descender' => -205, 'family' => 'Times', 'fixed_pitch' => 0, 'font_bbox' => [ -168, -218, 1000, 935 ], 'full_name' => 'Times Bold', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.007', 'weight' => 'Bold', 'x_height' => 461 }; $PostScript::File::Metrics::Metrics{'Times-Bold'}{'std'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 250,333,555,500,500,1000,833,333,333,333,500,570,250,333,250,278, 500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500, 930,722,667,722,722,667,611,778,778,389,500,778,667,944,722,778, 611,778,722,556,667,722,722,1000,722,722,667,333,278,333,581,500, 333,500,556,444,556,444,333,500,556,278,333,556,278,833,556,500, 556,556,444,389,333,556,500,722,500,500,444,394,220,394,520,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,333,500,500,167,500,500,500,500,278,500,500,333,333,556,556, 0,500,500,500,250,0,540,350,333,500,500,500,1000,1000,0,500, 0,333,333,333,333,333,333,333,333,0,333,333,0,333,333,333, 1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1000,0,300,0,0,0,0,667,778,1000,330,0,0,0,0, 0,722,0,0,0,278,0,0,278,500,722,556,0,0,0,0, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/std/Times/Italic.pm0000644000175000017500000000330611715531042030147 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Times-Italic in the std encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::std::Times::Italic; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Times-Italic'} ||= { 'ascender' => 683, 'cap_height' => 653, 'descender' => -205, 'family' => 'Times', 'fixed_pitch' => 0, 'font_bbox' => [ -169, -217, 1010, 883 ], 'full_name' => 'Times Italic', 'italic_angle' => '-15.5', 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.007', 'weight' => 'Medium', 'x_height' => 441 }; $PostScript::File::Metrics::Metrics{'Times-Italic'}{'std'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 250,333,420,500,500,833,778,333,333,333,500,675,250,333,250,278, 500,500,500,500,500,500,500,500,500,500,333,333,675,675,675,500, 920,611,611,667,722,611,611,722,722,333,444,667,556,833,667,722, 611,722,611,500,556,722,611,833,611,556,556,389,278,389,422,500, 333,500,500,444,500,444,278,500,500,278,278,444,278,722,500,500, 500,500,389,389,278,500,444,667,444,444,389,400,275,400,541,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,389,500,500,167,500,500,500,500,214,556,500,333,333,500,500, 0,500,500,500,250,0,523,350,333,556,556,500,889,1000,0,500, 0,333,333,333,333,333,333,333,333,0,333,333,0,333,333,333, 889,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,889,0,276,0,0,0,0,556,722,944,310,0,0,0,0, 0,667,0,0,0,278,0,0,278,500,667,500,0,0,0,0, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/std/Times/Roman.pm0000644000175000017500000000327411715531042030022 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Times-Roman in the std encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::std::Times::Roman; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Times-Roman'} ||= { 'ascender' => 683, 'cap_height' => 662, 'descender' => -217, 'family' => 'Times', 'fixed_pitch' => 0, 'font_bbox' => [ -168, -218, 1000, 898 ], 'full_name' => 'Times Roman', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.007', 'weight' => 'Roman', 'x_height' => 450 }; $PostScript::File::Metrics::Metrics{'Times-Roman'}{'std'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 250,333,408,500,500,833,778,333,333,333,500,564,250,333,250,278, 500,500,500,500,500,500,500,500,500,500,278,278,564,564,564,444, 921,722,667,667,722,611,556,722,722,333,389,722,611,889,722,722, 556,722,667,556,611,722,722,944,722,722,611,333,278,333,469,500, 333,444,500,444,500,444,333,500,500,278,278,500,278,778,500,500, 500,500,333,389,278,500,500,722,500,500,444,480,200,480,541,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,333,500,500,167,500,500,500,500,180,444,500,333,333,556,556, 0,500,500,500,250,0,453,350,333,444,444,500,1000,1000,0,444, 0,333,333,333,333,333,333,333,333,0,333,333,0,333,333,333, 1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,889,0,276,0,0,0,0,611,722,889,310,0,0,0,0, 0,667,0,0,0,278,0,0,278,500,722,500,0,0,0,0, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/std/Times/BoldItalic.pm0000644000175000017500000000332611715531042030752 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Times-BoldItalic in the std encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::std::Times::BoldItalic; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Times-BoldItalic'} ||= { 'ascender' => 699, 'cap_height' => 669, 'descender' => -205, 'family' => 'Times', 'fixed_pitch' => 0, 'font_bbox' => [ -200, -218, 996, 921 ], 'full_name' => 'Times Bold Italic', 'italic_angle' => -15, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.009', 'weight' => 'Bold', 'x_height' => 462 }; $PostScript::File::Metrics::Metrics{'Times-BoldItalic'}{'std'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 250,389,555,500,500,833,778,333,333,333,500,570,250,333,250,278, 500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500, 832,667,667,667,722,667,667,722,778,389,500,667,611,889,722,722, 611,722,667,556,611,722,667,889,667,611,611,333,278,333,570,500, 333,500,500,444,500,444,333,500,556,278,278,500,278,778,556,500, 500,500,389,389,278,556,444,667,500,444,389,348,220,348,570,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,389,500,500,167,500,500,500,500,278,500,500,333,333,556,556, 0,500,500,500,250,0,500,350,333,500,500,500,1000,1000,0,500, 0,333,333,333,333,333,333,333,333,0,333,333,0,333,333,333, 1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,944,0,266,0,0,0,0,611,722,944,300,0,0,0,0, 0,722,0,0,0,278,0,0,278,500,722,500,0,0,0,0, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/std/Helvetica/0000755000175000017500000000000011715531042027225 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/std/Helvetica/Bold.pm0000644000175000017500000000332011715531042030441 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Helvetica-Bold in the std encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::std::Helvetica::Bold; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Helvetica-Bold'} ||= { 'ascender' => 718, 'cap_height' => 718, 'descender' => -207, 'family' => 'Helvetica', 'fixed_pitch' => 0, 'font_bbox' => [ -170, -228, 1003, 962 ], 'full_name' => 'Helvetica Bold', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.007', 'weight' => 'Bold', 'x_height' => 532 }; $PostScript::File::Metrics::Metrics{'Helvetica-Bold'}{'std'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 278,333,474,556,556,889,722,278,333,333,389,584,278,333,278,278, 556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611, 975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778, 667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556, 278,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611, 611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,333,556,556,167,556,556,556,556,238,500,556,333,333,611,611, 0,556,556,556,278,0,556,350,278,500,500,556,1000,1000,0,611, 0,333,333,333,333,333,333,333,333,0,333,333,0,333,333,333, 1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1000,0,370,0,0,0,0,611,778,1000,365,0,0,0,0, 0,889,0,0,0,278,0,0,278,611,944,611,0,0,0,0, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/std/Helvetica/BoldOblique.pm0000644000175000017500000000336611715531042031774 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Helvetica-BoldOblique in the std encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::std::Helvetica::BoldOblique; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Helvetica-BoldOblique'} ||= { 'ascender' => 718, 'cap_height' => 718, 'descender' => -207, 'family' => 'Helvetica', 'fixed_pitch' => 0, 'font_bbox' => [ -174, -228, 1114, 962 ], 'full_name' => 'Helvetica Bold Oblique', 'italic_angle' => -12, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.007', 'weight' => 'Bold', 'x_height' => 532 }; $PostScript::File::Metrics::Metrics{'Helvetica-BoldOblique'}{'std'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 278,333,474,556,556,889,722,278,333,333,389,584,278,333,278,278, 556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611, 975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778, 667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556, 278,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611, 611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,333,556,556,167,556,556,556,556,238,500,556,333,333,611,611, 0,556,556,556,278,0,556,350,278,500,500,556,1000,1000,0,611, 0,333,333,333,333,333,333,333,333,0,333,333,0,333,333,333, 1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1000,0,370,0,0,0,0,611,778,1000,365,0,0,0,0, 0,889,0,0,0,278,0,0,278,611,944,611,0,0,0,0, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/std/Helvetica/Oblique.pm0000644000175000017500000000334411715531042031167 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Helvetica-Oblique in the std encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::std::Helvetica::Oblique; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Helvetica-Oblique'} ||= { 'ascender' => 718, 'cap_height' => 718, 'descender' => -207, 'family' => 'Helvetica', 'fixed_pitch' => 0, 'font_bbox' => [ -170, -225, 1116, 931 ], 'full_name' => 'Helvetica Oblique', 'italic_angle' => -12, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.006', 'weight' => 'Medium', 'x_height' => 523 }; $PostScript::File::Metrics::Metrics{'Helvetica-Oblique'}{'std'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 278,278,355,556,556,889,667,222,333,333,389,584,278,333,278,278, 556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556, 1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778, 667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556, 222,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556, 556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,333,556,556,167,556,556,556,556,191,333,556,333,333,500,500, 0,556,556,556,278,0,537,350,222,333,333,556,1000,1000,0,611, 0,333,333,333,333,333,333,333,333,0,333,333,0,333,333,333, 1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1000,0,370,0,0,0,0,556,778,1000,365,0,0,0,0, 0,889,0,0,0,278,0,0,222,611,944,611,0,0,0,0, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/std/Courier/0000755000175000017500000000000011715531042026731 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/std/Courier/Bold.pm0000644000175000017500000000327611715531042030157 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Courier-Bold in the std encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::std::Courier::Bold; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Courier-Bold'} ||= { 'ascender' => 626, 'cap_height' => 562, 'descender' => -142, 'family' => 'Courier', 'fixed_pitch' => 1, 'font_bbox' => [ -113, -250, 749, 801 ], 'full_name' => 'Courier Bold', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '002.004', 'weight' => 'Bold', 'x_height' => 439 }; $PostScript::File::Metrics::Metrics{'Courier-Bold'}{'std'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 0,600,600,600,600,0,600,600,600,600,600,600,600,600,0,600, 0,600,600,600,600,600,600,600,600,0,600,600,0,600,600,600, 600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,600,0,600,0,0,0,0,600,600,600,600,0,0,0,0, 0,600,0,0,0,600,0,0,600,600,600,600,0,0,0,0, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/std/Courier/BoldOblique.pm0000644000175000017500000000334311715531042031473 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Courier-BoldOblique in the std encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::std::Courier::BoldOblique; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Courier-BoldOblique'} ||= { 'ascender' => 626, 'cap_height' => 562, 'descender' => -142, 'family' => 'Courier', 'fixed_pitch' => 1, 'font_bbox' => [ -56, -250, 868, 801 ], 'full_name' => 'Courier Bold Oblique', 'italic_angle' => -12, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '002.004', 'weight' => 'Bold', 'x_height' => 439 }; $PostScript::File::Metrics::Metrics{'Courier-BoldOblique'}{'std'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 0,600,600,600,600,0,600,600,600,600,600,600,600,600,0,600, 0,600,600,600,600,600,600,600,600,0,600,600,0,600,600,600, 600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,600,0,600,0,0,0,0,600,600,600,600,0,0,0,0, 0,600,0,0,0,600,0,0,600,600,600,600,0,0,0,0, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/std/Courier/Oblique.pm0000644000175000017500000000332011715531042030665 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Courier-Oblique in the std encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::std::Courier::Oblique; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Courier-Oblique'} ||= { 'ascender' => 629, 'cap_height' => 562, 'descender' => -157, 'family' => 'Courier', 'fixed_pitch' => 1, 'font_bbox' => [ -28, -250, 742, 805 ], 'full_name' => 'Courier Oblique', 'italic_angle' => -12, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '002.004', 'weight' => 'Medium', 'x_height' => 426 }; $PostScript::File::Metrics::Metrics{'Courier-Oblique'}{'std'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 0,600,600,600,600,0,600,600,600,600,600,600,600,600,0,600, 0,600,600,600,600,600,600,600,600,0,600,600,0,600,600,600, 600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,600,0,600,0,0,0,0,600,600,600,600,0,0,0,0, 0,600,0,0,0,600,0,0,600,600,600,600,0,0,0,0, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/iso_8859_1/0000755000175000017500000000000011715531042026236 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/iso_8859_1/Helvetica.pm0000644000175000017500000000347211715531042030506 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Helvetica in the iso-8859-1 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::iso_8859_1::Helvetica; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Helvetica'} ||= { 'ascender' => 718, 'cap_height' => 718, 'descender' => -207, 'family' => 'Helvetica', 'fixed_pitch' => 0, 'font_bbox' => [ -166, -225, 1000, 931 ], 'full_name' => 'Helvetica', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.006', 'weight' => 'Medium', 'x_height' => 523 }; $PostScript::File::Metrics::Metrics{'Helvetica'}{'iso-8859-1'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 278,278,355,556,556,889,667,222,333,333,389,584,278,584,278,278, 556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556, 1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778, 667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556, 222,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556, 556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 278,333,333,333,333,333,333,333,333,0,333,333,0,333,333,333, 278,333,556,556,556,556,260,556,333,737,370,556,584,333,737,333, 400,584,333,333,333,556,537,278,333,333,365,556,834,834,834,611, 667,667,667,667,667,667,1000,722,667,667,667,667,278,278,278,278, 722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611, 556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278, 556,556,556,556,556,556,556,584,611,556,556,556,556,500,556,500, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/iso_8859_1/Courier.pm0000644000175000017500000000345211715531042030210 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Courier in the iso-8859-1 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::iso_8859_1::Courier; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Courier'} ||= { 'ascender' => 629, 'cap_height' => 562, 'descender' => -157, 'family' => 'Courier', 'fixed_pitch' => 1, 'font_bbox' => [ -28, -250, 628, 805 ], 'full_name' => 'Courier', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '002.004', 'weight' => 'Medium', 'x_height' => 426 }; $PostScript::File::Metrics::Metrics{'Courier'}{'iso-8859-1'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 600,600,600,600,600,600,600,600,600,0,600,600,0,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/iso_8859_1/Times/0000755000175000017500000000000011715531042027317 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/iso_8859_1/Times/Bold.pm0000644000175000017500000000347311715531042030544 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Times-Bold in the iso-8859-1 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::iso_8859_1::Times::Bold; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Times-Bold'} ||= { 'ascender' => 676, 'cap_height' => 676, 'descender' => -205, 'family' => 'Times', 'fixed_pitch' => 0, 'font_bbox' => [ -168, -218, 1000, 935 ], 'full_name' => 'Times Bold', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.007', 'weight' => 'Bold', 'x_height' => 461 }; $PostScript::File::Metrics::Metrics{'Times-Bold'}{'iso-8859-1'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 250,333,555,500,500,1000,833,333,333,333,500,570,250,570,250,278, 500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500, 930,722,667,722,722,667,611,778,778,389,500,778,667,944,722,778, 611,778,722,556,667,722,722,1000,722,722,667,333,278,333,581,500, 333,500,556,444,556,444,333,500,556,278,333,556,278,833,556,500, 556,556,444,389,333,556,500,722,500,500,444,394,220,394,520,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 278,333,333,333,333,333,333,333,333,0,333,333,0,333,333,333, 250,333,500,500,500,500,220,500,333,747,300,500,570,333,747,333, 400,570,300,300,333,556,540,250,333,300,330,500,750,750,750,500, 722,722,722,722,722,722,1000,722,667,667,667,667,389,389,389,389, 722,722,778,778,778,778,778,570,778,722,722,722,722,722,611,556, 500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278, 500,556,500,500,500,500,500,570,500,556,556,556,556,500,556,500, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/iso_8859_1/Times/Italic.pm0000644000175000017500000000351211715531042031063 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Times-Italic in the iso-8859-1 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::iso_8859_1::Times::Italic; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Times-Italic'} ||= { 'ascender' => 683, 'cap_height' => 653, 'descender' => -205, 'family' => 'Times', 'fixed_pitch' => 0, 'font_bbox' => [ -169, -217, 1010, 883 ], 'full_name' => 'Times Italic', 'italic_angle' => '-15.5', 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.007', 'weight' => 'Medium', 'x_height' => 441 }; $PostScript::File::Metrics::Metrics{'Times-Italic'}{'iso-8859-1'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 250,333,420,500,500,833,778,333,333,333,500,675,250,675,250,278, 500,500,500,500,500,500,500,500,500,500,333,333,675,675,675,500, 920,611,611,667,722,611,611,722,722,333,444,667,556,833,667,722, 611,722,611,500,556,722,611,833,611,556,556,389,278,389,422,500, 333,500,500,444,500,444,278,500,500,278,278,444,278,722,500,500, 500,500,389,389,278,500,444,667,444,444,389,400,275,400,541,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 278,333,333,333,333,333,333,333,333,0,333,333,0,333,333,333, 250,389,500,500,500,500,275,500,333,760,276,500,675,333,760,333, 400,675,300,300,333,500,523,250,333,300,310,500,750,750,750,500, 611,611,611,611,611,611,889,667,611,611,611,611,333,333,333,333, 722,667,722,722,722,722,722,675,722,722,722,722,722,556,611,500, 500,500,500,500,500,500,667,444,444,444,444,444,278,278,278,278, 500,500,500,500,500,500,500,675,500,500,500,500,500,444,500,444, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/iso_8859_1/Times/Roman.pm0000644000175000017500000000347611715531042030743 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Times-Roman in the iso-8859-1 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::iso_8859_1::Times::Roman; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Times-Roman'} ||= { 'ascender' => 683, 'cap_height' => 662, 'descender' => -217, 'family' => 'Times', 'fixed_pitch' => 0, 'font_bbox' => [ -168, -218, 1000, 898 ], 'full_name' => 'Times Roman', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.007', 'weight' => 'Roman', 'x_height' => 450 }; $PostScript::File::Metrics::Metrics{'Times-Roman'}{'iso-8859-1'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 250,333,408,500,500,833,778,333,333,333,500,564,250,564,250,278, 500,500,500,500,500,500,500,500,500,500,278,278,564,564,564,444, 921,722,667,667,722,611,556,722,722,333,389,722,611,889,722,722, 556,722,667,556,611,722,722,944,722,722,611,333,278,333,469,500, 333,444,500,444,500,444,333,500,500,278,278,500,278,778,500,500, 500,500,333,389,278,500,500,722,500,500,444,480,200,480,541,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 278,333,333,333,333,333,333,333,333,0,333,333,0,333,333,333, 250,333,500,500,500,500,200,500,333,760,276,500,564,333,760,333, 400,564,300,300,333,500,453,250,333,300,310,500,750,750,750,444, 722,722,722,722,722,722,889,667,611,611,611,611,333,333,333,333, 722,722,722,722,722,722,722,564,722,722,722,722,722,722,556,500, 444,444,444,444,444,444,667,444,444,444,444,444,278,278,278,278, 500,500,500,500,500,500,500,564,500,500,500,500,500,500,500,500, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/iso_8859_1/Times/BoldItalic.pm0000644000175000017500000000353011715531042031664 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Times-BoldItalic in the iso-8859-1 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::iso_8859_1::Times::BoldItalic; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Times-BoldItalic'} ||= { 'ascender' => 699, 'cap_height' => 669, 'descender' => -205, 'family' => 'Times', 'fixed_pitch' => 0, 'font_bbox' => [ -200, -218, 996, 921 ], 'full_name' => 'Times Bold Italic', 'italic_angle' => -15, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.009', 'weight' => 'Bold', 'x_height' => 462 }; $PostScript::File::Metrics::Metrics{'Times-BoldItalic'}{'iso-8859-1'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 250,389,555,500,500,833,778,333,333,333,500,570,250,606,250,278, 500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500, 832,667,667,667,722,667,667,722,778,389,500,667,611,889,722,722, 611,722,667,556,611,722,667,889,667,611,611,333,278,333,570,500, 333,500,500,444,500,444,333,500,556,278,278,500,278,778,556,500, 500,500,389,389,278,556,444,667,500,444,389,348,220,348,570,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 278,333,333,333,333,333,333,333,333,0,333,333,0,333,333,333, 250,389,500,500,500,500,220,500,333,747,266,500,606,333,747,333, 400,570,300,300,333,576,500,250,333,300,300,500,750,750,750,500, 667,667,667,667,667,667,944,667,667,667,667,667,389,389,389,389, 722,722,722,722,722,722,722,570,722,722,722,722,722,611,611,500, 500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278, 500,556,500,500,500,500,500,570,500,556,556,556,556,444,500,444, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/iso_8859_1/Helvetica/0000755000175000017500000000000011715531042030142 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/iso_8859_1/Helvetica/Bold.pm0000644000175000017500000000352111715531042031361 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Helvetica-Bold in the iso-8859-1 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::iso_8859_1::Helvetica::Bold; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Helvetica-Bold'} ||= { 'ascender' => 718, 'cap_height' => 718, 'descender' => -207, 'family' => 'Helvetica', 'fixed_pitch' => 0, 'font_bbox' => [ -170, -228, 1003, 962 ], 'full_name' => 'Helvetica Bold', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.007', 'weight' => 'Bold', 'x_height' => 532 }; $PostScript::File::Metrics::Metrics{'Helvetica-Bold'}{'iso-8859-1'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 278,333,474,556,556,889,722,278,333,333,389,584,278,584,278,278, 556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611, 975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778, 667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556, 278,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611, 611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 278,333,333,333,333,333,333,333,333,0,333,333,0,333,333,333, 278,333,556,556,556,556,280,556,333,737,370,556,584,333,737,333, 400,584,333,333,333,611,556,278,333,333,365,556,834,834,834,611, 722,722,722,722,722,722,1000,722,667,667,667,667,278,278,278,278, 722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611, 556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278, 611,611,611,611,611,611,611,584,611,611,611,611,611,556,611,556, ]; __END__ ././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/iso_8859_1/Helvetica/BoldOblique.pmlibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/iso_8859_1/Helvetica/BoldOblique.0000644000175000017500000000356711715531042032357 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Helvetica-BoldOblique in the iso-8859-1 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::iso_8859_1::Helvetica::BoldOblique; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Helvetica-BoldOblique'} ||= { 'ascender' => 718, 'cap_height' => 718, 'descender' => -207, 'family' => 'Helvetica', 'fixed_pitch' => 0, 'font_bbox' => [ -174, -228, 1114, 962 ], 'full_name' => 'Helvetica Bold Oblique', 'italic_angle' => -12, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.007', 'weight' => 'Bold', 'x_height' => 532 }; $PostScript::File::Metrics::Metrics{'Helvetica-BoldOblique'}{'iso-8859-1'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 278,333,474,556,556,889,722,278,333,333,389,584,278,584,278,278, 556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611, 975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778, 667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556, 278,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611, 611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 278,333,333,333,333,333,333,333,333,0,333,333,0,333,333,333, 278,333,556,556,556,556,280,556,333,737,370,556,584,333,737,333, 400,584,333,333,333,611,556,278,333,333,365,556,834,834,834,611, 722,722,722,722,722,722,1000,722,667,667,667,667,278,278,278,278, 722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611, 556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278, 611,611,611,611,611,611,611,584,611,611,611,611,611,556,611,556, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/iso_8859_1/Helvetica/Oblique.pm0000644000175000017500000000354511715531042032107 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Helvetica-Oblique in the iso-8859-1 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::iso_8859_1::Helvetica::Oblique; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Helvetica-Oblique'} ||= { 'ascender' => 718, 'cap_height' => 718, 'descender' => -207, 'family' => 'Helvetica', 'fixed_pitch' => 0, 'font_bbox' => [ -170, -225, 1116, 931 ], 'full_name' => 'Helvetica Oblique', 'italic_angle' => -12, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.006', 'weight' => 'Medium', 'x_height' => 523 }; $PostScript::File::Metrics::Metrics{'Helvetica-Oblique'}{'iso-8859-1'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 278,278,355,556,556,889,667,222,333,333,389,584,278,584,278,278, 556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556, 1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778, 667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556, 222,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556, 556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 278,333,333,333,333,333,333,333,333,0,333,333,0,333,333,333, 278,333,556,556,556,556,260,556,333,737,370,556,584,333,737,333, 400,584,333,333,333,556,537,278,333,333,365,556,834,834,834,611, 667,667,667,667,667,667,1000,722,667,667,667,667,278,278,278,278, 722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611, 556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278, 556,556,556,556,556,556,556,584,611,556,556,556,556,500,556,500, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/iso_8859_1/Courier/0000755000175000017500000000000011715531042027646 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/iso_8859_1/Courier/Bold.pm0000644000175000017500000000350311715531042031065 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Courier-Bold in the iso-8859-1 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::iso_8859_1::Courier::Bold; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Courier-Bold'} ||= { 'ascender' => 626, 'cap_height' => 562, 'descender' => -142, 'family' => 'Courier', 'fixed_pitch' => 1, 'font_bbox' => [ -113, -250, 749, 801 ], 'full_name' => 'Courier Bold', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '002.004', 'weight' => 'Bold', 'x_height' => 439 }; $PostScript::File::Metrics::Metrics{'Courier-Bold'}{'iso-8859-1'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 600,600,600,600,600,600,600,600,600,0,600,600,0,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/iso_8859_1/Courier/BoldOblique.pm0000644000175000017500000000355011715531042032410 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Courier-BoldOblique in the iso-8859-1 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::iso_8859_1::Courier::BoldOblique; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Courier-BoldOblique'} ||= { 'ascender' => 626, 'cap_height' => 562, 'descender' => -142, 'family' => 'Courier', 'fixed_pitch' => 1, 'font_bbox' => [ -56, -250, 868, 801 ], 'full_name' => 'Courier Bold Oblique', 'italic_angle' => -12, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '002.004', 'weight' => 'Bold', 'x_height' => 439 }; $PostScript::File::Metrics::Metrics{'Courier-BoldOblique'}{'iso-8859-1'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 600,600,600,600,600,600,600,600,600,0,600,600,0,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/iso_8859_1/Courier/Oblique.pm0000644000175000017500000000352511715531042031611 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Courier-Oblique in the iso-8859-1 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::iso_8859_1::Courier::Oblique; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Courier-Oblique'} ||= { 'ascender' => 629, 'cap_height' => 562, 'descender' => -157, 'family' => 'Courier', 'fixed_pitch' => 1, 'font_bbox' => [ -28, -250, 742, 805 ], 'full_name' => 'Courier Oblique', 'italic_angle' => -12, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '002.004', 'weight' => 'Medium', 'x_height' => 426 }; $PostScript::File::Metrics::Metrics{'Courier-Oblique'}{'iso-8859-1'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 600,600,600,600,600,600,600,600,600,0,600,600,0,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/cp1252/0000755000175000017500000000000011715531042025443 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/cp1252/Helvetica.pm0000644000175000017500000000352311715531042027710 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Helvetica in the cp1252 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::cp1252::Helvetica; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Helvetica'} ||= { 'ascender' => 718, 'cap_height' => 718, 'descender' => -207, 'family' => 'Helvetica', 'fixed_pitch' => 0, 'font_bbox' => [ -166, -225, 1000, 931 ], 'full_name' => 'Helvetica', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.006', 'weight' => 'Medium', 'x_height' => 523 }; $PostScript::File::Metrics::Metrics{'Helvetica'}{'cp1252'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,278,333,333,333,0,0,0,0,0,0,0,0,0,0,0, 278,278,355,556,556,889,667,222,333,333,389,584,278,584,278,278, 556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556, 1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778, 667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556, 333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556, 556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,0, 0,0,222,556,333,1000,556,556,333,1000,667,333,1000,0,611,0, 0,222,222,333,333,350,556,1000,333,1000,500,333,944,0,500,667, 278,333,556,556,556,556,260,556,333,737,370,556,584,333,737,333, 400,584,333,333,333,556,537,278,333,333,365,556,834,834,834,611, 667,667,667,667,667,667,1000,722,667,667,667,667,278,278,278,278, 722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611, 556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278, 556,556,556,556,556,556,556,584,611,556,556,556,556,500,556,500, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/cp1252/Courier.pm0000644000175000017500000000347611715531042027423 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Courier in the cp1252 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::cp1252::Courier; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Courier'} ||= { 'ascender' => 629, 'cap_height' => 562, 'descender' => -157, 'family' => 'Courier', 'fixed_pitch' => 1, 'font_bbox' => [ -28, -250, 628, 805 ], 'full_name' => 'Courier', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '002.004', 'weight' => 'Medium', 'x_height' => 426 }; $PostScript::File::Metrics::Metrics{'Courier'}{'cp1252'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,600,600,600,600,0,0,0,0,0,0,0,0,0,0,0, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,0, 0,0,600,600,600,600,600,600,600,600,600,600,600,0,600,0, 0,600,600,600,600,600,600,600,600,600,600,600,600,0,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/cp1252/Times/0000755000175000017500000000000011715531042026524 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/cp1252/Times/Bold.pm0000644000175000017500000000352411715531042027746 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Times-Bold in the cp1252 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::cp1252::Times::Bold; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Times-Bold'} ||= { 'ascender' => 676, 'cap_height' => 676, 'descender' => -205, 'family' => 'Times', 'fixed_pitch' => 0, 'font_bbox' => [ -168, -218, 1000, 935 ], 'full_name' => 'Times Bold', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.007', 'weight' => 'Bold', 'x_height' => 461 }; $PostScript::File::Metrics::Metrics{'Times-Bold'}{'cp1252'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,278,333,333,333,0,0,0,0,0,0,0,0,0,0,0, 250,333,555,500,500,1000,833,333,333,333,500,570,250,570,250,278, 500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500, 930,722,667,722,722,667,611,778,778,389,500,778,667,944,722,778, 611,778,722,556,667,722,722,1000,722,722,667,333,278,333,581,500, 333,500,556,444,556,444,333,500,556,278,333,556,278,833,556,500, 556,556,444,389,333,556,500,722,500,500,444,394,220,394,520,0, 0,0,333,500,500,1000,500,500,333,1000,556,333,1000,0,667,0, 0,333,333,500,500,350,500,1000,333,1000,389,333,722,0,444,722, 250,333,500,500,500,500,220,500,333,747,300,500,570,333,747,333, 400,570,300,300,333,556,540,250,333,300,330,500,750,750,750,500, 722,722,722,722,722,722,1000,722,667,667,667,667,389,389,389,389, 722,722,778,778,778,778,778,570,778,722,722,722,722,722,611,556, 500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278, 500,556,500,500,500,500,500,570,500,556,556,556,556,500,556,500, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/cp1252/Times/Italic.pm0000644000175000017500000000353711715531042030277 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Times-Italic in the cp1252 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::cp1252::Times::Italic; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Times-Italic'} ||= { 'ascender' => 683, 'cap_height' => 653, 'descender' => -205, 'family' => 'Times', 'fixed_pitch' => 0, 'font_bbox' => [ -169, -217, 1010, 883 ], 'full_name' => 'Times Italic', 'italic_angle' => '-15.5', 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.007', 'weight' => 'Medium', 'x_height' => 441 }; $PostScript::File::Metrics::Metrics{'Times-Italic'}{'cp1252'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,278,333,333,333,0,0,0,0,0,0,0,0,0,0,0, 250,333,420,500,500,833,778,333,333,333,500,675,250,675,250,278, 500,500,500,500,500,500,500,500,500,500,333,333,675,675,675,500, 920,611,611,667,722,611,611,722,722,333,444,667,556,833,667,722, 611,722,611,500,556,722,611,833,611,556,556,389,278,389,422,500, 333,500,500,444,500,444,278,500,500,278,278,444,278,722,500,500, 500,500,389,389,278,500,444,667,444,444,389,400,275,400,541,0, 0,0,333,500,556,889,500,500,333,1000,500,333,944,0,556,0, 0,333,333,556,556,350,500,889,333,980,389,333,667,0,389,556, 250,389,500,500,500,500,275,500,333,760,276,500,675,333,760,333, 400,675,300,300,333,500,523,250,333,300,310,500,750,750,750,500, 611,611,611,611,611,611,889,667,611,611,611,611,333,333,333,333, 722,667,722,722,722,722,722,675,722,722,722,722,722,556,611,500, 500,500,500,500,500,500,667,444,444,444,444,444,278,278,278,278, 500,500,500,500,500,500,500,675,500,500,500,500,500,444,500,444, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/cp1252/Times/Roman.pm0000644000175000017500000000352511715531042030143 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Times-Roman in the cp1252 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::cp1252::Times::Roman; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Times-Roman'} ||= { 'ascender' => 683, 'cap_height' => 662, 'descender' => -217, 'family' => 'Times', 'fixed_pitch' => 0, 'font_bbox' => [ -168, -218, 1000, 898 ], 'full_name' => 'Times Roman', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.007', 'weight' => 'Roman', 'x_height' => 450 }; $PostScript::File::Metrics::Metrics{'Times-Roman'}{'cp1252'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,278,333,333,333,0,0,0,0,0,0,0,0,0,0,0, 250,333,408,500,500,833,778,333,333,333,500,564,250,564,250,278, 500,500,500,500,500,500,500,500,500,500,278,278,564,564,564,444, 921,722,667,667,722,611,556,722,722,333,389,722,611,889,722,722, 556,722,667,556,611,722,722,944,722,722,611,333,278,333,469,500, 333,444,500,444,500,444,333,500,500,278,278,500,278,778,500,500, 500,500,333,389,278,500,500,722,500,500,444,480,200,480,541,0, 0,0,333,500,444,1000,500,500,333,1000,556,333,889,0,611,0, 0,333,333,444,444,350,500,1000,333,980,389,333,722,0,444,722, 250,333,500,500,500,500,200,500,333,760,276,500,564,333,760,333, 400,564,300,300,333,500,453,250,333,300,310,500,750,750,750,444, 722,722,722,722,722,722,889,667,611,611,611,611,333,333,333,333, 722,722,722,722,722,722,722,564,722,722,722,722,722,722,556,500, 444,444,444,444,444,444,667,444,444,444,444,444,278,278,278,278, 500,500,500,500,500,500,500,564,500,500,500,500,500,500,500,500, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/cp1252/Times/BoldItalic.pm0000644000175000017500000000356011715531042031074 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Times-BoldItalic in the cp1252 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::cp1252::Times::BoldItalic; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Times-BoldItalic'} ||= { 'ascender' => 699, 'cap_height' => 669, 'descender' => -205, 'family' => 'Times', 'fixed_pitch' => 0, 'font_bbox' => [ -200, -218, 996, 921 ], 'full_name' => 'Times Bold Italic', 'italic_angle' => -15, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.009', 'weight' => 'Bold', 'x_height' => 462 }; $PostScript::File::Metrics::Metrics{'Times-BoldItalic'}{'cp1252'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,278,333,333,333,0,0,0,0,0,0,0,0,0,0,0, 250,389,555,500,500,833,778,333,333,333,500,570,250,606,250,278, 500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500, 832,667,667,667,722,667,667,722,778,389,500,667,611,889,722,722, 611,722,667,556,611,722,667,889,667,611,611,333,278,333,570,500, 333,500,500,444,500,444,333,500,556,278,278,500,278,778,556,500, 500,500,389,389,278,556,444,667,500,444,389,348,220,348,570,0, 0,0,333,500,500,1000,500,500,333,1000,556,333,944,0,611,0, 0,333,333,500,500,350,500,1000,333,1000,389,333,722,0,389,611, 250,389,500,500,500,500,220,500,333,747,266,500,606,333,747,333, 400,570,300,300,333,576,500,250,333,300,300,500,750,750,750,500, 667,667,667,667,667,667,944,667,667,667,667,667,389,389,389,389, 722,722,722,722,722,722,722,570,722,722,722,722,722,611,611,500, 500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278, 500,556,500,500,500,500,500,570,500,556,556,556,556,444,500,444, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/cp1252/Helvetica/0000755000175000017500000000000011715531042027347 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/cp1252/Helvetica/Bold.pm0000644000175000017500000000355211715531042030572 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Helvetica-Bold in the cp1252 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::cp1252::Helvetica::Bold; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Helvetica-Bold'} ||= { 'ascender' => 718, 'cap_height' => 718, 'descender' => -207, 'family' => 'Helvetica', 'fixed_pitch' => 0, 'font_bbox' => [ -170, -228, 1003, 962 ], 'full_name' => 'Helvetica Bold', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.007', 'weight' => 'Bold', 'x_height' => 532 }; $PostScript::File::Metrics::Metrics{'Helvetica-Bold'}{'cp1252'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,278,333,333,333,0,0,0,0,0,0,0,0,0,0,0, 278,333,474,556,556,889,722,278,333,333,389,584,278,584,278,278, 556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611, 975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778, 667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556, 333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611, 611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,0, 0,0,278,556,500,1000,556,556,333,1000,667,333,1000,0,611,0, 0,278,278,500,500,350,556,1000,333,1000,556,333,944,0,500,667, 278,333,556,556,556,556,280,556,333,737,370,556,584,333,737,333, 400,584,333,333,333,611,556,278,333,333,365,556,834,834,834,611, 722,722,722,722,722,722,1000,722,667,667,667,667,278,278,278,278, 722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611, 556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278, 611,611,611,611,611,611,611,584,611,611,611,611,611,556,611,556, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/cp1252/Helvetica/BoldOblique.pm0000644000175000017500000000362011715531042032107 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Helvetica-BoldOblique in the cp1252 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::cp1252::Helvetica::BoldOblique; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Helvetica-BoldOblique'} ||= { 'ascender' => 718, 'cap_height' => 718, 'descender' => -207, 'family' => 'Helvetica', 'fixed_pitch' => 0, 'font_bbox' => [ -174, -228, 1114, 962 ], 'full_name' => 'Helvetica Bold Oblique', 'italic_angle' => -12, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.007', 'weight' => 'Bold', 'x_height' => 532 }; $PostScript::File::Metrics::Metrics{'Helvetica-BoldOblique'}{'cp1252'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,278,333,333,333,0,0,0,0,0,0,0,0,0,0,0, 278,333,474,556,556,889,722,278,333,333,389,584,278,584,278,278, 556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611, 975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778, 667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556, 333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611, 611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,0, 0,0,278,556,500,1000,556,556,333,1000,667,333,1000,0,611,0, 0,278,278,500,500,350,556,1000,333,1000,556,333,944,0,500,667, 278,333,556,556,556,556,280,556,333,737,370,556,584,333,737,333, 400,584,333,333,333,611,556,278,333,333,365,556,834,834,834,611, 722,722,722,722,722,722,1000,722,667,667,667,667,278,278,278,278, 722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611, 556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278, 611,611,611,611,611,611,611,584,611,611,611,611,611,556,611,556, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/cp1252/Helvetica/Oblique.pm0000644000175000017500000000357611715531042031320 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Helvetica-Oblique in the cp1252 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::cp1252::Helvetica::Oblique; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Helvetica-Oblique'} ||= { 'ascender' => 718, 'cap_height' => 718, 'descender' => -207, 'family' => 'Helvetica', 'fixed_pitch' => 0, 'font_bbox' => [ -170, -225, 1116, 931 ], 'full_name' => 'Helvetica Oblique', 'italic_angle' => -12, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '001.006', 'weight' => 'Medium', 'x_height' => 523 }; $PostScript::File::Metrics::Metrics{'Helvetica-Oblique'}{'cp1252'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,278,333,333,333,0,0,0,0,0,0,0,0,0,0,0, 278,278,355,556,556,889,667,222,333,333,389,584,278,584,278,278, 556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556, 1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778, 667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556, 333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556, 556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,0, 0,0,222,556,333,1000,556,556,333,1000,667,333,1000,0,611,0, 0,222,222,333,333,350,556,1000,333,1000,500,333,944,0,500,667, 278,333,556,556,556,556,260,556,333,737,370,556,584,333,737,333, 400,584,333,333,333,556,537,278,333,333,365,556,834,834,834,611, 667,667,667,667,667,667,1000,722,667,667,667,667,278,278,278,278, 722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611, 556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278, 556,556,556,556,556,556,556,584,611,556,556,556,556,500,556,500, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/cp1252/Courier/0000755000175000017500000000000011715531042027053 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/cp1252/Courier/Bold.pm0000644000175000017500000000352711715531042030300 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Courier-Bold in the cp1252 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::cp1252::Courier::Bold; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Courier-Bold'} ||= { 'ascender' => 626, 'cap_height' => 562, 'descender' => -142, 'family' => 'Courier', 'fixed_pitch' => 1, 'font_bbox' => [ -113, -250, 749, 801 ], 'full_name' => 'Courier Bold', 'italic_angle' => 0, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '002.004', 'weight' => 'Bold', 'x_height' => 439 }; $PostScript::File::Metrics::Metrics{'Courier-Bold'}{'cp1252'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,600,600,600,600,0,0,0,0,0,0,0,0,0,0,0, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,0, 0,0,600,600,600,600,600,600,600,600,600,600,600,0,600,0, 0,600,600,600,600,600,600,600,600,600,600,600,600,0,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/cp1252/Courier/BoldOblique.pm0000644000175000017500000000357411715531042031623 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Courier-BoldOblique in the cp1252 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::cp1252::Courier::BoldOblique; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Courier-BoldOblique'} ||= { 'ascender' => 626, 'cap_height' => 562, 'descender' => -142, 'family' => 'Courier', 'fixed_pitch' => 1, 'font_bbox' => [ -56, -250, 868, 801 ], 'full_name' => 'Courier Bold Oblique', 'italic_angle' => -12, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '002.004', 'weight' => 'Bold', 'x_height' => 439 }; $PostScript::File::Metrics::Metrics{'Courier-BoldOblique'}{'cp1252'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,600,600,600,600,0,0,0,0,0,0,0,0,0,0,0, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,0, 0,0,600,600,600,600,600,600,600,600,600,600,600,0,600,0, 0,600,600,600,600,600,600,600,600,600,600,600,600,0,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File/Metrics/cp1252/Courier/Oblique.pm0000644000175000017500000000355111715531042031015 0ustar gregoagregoa# This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for Courier-Oblique in the cp1252 encoding. #--------------------------------------------------------------------- package PostScript::File::Metrics::cp1252::Courier::Oblique; our $VERSION = '2.01'; # This file is part of PostScript-File 2.20 (February 11, 2012) $PostScript::File::Metrics::Info{'Courier-Oblique'} ||= { 'ascender' => 629, 'cap_height' => 562, 'descender' => -157, 'family' => 'Courier', 'fixed_pitch' => 1, 'font_bbox' => [ -28, -250, 742, 805 ], 'full_name' => 'Courier Oblique', 'italic_angle' => -12, 'underline_position' => -100, 'underline_thickness' => 50, 'version' => '002.004', 'weight' => 'Medium', 'x_height' => 426 }; $PostScript::File::Metrics::Metrics{'Courier-Oblique'}{'cp1252'} = [ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,600,600,600,600,0,0,0,0,0,0,0,0,0,0,0, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,0, 0,0,600,600,600,600,600,600,600,600,600,600,600,0,600,0, 0,600,600,600,600,600,600,600,600,600,600,600,600,0,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, 600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600, ]; __END__ libpostscript-file-perl-2.20+dfsg.orig/lib/PostScript/File.pm0000644000175000017500000033774311715531042023500 0ustar gregoagregoa#--------------------------------------------------------------------- package PostScript::File; # # Copyright 2002, 2003 Christopher P Willmot. # Copyright 2011 Christopher J. Madsen # # Author: Chris Willmot # Christopher J. Madsen # # This program is free software; you can redistribute it and/or modify # it under the same terms as Perl 5 itself. # # 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 either the # GNU General Public License or the Artistic License for more details. # # ABSTRACT: Class for creating Adobe PostScript files #--------------------------------------------------------------------- use 5.008; our $VERSION = '2.20'; ## no critic # This file is part of PostScript-File 2.20 (February 11, 2012) use strict; use warnings; use Carp 'croak'; use File::Spec (); use Scalar::Util 'openhandle'; use Exporter 5.57 'import'; our %EXPORT_TAGS = (metrics_methods => [qw( encode_text decode_text convert_hyphens set_auto_hyphen )]); our @EXPORT_OK = (qw(check_tilde check_file incpage_label incpage_roman array_as_string pstr quote_text str), # These are only for PostScript::File::Metrics: @{ $EXPORT_TAGS{metrics_methods} }); # Prototypes for functions only ## no critic (ProhibitSubroutinePrototypes) sub incpage_label ($); sub incpage_roman ($); sub check_tilde ($); sub check_file ($;$$); ## use critic # global constants our %encoding_def; # defined near _set_reencode our ($t1ascii, $ttftotype42); BEGIN { # Program to convert .pfb fonts to .pfa on STDOUT: $t1ascii = 't1ascii' unless defined $t1ascii; # Program to convert .ttf fonts to .pfa on STDOUT: $ttftotype42 = 'ttftotype42' unless defined $ttftotype42; } # define page sizes here (a4, letter, etc) # should be Properly Cased our %size = ( a0 => '2384 3370', a1 => '1684 2384', a2 => '1191 1684', a3 => "841.88976 1190.5512", a4 => "595.27559 841.88976", a5 => "420.94488 595.27559", a6 => '297 420', a7 => '210 297', a8 => '148 210', a9 => '105 148', b0 => '2920 4127', b1 => '2064 2920', b2 => '1460 2064', b3 => '1032 1460', b4 => '729 1032', b5 => '516 729', b6 => '363 516', b7 => '258 363', b8 => '181 258', b9 => '127 181 ', b10 => '91 127', executive => '522 756', folio => '595 935', 'half-letter' => '612 397', letter => "612 792", 'us-letter' => '612 792', legal => '612 1008', 'us-legal' => '612 1008', tabloid => '792 1224', 'superb' => '843 1227', ledger => '1224 792', 'comm #10 envelope' => '297 684', 'envelope-monarch' => '280 542', 'envelope-dl' => '312 624', 'envelope-c5' => '461 648', 'europostcard' => '298 420', ); # The 13 standard fonts that are available on all PS 1 implementations: our @fonts = qw( Courier Courier-Bold Courier-BoldOblique Courier-Oblique Helvetica Helvetica-Bold Helvetica-BoldOblique Helvetica-Oblique Times-Roman Times-Bold Times-BoldItalic Times-Italic Symbol ); # 5.008-compatible version of defined-or: sub _def { for (@_) { return $_ if defined $_ } undef } sub new { my ($class, @options) = @_; my $opt = {}; if (@options == 1) { $opt = $options[0]; } else { %$opt = @options; } ## Initialization my $o = { # PostScript DSC sections Comments => "", # must include leading '%%' and end with '\n' DocSupplied => "", Preview => "", Defaults => "", Fonts => "", Resources => "", Functions => "", Setup => "", PageSetup => "", Pages => [], # indexed by $o->{p}, 0 based PageTrailer => "", Trailer => "", # internal p => 0, # current page (0 based) pagecount => 0, # number of pages page => [], # array of labels, indexed by $o->{p} pagelandsc => [], # orientation of each page individually pageclip => [], # clip to pagebbox pagebbox => [], # array of bbox, indexed by $o->{p} bbox => [], # [ x0, y0, x1, y1 ] embed_fonts => [], # fonts that have been embedded needed => {}, # DocumentNeededResources vars => {}, # permanent user variables pagevars => {}, # user variables reset with each new page }; bless $o, $class; ## Paper layout croak "PNG output is no longer supported. Use PostScript::Convert instead" if $opt->{png}; $o->{eps} = !!$opt->{eps} + 0; $o->{file_ext} = $opt->{file_ext}; $o->set_filename(@$opt{qw(file dir)}); $o->set_paper( $opt->{paper} ); $o->set_width( $opt->{width} ); $o->set_height( $opt->{height} ); $o->set_landscape( $opt->{landscape} ); ## Debug options $o->{debug} = $opt->{debug}; # undefined is an option if ($o->{debug}) { $o->{db_active} = _def($opt->{db_active}, 1); $o->{db_bufsize} = _def($opt->{db_bufsize}, 256); $o->{db_font} = _def($opt->{db_font}, "Courier"); $o->{db_fontsize} = _def($opt->{db_fontsize}, 10); $o->{db_ytop} = _def($opt->{db_ytop}, ($o->{bbox}[3] - $o->{db_fontsize} - 6)); $o->{db_ybase} = _def($opt->{db_ybase}, 6); $o->{db_xpos} = _def($opt->{db_xpos}, 6); $o->{db_xtab} = _def($opt->{db_xtab}, 10); $o->{db_xgap} = _def($opt->{db_xgap}, ($o->{bbox}[2] - $o->{bbox}[0] - $o->{db_xpos})/4); $o->{db_color} = _def($opt->{db_color}, "0 setgray"); } ## Bounding box my $x0 = $o->{bbox}[0] + _def($opt->{left}, 28); my $y0 = $o->{bbox}[1] + _def($opt->{bottom}, 28); my $x1 = $o->{bbox}[2] - _def($opt->{right}, 28); my $y1 = $o->{bbox}[3] - _def($opt->{top}, 28); $o->set_bounding_box( $x0, $y0, $x1, $y1 ); $o->set_clipping( $opt->{clipping} ); ## Other options $o->{title} = $opt->{title}; $o->{version} = $opt->{version}; $o->{langlevel} = $opt->{langlevel}; $o->{extensions} = $opt->{extensions}; $o->{order} = defined($opt->{order}) ? ucfirst lc $opt->{order} : undef; $o->set_page_label( $opt->{page} ); $o->set_incpage_handler( $opt->{incpage_handler} ); $o->{errx} = _def($opt->{errx}, 72); $o->{erry} = _def($opt->{erry}, 72); $o->{errmsg} = _def($opt->{errmsg}, "ERROR:"); $o->{errfont} = _def($opt->{errfont}, "Courier-Bold"); $o->{errsize} = _def($opt->{errsize}, 12); $o->{font_suffix} = _def($opt->{font_suffix}, "-iso"); $o->{clipcmd} = _def($opt->{clip_command}, "clip"); $o->{errors} = _def($opt->{errors}, 1); $o->{headings} = _def($opt->{headings}, 0); $o->set_strip( $opt->{strip} ); $o->_set_reencode( $opt->{reencode} ); $o->set_auto_hyphen(_def($opt->{auto_hyphen}, 1)); $o->need_resource(font => @{ $opt->{need_fonts} }) if $opt->{need_fonts}; $o->newpage if _def($opt->{newpage}, 1); ## Finish return $o; } sub newpage { my ($o, $page) = @_; my $oldpage = $o->{page}[$o->{p}]; # Don't use _def here, because we don't want to call # incpage_handler if the user supplied a page label: my $newpage = defined $page ? $page # If this is the very first page, don't increment the page number: : ($o->{pagecount} ? $o->{incpage}->($oldpage) : $oldpage); my $p = $o->{p} = $o->{pagecount}++; $o->{page}[$p] = $newpage; $o->{pagebbox}[$p] = [ @{$o->{bbox}} ]; $o->{pageclip}[$p] = $o->{clipping}; $o->{pagelandsc}[$p] = $o->{landscape}; $o->{Pages}->[$p] = ""; $o->{pagevars} = {}; } sub _pre_pages { my ($o, $landscape, $clipping, $filename) = @_; if (my $use_functions = $o->{use_functions}) { $use_functions->add_to_file($o); } my $docSupplied = $o->{DocSupplied}; ## Thanks to Johan Vromans for the ISOLatin1Encoding. my $fonts = ""; if ($o->{reencode}) { my $encoding = $o->{reencode}; my $ext = $o->{font_suffix}; $fonts = "% Handle font encoding:\n"; $fonts .= $o->_here_doc(<<"END_FONTS"); /STARTDIFFENC { mark } bind def /ENDDIFFENC { % /NewEnc BaseEnc STARTDIFFENC number or glyphname ... ENDDIFFENC - counttomark 2 add -1 roll 256 array copy /TempEncode exch def % pointer for sequential encodings /EncodePointer 0 def { % Get the bottom object counttomark -1 roll % Is it a mark? dup type dup /marktype eq { % End of encoding pop pop exit } { /nametype eq { % Insert the name at EncodePointer % and increment the pointer. TempEncode EncodePointer 3 -1 roll put /EncodePointer EncodePointer 1 add def } { % Set the EncodePointer to the number /EncodePointer exch def } ifelse } ifelse } loop TempEncode def } bind def \n$encoding_def{$encoding} % Name: Re-encode Font % Description: Creates a new font using the named encoding. /REENCODEFONT { % /Newfont NewEncoding /Oldfont findfont dup length 4 add dict begin { % forall 1 index /FID ne 2 index /UniqueID ne and 2 index /XUID ne and { def } { pop pop } ifelse } forall /Encoding exch def % defs for DPS /BitmapWidths false def /ExactSize 0 def /InBetweenSize 0 def /TransformedChar 0 def currentdict end definefont pop } bind def END_FONTS $fonts .= "\n% Reencode the fonts:\n"; # If no fonts listed, assume the standard ones: $o->{needed}{font} ||= { map { $_ => 1 } @fonts }; for my $font (sort(keys(%{ $o->{needed}{font} }), @{ $o->{embed_fonts} })) { next if $font eq 'Symbol'; # doesn't use StandardEncoding $fonts .= "/${font}$ext $encoding /$font REENCODEFONT\n"; } $fonts .= "% end font encoding\n"; } # end if reencode # Prepare the PostScript file my $postscript = $o->{eps} ? "\%!PS-Adobe-3.0 EPSF-3.0\n" : "\%!PS-Adobe-3.0\n"; if ($o->{eps}) { $postscript .= $o->_bbox_comment('', $o->{bbox}); } if ($o->{headings}) { require Sys::Hostname; my $user = getlogin() || (getpwuid($<))[0] || "Unknown"; my $hostname = Sys::Hostname::hostname(); $postscript .= $o->_here_doc(<_here_doc(<{eps}); \%\%DocumentMedia: $o->{paper} $o->{width} $o->{height} 80 ( ) ( ) END_PS_ONLY } my $landscapefn = ""; $landscapefn .= $o->_here_doc(< _ /landscape { $o->{width} 0 translate 90 rotate } bind def END_LANDSCAPE my $clipfn = ""; if ($clipping) { my $clipcmd = $o->{clipcmd}; $clipcmd = "gsave 0 setgray 0.5 setlinewidth $clipcmd grestore newpath" if $clipcmd eq 'stroke'; $clipfn .= $o->_here_doc(< _ /cliptobox { 4 dict begin /y1 exch def /x1 exch def /y0 exch def /x0 exch def newpath x0 y0 moveto x0 y1 lineto x1 y1 lineto x1 y0 lineto closepath $clipcmd end } bind def END_CLIPPING } # end if $clipping my $errorfn = ""; if ($o->{errors}) { $o->need_resource(font => $o->{errfont}); $errorfn .= $o->_here_doc(<{errx} def /erry $o->{erry} def /errmsg ($o->{errmsg}) def /errfont /$o->{errfont} def /errsize $o->{errsize} def % Report fatal error on page % _ str => _ /report_error { 0 setgray errfont findfont errsize scalefont setfont errmsg errx erry moveto show 80 string cvs errx erry errsize sub moveto show stop } bind def % PostScript errors printed on page % not called directly errordict begin /handleerror { \$error begin false binary 0 setgray errfont findfont errsize scalefont setfont errx erry moveto errmsg show errx erry errsize sub moveto errorname 80 string cvs show stop } def end END_ERRORS } # end if $o->{errors} my $debugfn = ""; if ($o->{debug}) { $o->need_resource(font => $o->{db_font}); $debugfn .= $o->_here_doc(< _ /db_down { debugdict begin db_ypos db_ybase gt { /db_ypos db_ypos db_ygap sub def }{ db_newcol } ifelse end } bind def % _ db_down => _ /db_indent { debug_dict begin /db_xpos db_xpos db_xtab add def end } bind def % _ db_indent => _ /db_unindent { debugdict begin /db_xpos db_xpos db_xtab sub def end } bind def % _ db_unindent => _ /db_show { debugdict begin db_active 0 ne { gsave newpath $o->{db_color} /$o->{db_font} findfont $o->{db_fontsize} scalefont setfont db_xpos db_ypos moveto dup type dup (arraytype) eq { pop db_array }{ dup (marktype) eq { pop pop (--mark--) $o->{db_bufsize} string cvs show }{ pop $o->{db_bufsize} string cvs show } ifelse db_down } ifelse stroke grestore }{ pop } ifelse end } bind def % _ (msg) db_show => _ /db_nshow { debugdict begin db_show /db_num exch def db_num count gt { (Not enough on stack) db_show }{ db_num { dup db_show db_num 1 roll } repeat (----------) db_show } ifelse end } bind def % _ n (str) db_nshow => _ /db_stack { count 0 gt { count $o->{debug} 2 ge { 1 sub } if (The stack holds...) db_nshow } { (Empty stack) db_show } ifelse } bind def % _ db_stack => _ /db_one { debugdict begin db_temp cvs dup length exch db_buf exch db_bpos exch putinterval /db_bpos exch db_bpos add def end } bind def % _ any db_one => _ /db_print { debugdict begin /db_temp $o->{db_bufsize} string def /db_buf $o->{db_bufsize} string def 0 1 $o->{db_bufsize} sub 1 { db_buf exch 32 put } for /db_bpos 0 def { db_one ( ) db_one } forall db_buf db_show end } bind def % _ [array] db_print => _ /db_array { mark ([) 2 index aload pop (]) ] db_print pop } bind def % _ [array] db_array => _ /db_point { [ 1 index (\\() 5 index (,) 6 index (\\)) ] db_print pop } bind def % _ x y (str) db_point => _ x y /db_where { where { pop (found) db_show }{ (not found) db_show } ifelse } bind def % _ var db_where => _ /db_on { debugdict begin /db_active 1 def end } bind def % _ db_on => _ /db_off { debugdict begin /db_active 0 def end } bind def % _ db_on => _ /db_active $o->{db_active} def /db_ytop $o->{db_ytop} def /db_ybase $o->{db_ybase} def /db_xpos $o->{db_xpos} def /db_xtab $o->{db_xtab} def /db_xgap $o->{db_xgap} def /db_ygap $o->{db_fontsize} def /db_ypos $o->{db_ytop} def end END_DEBUG_ON } # end if $o->{debug} $debugfn .= $o->_here_doc(<{debug}) and not $o->{debug}); % Define out the db_ functions /debugdict 25 dict def debugdict begin /db_newcol { } bind def /db_down { } bind def /db_indent { } bind def /db_unindent { } bind def /db_show { pop } bind def /db_nshow { pop pop } bind def /db_stack { } bind def /db_print { pop } bind def /db_array { pop } bind def /db_point { pop pop pop } bind def end END_DEBUG_OFF my $ver = sprintf('%g', $VERSION); my $supplied = ""; if ($landscapefn or $clipfn or $errorfn or $debugfn) { $docSupplied .= "\%\%+ procset PostScript_File $ver 0\n"; $supplied .= $o->_here_doc(<_build_needed; my $title = $o->{title}; $title = $o->quote_text($filename) if not defined $title and defined $filename; $postscript .= $o->{Comments} if ($o->{Comments}); $postscript .= "\%\%Orientation: ${\( $o->{landscape} ? 'Landscape' : 'Portrait' )}\n"; $postscript .= $docNeeded if $docNeeded; $postscript .= "\%\%DocumentSuppliedResources:\n$docSupplied" if $docSupplied; $postscript .= $o->encode_text("\%\%Title: $title\n") if defined $title; $postscript .= "\%\%Version: $o->{version}\n" if ($o->{version}); $postscript .= "\%\%Pages: $o->{pagecount}\n" if ((not $o->{eps}) and ($o->{pagecount} > 1)); $postscript .= "\%\%PageOrder: $o->{order}\n" if ((not $o->{eps}) and ($o->{order})); $postscript .= "\%\%Extensions: $o->{extensions}\n" if ($o->{extensions}); $postscript .= "\%\%LanguageLevel: $o->{langlevel}\n" if ($o->{langlevel}); $postscript .= "\%\%EndComments\n"; $postscript .= $o->{Preview} if ($o->{Preview}); $postscript .= $o->_here_doc(<{Defaults}); \%\%BeginDefaults $o->{Defaults} \%\%EndDefaults END_DEFAULTS $postscript .= $o->_here_doc(<{Functions} \%\%EndProlog END_PROLOG my $setup = "$o->{Fonts}$fonts$o->{Resources}$o->{Setup}"; $postscript .= "%%BeginSetup\n$setup%%EndSetup\n" if $setup; return $postscript; } # Internal method, used by output() sub _build_needed { my $o = shift; my $needed = $o->{needed}; return unless %$needed; my $comment = "%%DocumentNeededResources:\n"; foreach my $type (sort keys %$needed) { if ($type eq 'font') { # Remove any embedded fonts from the needed fonts: delete $needed->{$type}{$_} for @{ $o->{embed_fonts} }; } # end if fonts next unless %{ $needed->{$type} }; my $prefix = "%%+ $type"; my $maxLen = 79 - length $prefix; my @list = ''; foreach my $resource (sort keys %{ $needed->{$type} }) { push @list, '' if length $list[-1] and length($resource) + length($list[-1]) >= $maxLen; $list[-1] .= " $resource"; } # end foreach $resource $comment .= "$prefix$_\n" for @list; } # end foreach $type $comment; } # end _build_needed sub _post_pages { my $o = shift; my $postscript = ""; my $trailer = $o->{Trailer}; $trailer .= "% Local\ Variables:\n% coding: " . $o->{encoding}->mime_name . "\n% End:\n" if $o->{encoding}; $postscript .= "%%Trailer\n$trailer" if $trailer; $postscript .= "\%\%EOF\n"; return $postscript; } # Internal method, used by output() sub output { my ($o, $filename, $dir) = @_; my $fh = openhandle $filename; # Don't permanently change filename: local $o->{filename} = $o->{filename}; $o->set_filename($filename, $dir) if @_ > 1 and not $fh; my ($debugbegin, $debugend) = ("", ""); if (defined $o->{debug}) { $debugbegin = "debugdict begin\nuserdict begin"; $debugend = "end\nend"; if ($o->{debug} >= 2) { $debugbegin = $o->_here_doc(<_here_doc(<{eps}) { my @pages; my $p = 0; do { my $epsfile; if (defined $o->{filename}) { $epsfile = ($o->{pagecount} > 1) ? "$o->{filename}-$o->{page}[$p]" : "$o->{filename}"; $epsfile .= defined($o->{file_ext}) ? $o->{file_ext} : ($o->{Preview} ? ".epsi" : ".epsf"); } my $postscript = ""; my $page = $o->{page}->[$p]; my @pbox = $o->get_page_bounding_box($page); $o->set_bounding_box(@pbox); $postscript .= $o->_pre_pages($o->{pagelandsc}[$p], $o->{pageclip}[$p], $epsfile); $postscript .= "landscape\n" if ($o->{pagelandsc}[$p]); $postscript .= "$pbox[0] $pbox[1] $pbox[2] $pbox[3] cliptobox\n" if ($o->{pageclip}[$p]); $postscript .= "$debugbegin\n"; $postscript .= $o->{Pages}->[$p]; $postscript .= "$debugend\n"; $postscript .= $o->_post_pages(); push @pages, $o->_print_file( $fh || $epsfile, $postscript ); $p++; } while ($p < $o->{pagecount}); return wantarray ? @pages : $pages[0]; } else { my $landscape = $o->{landscape}; foreach my $pl (@{$o->{pagelandsc}}) { $landscape |= $pl; } my $clipping = $o->{clipping}; foreach my $cl (@{$o->{pageclip}}) { $clipping |= $cl; } my $psfile = $o->{filename}; $psfile .= defined($o->{file_ext}) ? $o->{file_ext} : '.ps' if defined $psfile; my $postscript = $o->_pre_pages($landscape, $clipping, $psfile); for (my $p = 0; $p < $o->{pagecount}; $p++) { my $page = $o->{page}->[$p]; my @pbox = $o->get_page_bounding_box($page); my ($landscape, $pagebb); if ($o->{pagelandsc}[$p]) { $landscape = "landscape"; $pagebb = $o->_bbox_comment(Page => [ @pbox[1,0,3,2] ]); } else { $landscape = ""; $pagebb = $o->_bbox_comment(Page => \@pbox); } my $cliptobox = $o->{pageclip}[$p] ? "$pbox[0] $pbox[1] $pbox[2] $pbox[3] cliptobox" : ""; $postscript .= $o->_here_doc(<{page}->[$p] ${\($p+1)} $pagebb\%\%BeginPageSetup /pagelevel save def $landscape $cliptobox $debugbegin $o->{PageSetup} \%\%EndPageSetup END_PAGE_SETUP $postscript .= $o->{Pages}->[$p]; $postscript =~ s/\n?\z/\n/; # Ensure LF at end $postscript .= $o->_here_doc(<{PageTrailer} $debugend pagelevel restore showpage END_PAGE_TRAILER } $postscript .= $o->_post_pages(); return $o->_print_file( $fh || $psfile, $postscript ); } } sub as_string { shift->output(undef) } sub testable_output { my ($o, $verbatim) = @_; my $ps = $o->output(undef); unless ($verbatim) { # Remove PostScript::File generated code: $ps =~ s/^%%BeginResource: procset PostScript_File.*?^%%EndResource\n//msg; $ps =~ s/^%%\+ procset PostScript_File.*\n//mg; $ps =~ s/^% Handle font encoding:\n.*?^% end font encoding\n//ms; $ps =~ s/^% Local Variables:\n.*?^% End:\n//ms; $ps =~ s/^%%Trailer\n(?=%%EOF\n)//m; } # end unless $verbatim $ps; } # end testable_output #--------------------------------------------------------------------- # Create a BoundingBox: comment, # and a HiRes version if the box has a fractional part: sub _bbox_comment { my ($o, $type, $bbox) = @_; my $comment = join(' ', @$bbox); if ($comment =~ /\./) { $comment = sprintf("%d %d %d %d\n%%%%%sHiResBoundingBox: %s", (map { $_ + 0.999999 } @$bbox), $type, $comment); } # end if fractional bbox "%%${type}BoundingBox: $comment\n"; } # end _bbox_comment sub _print_file { my $o = shift; my $filename = shift; if (defined $filename) { my $outfile = openhandle $filename; if ($outfile) { print $outfile $_[0]; return; } # end if passed a filehandle open($outfile, ">", $filename) or die "Unable to write to \'$filename\' : $!\nStopped"; print $outfile $_[0]; close $outfile; return $filename; } else { return $_[0]; } # end else no filename } # end _print_file # Internal method, used by output() # Expects file name and contents #--------------------------------------------------------------------- sub get_auto_hyphen { my $o = shift; return $o->{auto_hyphen}; } sub set_auto_hyphen { my ($o, $translate) = @_; $o->{auto_hyphen} = $o->{encoding} && $translate; } sub get_filename { my $o = shift; return $o->{filename}; } sub set_filename { my ($o, $filename, $dir) = @_; $o->{filename} = ((defined($filename) and length($filename)) ? check_file($filename, $dir) : undef); } sub get_file_ext { shift->{file_ext}; } sub set_file_ext { my ($o, $ext) = @_; $o->{file_ext} = $ext; } sub get_eps { my $o = shift; return $o->{eps}; } sub get_paper { my $o = shift; return $o->{paper}; } sub set_paper { my $o = shift; my $paper = shift || "A4"; my ($width, $height) = split(/\s+/, $size{lc($paper)} || ''); if (not $height and $paper =~ /^(\d+(?:\.\d+)?)\s*x\s*(\d+(?:\.\d+)?)$/i) { $width = $1; $height = $2; $paper = 'Custom'; } # end if $paper is 'WIDTH x HEIGHT' if ($height) { $o->{paper} = $paper; $o->{width} = $width; $o->{height} = $height; if ($o->{landscape}) { $o->{bbox}[0] = 0; $o->{bbox}[1] = 0; $o->{bbox}[2] = $height; $o->{bbox}[3] = $width; } else { $o->{bbox}[0] = 0; $o->{bbox}[1] = 0; $o->{bbox}[2] = $width; $o->{bbox}[3] = $height; } } } sub get_width { my $o = shift; return $o->{width}; } sub set_width { my ($o, $width) = @_; if (defined($width) and ($width+0)) { $o->{width} = $width; $o->{paper} = "Custom"; if ($o->{landscape}) { $o->{bbox}[1] = 0; $o->{bbox}[3] = $width; } else { $o->{bbox}[0] = 0; $o->{bbox}[2] = $width; } } } sub get_height { my $o = shift; return $o->{height}; } sub set_height { my ($o, $height) = @_; if (defined($height) and ($height+0)) { $o->{height} = $height; $o->{paper} = "Custom"; if ($o->{landscape}) { $o->{bbox}[0] = 0; $o->{bbox}[2] = $height; } else { $o->{bbox}[1] = 0; $o->{bbox}[3] = $height; } } } sub get_landscape { my $o = shift; return $o->{landscape}; } sub set_landscape { my $o = shift; my $landscape = (!!shift) + 0; $o->{landscape} = 0 unless (defined $o->{landscape}); if ($o->{landscape} != $landscape) { $o->{landscape} = $landscape; ($o->{bbox}[0], $o->{bbox}[1]) = ($o->{bbox}[1], $o->{bbox}[0]); ($o->{bbox}[2], $o->{bbox}[3]) = ($o->{bbox}[3], $o->{bbox}[2]); } } sub get_clipping { my $o = shift; return $o->{clipping}; } sub set_clipping { my $o = shift; $o->{clipping} = (!!shift) + 0; } our %encoding_name = qw( iso-8859-1 ISOLatin1Encoding cp1252 Win1252Encoding ); %encoding_def = ( ISOLatin1Encoding => <<'END ISOLatin1Encoding', % Define ISO Latin1 encoding if it doesnt exist /ISOLatin1Encoding where { % (ISOLatin1 exists!) = pop } { (ISOLatin1 does not exist, creating...) = /ISOLatin1Encoding StandardEncoding STARTDIFFENC 45 /minus 144 /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ENDDIFFENC } ifelse END ISOLatin1Encoding Win1252Encoding => <<'END Win1252Encoding', % Define Windows Latin1 encoding /Win1252Encoding StandardEncoding STARTDIFFENC % LanguageLevel 1 may require these to be mapped somewhere: 17 /dotlessi /dotaccent /ring /caron % Restore glyphs for standard ASCII characters: 45 /minus 96 /grave % Here are the CP1252 extensions to ISO-8859-1: 128 /Euro /.notdef /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl /circumflex /perthousand /Scaron /guilsinglleft /OE /.notdef /Zcaron /.notdef /.notdef /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash /tilde /trademark /scaron /guilsinglright /oe /.notdef /zcaron /Ydieresis % We now return you to your ISO-8859-1 character set: /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ENDDIFFENC END Win1252Encoding ); # end %encoding_def sub _set_reencode { my ($o, $encoding) = @_; return unless $encoding; if ($encoding eq 'ISOLatin1Encoding') { $o->{reencode} = $encoding; return; } # end if backwards compatible ISOLatin1Encoding $o->{reencode} = $encoding_name{$encoding} or croak "Invalid reencode setting $encoding"; require Encode; Encode->VERSION(2.21); # Need mime_name method $o->{encoding} = Encode::find_encoding($encoding) or croak "Can't find encoding $encoding"; } # end _set_reencode our %encode_char = ( 8208 => pack(C => 0xAD), # U+2010 HYPHEN 8209 => pack(C => 0xAD), # U+2011 NON-BREAKING HYPHEN 8722 => pack(C => 0x2D), # U+2212 MINUS SIGN 65533 => pack(C => 0x3F), # U+FFFD REPLACEMENT CHARACTER ); sub encode_text { my $o = shift; my $encoding = $o->{encoding}; if ($encoding and Encode::is_utf8( $_[0] )) { $encoding->encode($_[0], sub { $encode_char{$_[0]} || do { if ($_[0] < 0x100) { pack C => $_[0]; # Unmapped chars stay themselves } else { warn sprintf("PostScript::File can't convert U+%04X to %s\n", $_[0], $encoding->name); '?' } }; # end invalid character }); } else { $_[0]; } } # end encode_text sub decode_text { my $o = shift; # $text, $preserve_minus my $encoding = $o->{encoding}; if ($encoding and not Encode::is_utf8( $_[0] )) { my $text = $encoding->decode($_[0], sub { pack U => shift }); # Protect - from hyphen-minus processing if $preserve_minus: $text =~ s/-/\x{2212}/g if $_[1]; $text; } else { $_[0]; } } # end decode_text sub convert_hyphens { my $o = shift; if ($_[0] =~ /-/) { # Text contains at least one hyphen-minus character: my $text = $o->decode_text(shift); # If it's surrounded by whitespace, or # it's preceded by whitespace and followed by a digit, # it's a minus sign (U+2212): $text =~ s/(?: ^ | (?<=\s) ) - (?= \d | \s | $ ) /\x{2212}/gx; # If it's surrounded by digits, or # it's preceded by punctuation and followed by a digit, # it's a minus sign (U+2212): $text =~ s/ (?<=[\d[:punct:]]) - (?=\d) /\x{2212}/gx; # If it's followed by a currency symbol, it's a minus sign (U+2212): $text =~ s/ - (?=\p{Sc}) /\x{2212}/gx; # Otherwise, it's a hyphen (U+2010): $text =~ s/-/\x{2010}/gx; $text; } else { shift; # Return text unmodified } } # end convert_hyphens sub get_metrics { my ($o, $font, $size, $encoding) = @_; # Figure out what encoding to ask for: unless ($encoding) { if ($font eq 'Symbol') { $encoding = 'sym'; } elsif ($o->{reencode} and $font =~ s/\Q$o->{font_suffix}\E$//) { $encoding = $o->{encoding}->name || 'iso-8859-1'; } else { $encoding = 'std'; } } # end unless $encoding supplied as parameter # Create the Metrics object: require PostScript::File::Metrics; my $metrics = PostScript::File::Metrics->new($font, $size, $encoding); # Whatever encoding they asked for, make sure that the # auto-translation matches what we're doing: $metrics->{encoding} = $o->{encoding}; $metrics->{auto_hyphen} = $o->{auto_hyphen}; $metrics; } # end get_metrics #--------------------------------------------------------------------- sub get_strip { my $o = shift; return $o->{strip_type}; } my $eolRE = qr/(?>\r\n?|\n)/; my $noeolRE = qr/[^\r\n]/; my $nonwsRE = qr/[^ \t\r\n]/; my %strip_re = ( none => 0, # remove nothing space => qr{\G^\s+}m, # remove leading spaces # remove leading spaces and single line comments (except %% and %!): comments => qr{\G^(?:\s+|%(?![!%])(?:$noeolRE)*(?:$eolRE))}mo, # remove leading spaces and all comments (except %% and %!): all_comments => qr{\G (?: ^\s+ | ^% (?![!%]) (?:$noeolRE)* (?:$eolRE) | [ \t]*%(?![!%]) (?:$noeolRE)* ) }mox, ); # end strip_re sub set_strip { my ($o, $strip) = @_; if (not defined $strip) { $strip = 'space' } else { $strip = lc $strip } defined($o->{strip} = $strip_re{$strip}) or croak "Invalid strip type $strip"; $o->{strip_type} = $strip; } #sub chkpt #{ # my $at = substr($_, pos(), 5); # $at =~ s/([^ -~])/sprintf '\x%02X', ord $1 /eg; # printf "%d: %s\n", pos(), $at; #} # end chkpt sub strip { my $o = shift; my $re; if (@_ > 1) { my $strip = shift; defined($re = $strip_re{$strip}) or croak "Invalid strip type $strip"; } else { $re = $o->{strip}; } return unless $re; my $pos; for (@_) { next unless defined $_; pos() = 0; while (pos() < length) { next if m/\G<~[^~]*~>/gc or m/\G\( (?: [^\\)]+ | \\. )* \)/sgcx; $pos = pos(); if (s/$re//m) { pos() = $pos; } else { pos() = $pos; m/\G[ \t]*(?:$eolRE|(?:$nonwsRE)+(?:$eolRE)?)/ogc; die "Infinite loop" if pos() == $pos; } } } # end for @_ return; } # end strip #--------------------------------------------------------------------- sub get_page_landscape { my $o = shift; my $p = $o->_get_ordinal( shift ); return $o->{pagelandsc}[$p]; } sub set_page_landscape { my $o = shift; my $p = (@_ == 2) ? $o->_get_ordinal(shift) : $o->{p}; my $landscape = (!!shift) + 0; $o->{pagelandsc}[$p] = 0 unless (defined $o->{pagelandsc}[$p]); if ($o->{pagelandsc}[$p] != $landscape) { ($o->{pagebbox}[$p][0], $o->{pagebbox}[$p][1]) = ($o->{pagebbox}[$p][1], $o->{pagebbox}[$p][0]); ($o->{pagebbox}[$p][2], $o->{pagebbox}[$p][3]) = ($o->{pagebbox}[$p][3], $o->{pagebbox}[$p][2]); } $o->{pagelandsc}[$p] = $landscape; } #--------------------------------------------------------------------- sub get_page_clipping { my $o = shift; my $p = $o->_get_ordinal( shift ); return $o->{pageclip}[$p]; } sub set_page_clipping { my $o = shift; my $p = (@_ == 2) ? $o->_get_ordinal(shift) : $o->{p}; $o->{pageclip}[$p] = (!!shift) + 0; } sub get_page_label { my $o = shift; return $o->{page}[$o->{p}]; } sub set_page_label { my $o = shift; my $page = shift || 1; $o->{page}[$o->{p}] = $page; } sub get_incpage_handler { my $o = shift; return $o->{incpage}; } sub set_incpage_handler { my $o = shift; $o->{incpage} = shift || \&incpage_label; } sub get_order { my $o = shift; return $o->{order}; } sub get_title { my $o = shift; return $o->{title}; } sub get_version { my $o = shift; return $o->{version}; } sub get_langlevel { my $o = shift; return $o->{langlevel}; } sub set_min_langlevel { my ($o, $level) = @_; $o->{langlevel} = $level unless ($o->{langlevel} || 0) >= $level; return $o->{langlevel}; } sub get_extensions { my $o = shift; return $o->{extensions}; } sub get_bounding_box { my $o = shift; return @{$o->{bbox}}; } sub set_bounding_box { my ($o, $x0, $y0, $x1, $y1) = @_; $o->{bbox} = [ $x0, $y0, $x1, $y1 ] if (defined $y1); $o->set_clipping(1); } sub get_printable_width { my $bb = shift->{bbox}; return $bb->[2] - $bb->[0]; } # end get_printable_width sub get_printable_height { my $bb = shift->{bbox}; return $bb->[3] - $bb->[1]; } # end get_printable_height sub get_page_bounding_box { my $o = shift; my $p = $o->_get_ordinal( shift ); return @{$o->{pagebbox}[$p]}; } sub set_page_bounding_box { my $o = shift; my $page = (@_ == 5) ? shift : ""; if (@_ == 4) { my $p = $o->_get_ordinal($page); $o->{pagebbox}[$p] = [ @_ ]; $o->set_page_clipping($page, 1); } } sub get_page_printable_width { my $o = shift; my $bb = $o->{pagebbox}[$o->_get_ordinal( shift )]; return $bb->[2] - $bb->[0]; } # end get_page_printable_width sub get_page_printable_height { my $o = shift; my $bb = $o->{pagebbox}[$o->_get_ordinal( shift )]; return $bb->[3] - $bb->[1]; } # end get_page_printable_height sub set_page_margins { my $o = shift; my $page = (@_ == 5) ? shift : ""; if (@_ == 4) { my ($left, $bottom, $right, $top) = @_; my $p = $o->_get_ordinal($page); if ($o->{pagelandsc}[$p]) { $o->{pagebbox}[$p] = [ $left, $bottom, $o->{height}-$right, $o->{width}-$top ]; } else { $o->{pagebbox}[$p] = [ $left, $bottom, $o->{width}-$right, $o->{height}-$top ]; } $o->set_page_clipping($page, 1); } } # =method-access get_ordinal # # $index = $ps->get_ordinal( [$page] ) # # Returns the internal number for the page label specified. (Default: # current page) # # Example # # Say pages are labeled "i", "ii", "iii, "iv", "1", "2", "3". # # get_ordinal("i") == 0 # get_ordinal("iv") == 3 # get_ordinal("1") == 4 # # =cut sub _get_ordinal { my ($o, $page) = @_; if ($page) { for (my $i = 0; $i <= $o->{pagecount}; $i++) { my $here = $o->{page}->[$i] || ""; return $i if ($here eq $page); } } return $o->{p}; } sub get_pagecount { my $o = shift; return $o->{pagecount}; } sub set_variable { my ($o, $key, $value) = @_; $o->{vars}{$key} = $value; } sub get_variable { my ($o, $key) = @_; return $o->{vars}{$key}; } sub set_page_variable { my ($o, $key, $value) = @_; $o->{pagevars}{$key} = $value; } sub get_page_variable { my ($o, $key) = @_; return $o->{pagevars}{$key}; } sub get_comments { my $o = shift; return $o->{Comments}; } sub add_comment { my ($o, $entry) = @_; $o->{Comments} .= "\%\%$entry\n" if defined($entry); } sub get_preview { my $o = shift; return $o->{Preview}; } sub add_preview { my ($o, $width, $height, $depth, $lines, $entry) = @_; if (defined $entry) { $entry .= "\n"; $o->strip(space => $entry); $o->{Preview} = "%%BeginPreview: $width $height $depth $lines\n$entry%%EndPreview\n"; } } # end add_preview sub get_defaults { my $o = shift; return $o->{Defaults}; } sub add_default { my ($o, $entry) = @_; $o->{Defaults} .= "\%\%$entry\n" if defined($entry); } sub get_resources { my $o = shift; return $o->{Fonts} . $o->{Resources}; } our %supplied_type = (qw( Document file Feature) => '' ); our %add_resource_accepts = map { $_ => 1 } qw( encoding file font form pattern ); # add_resource does not accept procset, but need_resource does: $add_resource_accepts{procset} = undef; sub add_resource { my ($o, $type, $name, $params, $resource) = @_; my $suptype = $supplied_type{$type}; my $restype = ''; croak "add_resource does not accept type $type" unless defined($suptype) or $add_resource_accepts{lc $type}; unless (defined $suptype) { $suptype = lc $type; $restype = "$suptype "; $type = 'Resource'; } # end unless Document or Feature if (defined($resource)) { $o->strip($resource); $name = $o->quote_text($name); $o->{DocSupplied} .= $o->encode_text("\%\%+ $suptype $name\n") if $suptype; # Store fonts separately, because they need to come first: my $storage = 'Resources'; if ($suptype eq 'font') { $storage = 'Fonts'; push @{ $o->{embed_fonts} }, $name; # Remember to reencode it } # end if adding Font $name .= " $params" if defined $params and length $params; $o->{$storage} .= $o->_here_doc(<{Functions}; } sub add_procset { my ($o, $name, $entry, $version, $revision) = @_; if (defined($name) and defined($entry)) { return if $o->has_procset($name); $o->strip($entry); $name = sprintf('%s %g %d', $o->quote_text($name), $version||0, $revision||0); $o->{DocSupplied} .= $o->encode_text("\%\%+ procset $name\n"); $o->{Functions} .= $o->_here_doc(<quote_text($name); return ($o->{DocSupplied} =~ /^\%\%\+ procset \Q$name\E /m); } # Retain the old names for backwards compatibility: *add_function = \&add_procset; *get_functions = \&get_procsets; *has_function = \&has_procset; sub use_functions { my $o = shift; ( $o->{use_functions} ||= do { require PostScript::File::Functions; PostScript::File::Functions->new; } )->add(@_); return $o; } # end use_functions sub embed_document { my ($o, $filename) = @_; my $id = $o->quote_text(substr($filename, -234)); # in case it's long my $supplied = $o->encode_text("%%+ file $id\n"); $o->{DocSupplied} .= $supplied unless index($o->{DocSupplied}, $supplied) >= 0; local $/; # Read entire file open(my $in, '<:raw', $filename) or croak "Unable to open $filename: $!"; my $content = <$in>; close $in; # Remove TIFF or WMF preview image: if ($content =~ /^\xC5\xD0\xD3\xC6/) { my ($pos, $len) = unpack('V2', substr($content, 4, 8)); $content = substr($content, $pos, $len); } # end if EPS file with TIFF or WMF preview image # Do CR or CRLF -> LF processing, since we read in RAW mode: $content =~ s/\r\n?/\n/g; # Remove EPSI preview: $content =~ s/^\s*%%BeginPreview:.*\n (?:\s*%(?!%).*\n)* \s*%%EndPreview.*\n//gmx; return "\%\%BeginDocument: $id\n$content\n\%\%EndDocument\n"; } # end embed_document sub embed_font { my ($o, $filename, $type) = @_; unless ($type) { $filename =~ /\.([^\\\/.]+)$/ or croak "No extension in $filename"; $type = $1; } $type = uc $type; my $in; if ($type eq 'PFA') { open($in, '<:raw', $filename) or croak "Unable to open $filename: $!"; } elsif ($type eq 'PFB') { open($in, '-|:raw', $t1ascii, $filename) or croak "Unable to run $t1ascii $filename: $!"; } elsif ($type eq 'TTF') { open($in, '-|:raw', $ttftotype42, $filename) or croak "Unable to run $ttftotype42 $filename: $!"; # Type 42 was introduced in LanguageLevel 2: $o->set_min_langlevel(2); } my $content = do { local $/; <$in> }; # Read entire file close $in; $content =~ s/\r\n?/\n/g; # CR or CRLF to LF $content =~ m!/FontName\s+/(\S+)\s+def\b! or croak "Unable to find font name in $filename"; my $fontName = $1; $o->add_resource(Font => $fontName, undef, $content); return $fontName; } # end embed_font sub need_resource { my $o = shift; my $type = shift; croak "Unknown resource type $type" unless exists $add_resource_accepts{$type}; my $hash = $o->{needed}{$type} ||= {}; foreach my $res (@_) { $hash->{ $o->encode_text( join(' ', map { $o->quote_text($_) } (ref $res ? @$res : $res)) )} = 1; } # end foreach $res } # end need_resource sub get_setup { my $o = shift; return $o->{Setup}; } sub add_setup { my ($o, $entry) = @_; $o->strip($entry); $o->{Setup} .= $o->encode_text($entry) if (defined $entry); } sub get_page_setup { my $o = shift; return $o->{PageSetup}; } sub add_page_setup { my ($o, $entry) = @_; $o->strip($entry); $o->{PageSetup} .= $o->encode_text($entry) if (defined $entry); } sub get_page { my $o = shift; my $page = shift || $o->get_page_label(); my $ord = $o->_get_ordinal($page); return $o->{Pages}->[$ord]; } sub add_to_page { my $o = shift; my $page = (@_ == 2) ? shift : ""; my $entry = shift || ""; if ($page) { my $ord = $o->_get_ordinal($page); if (($ord == $o->{p}) and ($page ne $o->{page}[$ord])) { $o->newpage($page); } else { $o->{p} = $ord; } } $o->strip($entry); $o->{Pages}[$o->{p}] .= $o->encode_text($entry); } sub get_page_trailer { my $o = shift; return $o->{PageTrailer}; } sub add_page_trailer { my ($o, $entry) = @_; $o->strip($entry); $o->{PageTrailer} .= $o->encode_text($entry) if (defined $entry); } sub get_trailer { my $o = shift; return $o->{Trailer}; } sub add_trailer { my ($o, $entry) = @_; $o->strip($entry); $o->{Trailer} .= $o->encode_text($entry) if (defined $entry); } #============================================================================= sub draw_bounding_box { my $o = shift; $o->{clipcmd} = "stroke"; } sub clip_bounding_box { my $o = shift; $o->{clipcmd} = "clip"; } # Strip leading spaces off a here document: sub _here_doc { my ($o, $text) = @_; if ($o->{strip_type} ne 'none') { $o->strip($text); } elsif ($text =~ /^([ \t]+)/) { my $space = $1; $text =~ s/^$space//gm; $text =~ s/^[ \t]+\n/\n/gm; } # end elsif no strip but $text is indented $o->encode_text($text); } # end _here_doc sub incpage_label ($) { ## no critic (ProhibitSubroutinePrototypes) my $page = shift; return ++$page; } #--------------------------------------------------------------------- our $roman_max = 40; our @roman = qw(0 i ii iii iv v vi vii viii ix x xi xii xiii xiv xv xvi xvii xviii xix xx xi xxii xxii xxiii xxiv xxv xxvi xxvii xxviii xxix xxx xxi xxxii xxxii xxxiii xxxiv xxxv xxxvi xxxvii xxxviii xxxix ); our %roman = (); for (my $i = 1; $i <= $roman_max; $i++) { $roman{$roman[$i]} = $i; } sub incpage_roman ($) { ## no critic (ProhibitSubroutinePrototypes) my $page = shift; my $pos = $roman{$page}; return $roman[++$pos]; } #--------------------------------------------------------------------- sub check_file ($;$$) { ## no critic (ProhibitSubroutinePrototypes) my ($filename, $dir, $create) = @_; $create = 0 unless (defined $create); if (not defined $filename or not length $filename) { $filename = File::Spec->devnull(); } else { $filename = check_tilde($filename); $filename = File::Spec->canonpath($filename); unless (File::Spec->file_name_is_absolute($filename)) { if (defined($dir)) { $dir = check_tilde($dir); $dir = File::Spec->canonpath($dir); $dir = File::Spec->rel2abs($dir) unless (File::Spec->file_name_is_absolute($dir)); $filename = File::Spec->catfile($dir, $filename); } else { $filename = File::Spec->rel2abs($filename); } } my @subdirs = (); my ($volume, $directories, $file) = File::Spec->splitpath($filename); @subdirs = File::Spec->splitdir( $directories ); my $path = $volume; foreach my $dir (@subdirs) { $path = File::Spec->catdir( $path, $dir ); mkdir $path unless (-d $path); } $filename = File::Spec->catfile($path, $file); if ($create) { unless (-e $filename) { open(my $file, ">", $filename) or die "Unable to open \'$filename\' for writing : $!\nStopped"; close $file; } } } return $filename; } sub check_tilde ($) { ## no critic (ProhibitSubroutinePrototypes) my ($dir) = @_; $dir = "" unless defined $dir; $dir =~ s{^~([^/]*)}{$1 ? (getpwnam($1))[7] : ($ENV{HOME} || $ENV{LOGDIR} || (getpwuid($>))[7]) }ex; return $dir; } sub array_as_string (@) { ## no critic (ProhibitSubroutinePrototypes) my $array = "[ "; foreach my $f (@_) { $array .= "$f "; } $array .= "]"; return $array; } sub str ($) { ## no critic (ProhibitSubroutinePrototypes) my $arg = shift; if (ref($arg) eq "ARRAY") { return array_as_string( @$arg ); } else { return $arg; } } #--------------------------------------------------------------------- my %special = ( "\n" => '\n', "\r" => '\r', "\t" => '\t', "\b" => '\b', "\f" => '\f', "\\" => "\\\\", "(" => '\(', ")" => '\)', ); my $specialKeys = join '', keys %special; $specialKeys =~ s/\\/\\\\/; # Have to quote backslash sub pstr { my $o; $o = shift if @_ > 1; # We were called as a method my $string = shift; my $nowrap = shift; # Pass this ONLY when method call # Possibly convert \x2D (hyphen-minus) to hyphen or minus sign: $string = $o->convert_hyphens($string) if ref $o and $o->{auto_hyphen} and $string =~ /-/; # Now form the parenthesized string: $string =~ s/([$specialKeys])/$special{$1}/go; $string = "($string)"; # A PostScript file should not have more than 255 chars per line: $string =~ s/(.{240}[^\\])/$1\\\n/g unless $nowrap; $string =~ s/^([ %])/\\$1/mg; # Make sure it doesn't get stripped $string; } # end pstr sub quote_text { my $o; $o = shift if @_ > 1; # We were called as a method my $string = shift; return $string if $string =~ m(^[-+_./*A-Za-z0-9]+\z); __PACKAGE__->pstr($string, 1); } # end quote_text #============================================================================= 1; __END__ =head1 NAME PostScript::File - Class for creating Adobe PostScript files =head1 VERSION This document describes version 2.20 of PostScript::File, released February 11, 2012 as part of PostScript-File version 2.20. Attributes and methods added since version 2.00 are marked with the version they were added in (e.g. "(v2.10)"). Because there were significant API changes in 2.00, I recommend that any code using PostScript::File specify a minimum version of at least 2. =head1 SYNOPSIS =head2 Simplest A 'hello world' program: use PostScript::File 2; my $ps = PostScript::File->new(reencode => 'cp1252'); $ps->add_to_page( <output( "test" ); =head2 All options my $ps = PostScript::File->new( paper => 'Letter', height => 500, width => 400, bottom => 30, top => 30, left => 30, right => 30, clip_command => 'stroke', clipping => 1, eps => 1, dir => '~/foo', file => "bar", landscape => 0, headings => 1, reencode => 'cp1252', font_suffix => '-iso', need_fonts => [qw(Helvetica Helvetica-Bold)], errors => 1, errmsg => 'Failed:', errfont => 'Helvetica', errsize => 12, errx => 72, erry => 300, debug => 2, db_active => 1, db_xgap => 120, db_xtab => 8, db_base => 300, db_ytop => 500, db_color => '1 0 0 setrgbcolor', db_font => 'Times-Roman', db_fontsize => 11, db_bufsize => 256, ); =head1 DESCRIPTION PostScript::File is a class that writes PostScript files following Adobe's Document Structuring Conventions (DSC). You should be familiar with the DSC if you're using this class directly; consult the I linked to in L. There are also a number of modules that build upon PostScript::File to produce various kinds of documents without requiring knowledge of PostScript. These are listed in L. It is possible to construct and output files in either normal PostScript (*.ps files) or as Encapsulated PostScript (*.epsf or *.epsi files). By default a minimal file is output, but support for font encoding, PostScript error reporting and debugging can be built in if required. Documents can typically be built using only these functions: new The constructor, with many options add_procset Add PostScript functions to the prolog add_to_page Add PostScript to construct each page newpage Begins a new page in the document output Construct the file and saves it The rest of the module involves fine-tuning this. Some settings only really make sense when given once, while others can control each page independently. See C for the functions that duplicate option settings, they all have C counterparts. The following provide additional support. get/set_bounding_box get/set_page_bounding_box get/set_page_clipping get/set_page_landscape set_page_margins get_pagecount draw_bounding_box clip_bounding_box The functions which insert entries into each of the DSC sections all begin with 'add_'. They also have C counterparts. add_comment add_preview add_default add_resource add_procset add_setup add_page_setup add_to_page add_page_trailer add_trailer Finally, there are a few stand-alone functions. These are not methods and are available for export if requested. check_tilde check_file incpage_label incpage_roman =head2 Hyphens and Minus Signs In ASCII, the character C<\x2D> (C<\055>) is used as both a hyphen and a minus sign. Unicode calls this character HYPHEN-MINUS (U+002D). PostScript has two characters, which it calls C and C. The difference is that C is usually wider than C (except in Courier, of course). In PostScript's StandardEncoding (what you get if you don't use L), character C<\x2D> is C, and C is not available. In the Latin1-based encodings created by C, character C<\x2D> is C, and character C<\xAD> is C. (C<\xAD> is supposed to be a "soft hyphen" (U+00AD) that appears only if the line is broken at that point, but it doesn't work that way in PostScript.) Unicode has additional non-ambiguous characters: HYPHEN (U+2010), NON-BREAKING HYPHEN (U+2011), and MINUS SIGN (U+2212). The first two always indicate C, and the last is always C. When you set C to C or C, those characters will be handled automatically. To make it easier to handle strings containing HYPHEN-MINUS, PostScript::File provides the L attribute. When this is true (the default when using C or C), the L method will automatically translate HYPHEN-MINUS to either HYPHEN or MINUS SIGN. (This happens only when C is called as an object method.) The rule is that if a HYPHEN-MINUS is surrounded by whitespace, or surrounded by digits, or it's preceded by whitespace or punctuation and followed by a digit, or it's followed by a currency symbol, it's translated to MINUS SIGN. Otherwise, it's translated to HYPHEN. =head1 ATTRIBUTES Unlike many classes that use the same method for reading and writing an attribute's value, PostScript::File has separate methods for reading and writing. The read accessor is prefixed with C, and the write accessor is prefixed with C. If no write accessor is mentioned, then the attribute is read-only. =head3 auto_hyphen $ps = PostScript::File->new( auto_hyphen => $translate ) $translate = $ps->get_auto_hyphen $ps->set_auto_hyphen( $translate ) If C<$translate> is a true value, then L will do automatic hyphen-minus translation when called as an object method (but only if the document uses character set translation). (Default: true) See L. =head3 clipping $ps = PostScript::File->new( clipping => $clipping ) $clipping = $ps->get_clipping $ps->set_clipping( $clipping ) If C<$clipping> is true, printing will be clipped to each page's bounding box. This is the document's default value. Each page has its own L attribute, which is initialized to this default value when the page is created. (Default: false) =head3 eps $ps = PostScript::File->new( eps => $eps ) $eps = $ps->get_eps C<$eps> is true if this is an Encapsulated PostScript document. False indicates an ordinary PostScript document. =head3 extensions $ps = PostScript::File->new( extensions => $extensions ) $extensions = $ps->get_extensions The PostScript extensions required by this document, for use in the C<%%Extensions> DSC comment. (Default: C, meaning omit the C<%%Extensions> comment) =head3 file_ext $ps = PostScript::File->new( file_ext => $file_ext ) $file_ext = $ps->get_file_ext $ps->set_file_ext( $file_ext ) If C<$file_ext> is undef (the default), then the extension is set automatically based on the output type. C<.ps> will be added for ordinary PostScript files. EPS files have an extension of C<.epsf> without or C<.epsi> with a preview image. If C<$file_ext> is the empty string, then no extension will be added to the filename. Otherwise, it should be a string like '.ps' or '.eps'. (But setting this has no effect on the actual type of the output file, only its name.) =head3 filename $ps = PostScript::File->new( file => $file, [dir => $dir] ) $filename = $ps->get_filename $ps->set_filename( $file, [$dir] ) =over 4 =item C<$file> An optional fully qualified path-and-file, a simple file name, the empty string (which stands for the special file C<< File::Spec->devnull >>), or C (which indicates the document has no associated filename). =item C<$dir> An optional directory name. If present (and C<$file> is not already an absolute path), it is prepended to C<$file>. If no C<$file> was specified, C<$dir> is ignored. =back The base filename for the output file(s). When the filename is set, if that filename includes a directory component, the directories are created immediately (if they don't already exist). See L for details on how the filename extension is handled. If L has been set, multiple pages will have the page label appended to the file name. Example: $ps = PostScript::File->new( eps => 1 ); $ps->set_filename( "pics", "~/book" ); $ps->newpage("vi"); ... draw page $ps->newpage("7"); ... draw page $ps->newpage(); ... draw page $ps->output(); The three pages for user 'chris' on a Unix system would be: /home/chris/book/pics-vi.epsf /home/chris/book/pics-7.epsf /home/chris/book/pics-8.epsf It would be wise to use C explicitly for each page if using multiple pages in EPS files. =head3 incpage_handler $ps = PostScript::File->new( incpage_handler => \&handler ) $handler = $ps->get_incpage_handler $ps->set_incpage_handler( [\&handler] ) The function used to increment the page label when creating a new page. C<\&handler> is a reference to a subroutine that takes the current page label as its only argument and returns the new label. This module provides the L (which uses Perl's autoincrement operator) and L (which handles lowercase Roman numberals from i to xxxix, 1-39) functions for use as C. (Default: C<\&incpage_label>) =head3 langlevel $ps = PostScript::File->new( langlevel => $langlevel ) $langlevel = $ps->get_langlevel $ps->set_min_langlevel( $langlevel ) # added in v2.20 The level of the PostScript language used in this document, for use in the C<%%LanguageLevel> DSC comment. The L method can be used to raise the language level, but it cannot be decreased. (Default: C, meaning omit the C<%%LanguageLevel> comment) =head3 order $ps = PostScript::File->new( order => $order ) $order = $ps->get_order The order the pages are defined in the document, for use in the C<%%PageOrder> DSC comment. It must be one of "Ascend", "Descend" or "Special" (meaning a document manager must not reorder the pages). The default is C, meaning omit the C<%%PageOrder> comment. =head3 strip (attribute) $ps = PostScript::File->new( strip => $strip ) $strip = $ps->get_strip $ps->set_strip( $strip ) Determine whether the PostScript code is filtered. C<$strip> must be one of the following values: C strips leading spaces so the user can indent freely without increasing the file size. C removes lines beginning with '%' as well. C (v2.20) also removes comments that aren't at the beginning of a line. See also the L method, which actually does the filtering described here. Passing C or omitting C<$strip> sets it to the default value, C. =head3 title $ps = PostScript::File->new( title => $title ) $title = $ps->get_title The document's title for use in the C<%%Title> DSC comment. The default (C) means to use the document's filename as the title. If no filename is available when the document is output, the C<%%Title> comment wil be omitted. =head3 version $ps = PostScript::File->new( version => $version ) $version = $ps->get_version The document's version for use in the C<%%Version> DSC comment. The C<$version> should be a string in the form S>, where C is a floating point number and C is an unsigned integer. (Default: C, meaning omit the C<%%Version> comment) =head2 Paper Size and Margins These attributes are interrelated, and changing one may change the others. =head3 bounding_box ( $llx, $lly, $urx, $ury ) = $ps->get_bounding_box $ps->set_bounding_box( $llx, $lly, $urx, $ury ) The bounding box for the whole document. The lower left corner is S>, and the upper right corner is S>. Setting the bounding box automatically enables clipping. Call C<< $ps->set_clipping(0) >> afterwards to undo that. The default C is calculated from the paper size (taken from the L, L, and L attributes) and the L, L, L, and L margins. Each page also has an individual L, which is initialized from the document's C when the page is created. =head3 height $ps = PostScript::File->new( height => $height ) $height = $ps->get_height $ps->set_height( $height ) The page height in points. This is normally the longer dimension of the paper. Note that in landscape mode this is actually the width of the bounding box. Setting this sets L to "Custom" and the L is expanded to the full height. =head3 landscape $ps = PostScript::File->new( landscape => $landscape ) $landscape = $ps->get_landscape $ps->set_landscape( $landscape ) If C<$landscape> is true, the page is rotated 90 degrees counter-clockwise, swapping the meaning of height & width. (Default: false) In landscape mode the coordinates are rotated 90 degrees and the origin moved to the bottom left corner. Thus the coordinate system appears the same to the user, with the origin at the bottom left. =head3 paper $ps = PostScript::File->new( paper => $paper_size ) $paper_size = $ps->get_paper $ps->set_paper( $paper_size ) Set the paper size of each page. A document can be created using a standard paper size without having to remember the size of paper using PostScript points. Valid choices are currently A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, Executive, Folio, Half-Letter, Letter, US-Letter, Legal, US-Legal, Tabloid, SuperB, Ledger, 'Comm #10 Envelope', Envelope-Monarch, Envelope-DL, Envelope-C5, and EuroPostcard. (Default: "A4") You can also give a string in the form 'WIDTHxHEIGHT', where WIDTH and HEIGHT are numbers (in points). This sets the paper size to "Custom". Setting this also sets L, L, and L to the full height and width of the paper. =head3 width $ps = PostScript::File->new( width => $width ) $width = $ps->get_width $ps->set_width( $width ) The page width in points. This is normally the shorter dimension of the paper. Note that in landscape mode this is actually the height of the bounding box. Setting this sets L to "Custom" and the L is expanded to the full width. =head2 Page Attributes The following attributes can have a different value for every page. You can't set them directly in the constructor, but they all have a document-wide default value that each page inherits when it is created. When accessing or setting them, C<$page> is the page label. If C<$page> is omitted, it defaults to the current page. =head3 page_bounding_box ( $llx, $lly, $urx, $ury ) = $ps->get_page_bounding_box( [$page] ) $ps->set_page_bounding_box( [$page,] $llx, $lly, $urx, $ury ) The bounding box for this page. The lower left corner is S>, and the upper right corner is S>. Note that calling C automatically enables clipping for that page. If this isn't what you want, call C<< $ps->set_page_clipping(0) >> afterwards. When a page is created, C is initialized from the document's L attribute. =head3 page_clipping $clipping = $ps->get_page_clipping( [$page] ) $ps->set_page_clipping( [[$page,] $clipping] ) If C<$clipping> is true, printing will be clipped to this page's bounding box. (Default: false) When a page is created, C is initialized from the document's L attribute. =head3 page_label $ps = PostScript::File->new( page => $page ) $page = $ps->get_page_label $ps->set_page_label( [$page] ) The label for the current page (used in the C<%%Page> comment). (Default: "1") Unlike the other page attributes, you can only access the C of the current page. (Since pages are specified by label, it makes no sense to ask for the label of a different page.) When a page is created, C is initialized by passing the previous page's label to the L. For the first page, it's initialized from the C given to the constructor. =head3 page_landscape $landscape = $ps->get_page_landscape( [$page] ) $ps->set_page_landscape( [[$page,] $landscape] ) If C<$landscape> is true, this page is using landscape mode. (Default: false) When a page is created, C is initialized from the document's L attribute. =head1 METHODS Note: In the following descriptions, C<[]> are used to denote optional parameters, I array references. =head2 Constructor =head3 new $ps = PostScript::File->new(options) Create a new PostScript::File object, either a set of pages or an Encapsulated PostScript (EPS) file. Options are hash keys and values. All values should be in the native PostScript units of 1/72 inch. Example $ps = PostScript::File->new( eps => 1, landscape => 1, width => 216, height => 288, left => 36, right => 44, clipping => 1, ); This creates an Encapsulated PostScript document, 4 by 3 inch pages printing landscape with left and right margins of around half an inch. The width is always the shortest side, even in landscape mode. 3*72=216 and 4*72=288. Being in landscape mode, these would be swapped. The bounding box used for clipping would then be from (50,0) to (244,216). C may be a single hash reference instead of an options list, but the hash must have the same structure. This is more convenient when used as a base class. The following keys are recognized options: =head3 Attributes The following attributes can be set through the constructor: L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, and L. =head3 File size keys There are four options which control how much gets put into the resulting file. =head4 debug =over 6 =item C No debug code is added to the file. Of course there must be no calls to debug functions in the PostScript code. This is the default. =item C<0> B functions are replaced by dummy functions which do nothing. =item C<1> A range of functions are added to the file to support debugging PostScript. This switch is similar to the 'C' C macro in that debugging statements may be left in the PostScript code but their effect is removed. Of course, being an interpreted language, it is not quite the same as the calls still takes up space - they just do nothing. See L for details of the functions. =item C<2> Loads the debug functions and gives some reassuring output at the start and a stack dump at the end of each page. A mark is placed on the stack at the beginning of each page and 'cleartomark' is given at the end, avoiding potential C errors. Note, however, that if the page does not end with a clean stack, it will fail when debugging is turned off. =back =head4 errors PostScript has a nasty habit of failing silently. If C is true, code that prints fatal error messages on the bottom left of the paper is added to the file. For user functions, a PostScript function B is defined. This expects a message string on the stack, which it prints before stopping. (Default: true) =head4 headings If true, add PostScript DSC comments recording the date of creation and user's name. (Default: false) The comments inserted when C is true are: %%For: USER@HOSTNAME %%Creator: Perl module PostScript::File v2.20 %%CreationDate: Sun Jan 1 00:00:00 2012 %%DocumentMedia: US-Letter 612 792 80 ( ) ( ) USER comes from C, and HOSTNAME comes from L. The DocumentMedia values come from the L. The DocumentMedia comment is omitted from EPS files. If you want different values, leave C false and use L to add whatever you want. =head4 reencode Requests that a font re-encode function be added and that the fonts used by this document get re-encoded in the specified encoding. The only allowed values are C, C, and C. You should almost always set this to C, even if you are not using Windows. The list of fonts to re-encode comes from the L parameter, the L method, and all fonts added using L or L. The Symbol font is never re-encoded, because it uses a non-standard character set. Setting this to C or C also causes the document to be encoded in that character set. Any strings you add to the document that have the UTF-8 flag set will be reencoded automatically. Strings that do not have the UTF-8 flag are expected to be in the correct character set already. This means that you should be able to set this to C, use Unicode characters in your code and the "-iso" versions of the fonts, and just have it do the right thing. Windows code page 1252 (a.k.a. WinLatin1) is a superset of the printable characters in ISO-8859-1 (a.k.a. Latin1). It adds a number of characters that are not in Latin1, especially common punctuation marks like the curly quotation marks, en & em dashes, Euro sign, and ellipsis. These characters exist in the standard PostScript fonts, but there's no easy way to access them when using the standard or ISOLatin1 encodings. L For backwards compatibility with versions of PostScript::File older than 1.05, setting this to C reencodes the fonts, but does not do any character set translation in the document. =head3 Initialization keys There are a few initialization settings that are only relevant when the file object is constructed. =head4 bottom The margin in from the paper's bottom edge, specifying the non-printable area. Remember to specify C if that is what is wanted. (Default: 28) =head4 clip_command The bounding box is used for clipping if this is set to "clip" or is drawn with "stroke". This also makes the whole page area available for debugging output. (Default: "clip"). =head4 font_suffix This string is appended to each font name as it is reencoded. (Default: "-iso") The string value is appended to these to make the new names. Example: $ps = PostScript::File->new( font_suffix => "-iso", reencode => "cp1252" ); "Courier" still has the standard mapping while "Courier-iso" includes the additional European characters. =head4 left The margin in from the paper's left edge, specifying the non-printable area. Remember to specify C if that is what is wanted. (Default: 28) =head4 need_fonts An arrayref of font names required by this document. This is equivalent to calling C<< $ps->need_resource(font => @$arrayref) >>. See L for details. =head4 newpage (v2.10) Normally, an initial page is created automatically (using the label specified by C). But starting with PostScript::File 2.10, you can pass S 0 >>> to override this. This makes for more natural loops: use PostScript::File 2.10; my $ps = PostScript::File->new(newpage => 0); for (@pages) { $ps->newpage; # don't need "unless first page" ... } It's important to require PostScript::File 2.10 if you do this, because older versions would produce an initial blank page. If you don't pass a page label to the first call to C, it will be taken from the C option. After the first page, the page label will increment as specified by L. =head4 right The margin in from the paper's right edge. It is a positive offset, so C will leave a half inch no-go margin on the right hand side of the page. Remember to specify C if that is what is wanted. (Default: 28) =head4 top The margin in from the paper's top edge. It is a positive offset, so C will leave a half inch no-go margin at the top of the page. Remember to specify C if that is what is wanted. (Default: 28) =head3 Debugging support keys This makes most sense in the PostScript code rather than Perl. However, it is convenient to be able to set defaults for the output position and so on. See L for further details. =head4 db_active Set to 0 to temporarily suppress the debug output. (Default: 1) =head4 db_base Debug printing will not occur below this point. (Default: 6) =head4 db_bufsize The size of string buffers used. Output must be no longer than this. (Default: 256) =head4 db_color This is the whole PostScript command (with any parameters) to specify the colour of the text printed by the debug routines. (Default: "0 setgray") =head4 db_font The name of the font to use. (Default: "Courier") Courier Courier-Bold Courier-BoldOblique Courier-Oblique Helvetica Helvetica-Bold Helvetica-BoldOblique Helvetica-Oblique Times-Roman Times-Bold Times-BoldItalic Times-Italic Symbol =head4 db_fontsize The size of the font. PostScript uses its own units, but they are almost points. (Default: 10) =head4 db_xgap Typically, the output comprises single values such as a column showing the stack contents. C specifies the width of each column. By default, this is calculated to allow 4 columns across the page. =head4 db_xpos The left edge, where debug output starts. (Default: 6) =head4 db_xtab The amount indented by C. (Default: 10) =head4 db_ytop The top line of debugging output. Defaults to 6 below the top of the page. =head3 Error handling keys If C is set, the position of any fatal error message can be controlled with the following options. Each value is placed into a PostScript variable of the same name, so they can be overridden from within the code if necessary. =head4 errfont The name of the font used to show the error message. (Default: "Courier-Bold") =head4 errmsg The error message comprises two lines. The second is the name of the PostScript error. This sets the first line. (Default: "ERROR:") =head4 errsize Size of the error message font. (Default: 12) =head4 errx X position of the error message on the page. (Default: (72)) =head4 erry Y position of the error message on the page. (Default: (72)) =head2 Main Methods =head3 newpage $ps->newpage( [$page] ) Generate a new PostScript page, unless in a EPS file when it is ignored. If C<$page> is not specified the previous page's label is incremented using the L. =head3 output $ps->output( [$file, [$dir]] ) If C<$file> is an open filehandle, write the PostScript document to that filehandle and return nothing. If a filename has been given either here, to C, or to C, write the PostScript document to that file and return its pathname. (C<$file> and C<$dir> have the same meaning here as they do in L.) If no filename has been given, or C<$file> is undef, return the PostScript document as a string. In C mode, each page of the document becomes a separate EPS file. In list context, returns a list of these files (either the pathname or the PostScript code as explained above). In scalar context, only the first page is returned (but all pages will still be processed). If you pass a filehandle when you have multiple pages, all the documents are written to that filehandle, which is probably not what you want. Use this option whenever output is required to disk. The current PostScript document in memory is not cleared, and can still be extended or output again. =head3 as_string $postscript_code = $ps->as_string This returns the PostScript document as a string. It is equivalent to C<< $ps->output(undef) >>. =head3 testable_output $postscript_code = $ps->testable_output( [$verbatim] ) This returns the PostScript document as a string, but with the PostScript::File generated code removed (unless C<$verbatim> is true). This is intended for use in test scripts, so they won't see changes in the output caused by different versions of PostScript::File. The PostScript code returned by this method will probably not work in a PostScript interpreter. If C<$verbatim> is true, this is equivalent to C<< $ps->output(undef) >>. =head2 Access Methods Use these C and C methods to access a PostScript::File object's data. =head3 get_metrics $metrics = $ps->get_metrics( $font, [$size, [$encoding]] ) Construct a L object for C<$font>. The C<$encoding> is normally determined automatically from the font name and the document's encoding. The default C<$size> is 1000. If this document uses L, and the font ends with L, then the Metrics object will use that encoding. Otherwise, the encoding is C (except for the Symbol font, which always uses C). No matter what encoding the font uses, the Metrics object will always use the same Unicode translation setting as this document. It also inherits the current value of the L attribute. =head3 set_min_langlevel $new_langlevel = $ps->set_min_langlevel( $langlevel ) (v2.20) Set the L attribute of this document to C<$langlevel>, but only if the current level is less than C<$langlevel>. It returns the value of C, which will be greater than or equal to C<$langlevel>. =head3 set_page_margins $ps->set_page_margins( [$page,] $left, $bottom, $right, $top ) This sets the L based on the paper size and the specified margins. It also automatically enables clipping for the page. If this isn't what you want, call C<< $ps->set_page_clipping(0) >> afterwards. =head3 get_page_printable_height $height = $ps->get_page_printable_height( [$page] ) (v2.10) Returns the height of the page's bounding box (S>). =head3 get_page_printable_width $width = $ps->get_page_printable_width( [$page] ) (v2.10) Returns the width of the page's bounding box (S>. =head3 get_page_variable $value = $ps->get_page_variable( $key ) Retrieve a user defined value previously assigned by L. =head3 set_page_variable $ps->set_page_variable( $key, $value ) Assign a user defined hash key and value only valid on the current page. Provided to keep track of states within the PostScript code, such as which styles are currently active. PostScript::File does not use this (except to clear it at the start of each page). It is recommended that C<$key> is the module name to avoid clashes. The C<$value> could then be a hash holding any number of user variables. =head3 get_pagecount $pages = $ps->get_pagecount Returns the number of pages currently in the document. =head3 get_printable_height $height = $ps->get_printable_height (v2.10) Returns the height of the document's bounding box (S>). =head3 get_printable_width $width = $ps->get_printable_width (v2.10) Returns the width of the document's bounding box (S>). =head3 get_variable $value = $ps->get_variable( $key ) Retrieve a user defined value previously assigned by L. =head3 set_variable $ps->set_variable( $key, $value ) Assign a user defined hash key and value. Provided to keep track of states within the PostScript code, such as which dictionaries are currently open. PostScript::File does not use this - it is provided for client programs. It is recommended that C<$key> is the module name to avoid clashes. The C<$value> could then be a hash holding any number of user variables. =head2 Content Methods =head3 add_comment $ps->add_comment( $comment ) Append a comment to the document's DSC comments section. Most of the required and recommended comments are set directly from the document's attributes, so this method should rarely be needed. It is provided for completeness so that comments not otherwise supported can be added. C<$comment> should contain the bare PostScript DSC name and value, with additional lines merely prefixed by C<+>. It should NOT end with a newline. Programs written for older versions of PostScript::File might use this to add a C comment. That is now deprecated; you should use L instead. Examples: $ps->add_comment("ProofMode: NotifyMe"); $ps->add_comment("Requirements: manualfeed"); =head3 get_comments $comments = $ps->get_comments Retrieve any extra DSC comments added by L. =head3 add_default $ps->add_default( $default ) Use this to append a PostScript DSC comment to the Defaults section. These would be typically values like C or C. The format is the same as for L. =head3 get_defaults $comments = $ps->get_defaults Returns the contents of the DSC Defaults section, if any. =head3 embed_document $code = $ps->embed_document( $filename ) This reads the contents of C<$filename>, which should be a PostScript file. It returns a string with the contents of the file surrounded by C<%%BeginDocument> and C<%%EndDocument> comments, and adds C<$filename> to the list of document supplied resources. You must pass the returned string to add_to_page or some other method that will actually include it in the document. =head3 embed_font $font_name = $ps->embed_font( $filename, [$type] ) This reads the contents of C<$filename>, which must contain a PostScript font. It calls L to add the font to the document, and returns the name of the font (without a leading slash). If C<$type> is omitted, the C<$filename>'s extension is used as the type. Type names are not case sensitive. The currently supported types are: =over =item PFA A PostScript font in ASCII format =item PFB A PostScript font in binary format. This requires the t1ascii program from L. (You can set C<$PostScript::File::t1ascii> to the name of the program to use. It defaults to F.) =item TTF A TrueType font. This requires the ttftotype42 program from L. (You can set C<$PostScript::File::ttftotype42> to the name of the program to use. It defaults to F.) Since TrueType (a.k.a. Type42) font support was introduced in PostScript level 2, embedding a TTF font automatically sets C to 2 (unless it was already set to a higher level). Be aware that not all printers can handle Type42 fonts. (Even PostScript level 2 printers need not support them.) Ghostscript does support Type42 fonts (when compiled with the C option). =back =head3 need_resource $ps->need_resource( $type, @resources ) This adds resources to the DocumentNeededResources comment. C<$type> is one of C, C, C, C
, C, or C (case sensitive). Any number of resources (of a single type) may be added in one call. For most types, C<$resource[N]> is just the resource name. But for C, each element of C<@resources> should be an arrayref of 3 elements: C<[$name, $version, $revision]>. Names that contain special characters such as spaces will be quoted automatically. If C is never called for the C type (and L is not used), it assumes the document requires all 13 of the standard PostScript fonts: Courier, Courier-Bold, Courier-BoldOblique, Courier-Oblique, Helvetica, Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique, Times-Roman, Times-Bold, Times-BoldItalic, Times-Italic, and Symbol. But this behaviour is deprecated; a document should explicitly list the fonts it requires. If you don't use any of the standard fonts, pass S [] >>> to the constructor (or call C<< $ps->need_resource('font') >>) to indicate that. =head3 add_to_page $ps->add_to_page( [$page,] $code ) This appends C<$code> to the specified C<$page>, which can be any page label. (Default: the current page) If the specified C<$page> does not exist, a new page is added with that label. Note that this is added on the end, not in the order you might expect. So adding "vi" to page set "iii, iv, v, 6, 7, 8" would create a new page after "8" not after "v". Examples $ps->add_to_page( <add_to_page( "3", <get_page( [$page] ) Returns the PostScript code from the body of the page. =head3 add_page_setup $ps->add_page_setup( $code ) Appends C<$code> to the DSC PageSetup section. Note that this is a document-global value, although the code will be repeated on each page. Also note that any settings defined here will be active for each page seperately. Use L if you want to carry settings from one page to another. =head3 get_page_setup $setup = $ps->get_page_setup Returns the contents of the DSC PageSetup section, if any. Note that this is a document-global value, although the code will be repeated on each page. =head3 add_page_trailer $ps->add_page_trailer( $code ) Appends C<$code> to the DSC PageTrailer section. Note that this is a document-global value, although the code will be repeated on each page. Code added here is output after each page. It may refer to settings made during L or L. =head3 get_page_trailer $code = $ps->get_page_trailer Returns the contents of the DSC PageTrailer section, if any. Note that this is a document-global value, although the code will be repeated on each page. =head3 add_preview $ps->add_preview( $width, $height, $depth, $lines, $preview ) Sets the EPSI format preview for this document - an ASCII representation of a bitmap. Only EPS files should have a preview, but that is not enforced. If an EPS file has a preview it becomes an EPSI file rather than EPSF. =head3 get_preview $preview = $ps->get_preview Returns the EPSI preview of the document, if any, including the C<%%BeginPreview> and C<%%EndPreview> comments. =head3 add_procset $ps->add_procset( $name, $code, [$version, [$revision]] ) (v2.20) Add a ProcSet containing user defined functions to the PostScript prolog. C<$name> is an arbitrary identifier of this resource. C<$code> is a block of PostScript code, usually from a 'here' document. If the document already contains ProcSet C<$name> (as reported by C, then C does nothing. C<$version> is a real number, and C<$revision> is an unsigned integer. They both default to 0. PostScript::File does not make any use of these, but a PostScript document manager may assume that a procset with a higher revision number may be substituted for a procset with the same name and version but a lower revision. Returns true if the ProcSet was added, or false if it already existed. Example $ps->add_procset( "My_Functions", < (in common with the others) will return I user defined functions possibly including those added by other classes. =head3 has_procset $exists = $ps->has_procset( $name ) (v2.20) This returns true if C<$name> has already been included in the file. The name should be identical to that given to L. =for Pod::Coverage add_function get_functions has_function =head3 get_procsets $code = $ps->get_procsets (v2.20) Return all the procsets defined in this document. =head3 add_resource $ps->add_resource( $type, $name, $params, $resource ) =over 4 =item C<$type> A string indicating the DSC type of the resource. It should be one of C, C, C, C, C, C, or C (case sensitive). =item C<$name> An arbitrary identifier of this resource. (For a Font, it must be the PostScript name of the font, without a leading slash.) =item C<$params> Some resource types require parameters. See the Adobe documentation for details. =item C<$resource> A string containing the PostScript code. Probably best provided a 'here' document. =back Use this to add fonts or images (although you may prefer L or L). L is provided for functions. Example $ps->add_resource( "File", "My_File1", "", <get_resources Returns all resources provided by this document. This does not include procsets. =head3 add_setup $ps->add_setup( $code ) This appends C<$code> to the DSC Setup section. Use this for C, C or other settings that initialize the device or document. =head3 get_setup $setup = $ps->get_setup Returns the contents of the DSC Setup section, if any. =head3 add_trailer $ps->add_trailer( $code ) Appends C<$code> to the document's DSC Trailer section. Use this for any tidying up after all the pages are output. =head3 get_trailer $code = $ps->get_trailer Returns the contents of the document's DSC Trailer section, if any. =head3 use_functions $ps->use_functions( @function_names ) This requests that the PostScript functions listed in C<@function_names> be included in this document. See L for a list of available functions. =head2 Text Processing Methods =head3 convert_hyphens $converted_text = $ps->convert_hyphens( $text ) Converts any HYPHEN-MINUS (U+002D) characters in C<$text> to either HYPHEN (U+2010) or MINUS SIGN (U+2212) according to the rules described in L. This has the side-effect of setting the UTF-8 flag on C<$converted_text>. If C<$text> does not have the UTF-8 flag set, it is assumed to be in the document's character encoding. If C<$text> does not contain any HYPHEN-MINUS characters, it is returned as-is. =head3 decode_text $text = $ps->decode_text( $encoded_text, [$preserve_minus] ) This is the inverse of L. It converts C<$encoded_text> from the document's character encoding into Unicode. If C<$encoded_text> already has the UTF-8 flag set, or the document is not using character translation, then it returns C<$encoded_text> as-is. If the optional argument C<$preserve_minus> is true (and C<$encoded_text> is not being returned as-is), then any HYPHEN-MINUS (U+002D) characters in C<$encoded_text> are decoded as MINUS SIGN (U+2212). This ensures that C will treat them as minus signs instead of hyphens. =head3 encode_text $encoded_text = $ps->encode_text( $text ) This returns C<$text> converted to the document's character encoding. If C<$text> does not have the UTF-8 flag set, or the document is not using character translation, then it returns C<$text> as-is. =head3 pstr $code = $ps->pstr( $string, [$nowrap] ) $code = PostScript::File->pstr( $string, [$nowrap] ) $code = pstr( $string ) Converts the string to a PostScript string literal. If the result is more than 240 characters, it will be broken into multiple lines. (A PostScript file should not contain lines with more than 255 characters.) When called as a class or object method, you can pass a second parameter C<$nowrap>. If this optional parameter is true, then the string will not be wrapped, no matter how long it is. When called as an object method, C will do automatic hyphen-minus translation if L is true. This has the side-effect of setting the UTF-8 flag on the returned string. (If the UTF-8 flag was not set on the input string, it will be decoded using the document's character set.) See L. For this reason, C should normally be called as an object method. =head3 strip (method) $ps->strip( $code ) $ps->strip( $strip => @code ) The C method filters PostScript code according to the value of C<$strip>, which can be any valid value for the L attribute. The code is modified in-place; there is no return value. If C<$code> is C, it is left unchanged. When called with a single argument, strips C<$code> according to the current value of the C attribute. =head1 SUBROUTINES =head2 array_as_string $code = array_as_string( @array ) Converts a Perl array to a PostScript array literal. The array elements are used as-is. If you want an array of strings, you should do something like: $code = array_as_string( map { $ps->pstr($_) } @array ) =head2 check_file $pathname = check_file( $file, [$dir, [$create]] ) =over 4 =item C<$file> An optional fully qualified path-and-file or a simple file name. If omitted or the empty string, the special file C<< File::Spec->devnull >> is returned. =item C<$dir> An optional directory path. If defined (and C<$file> is not already an absolute path), it is prepended to C<$file>. =item C<$create> If true, create the file if it doesn't exist already. (Default: false) =back This converts a filename and optional directory to an absolute path, and then creates any directories that don't already exist. Any leading C<~> is expanded to the user's home directory using L. If C<$create> is true, and C<$pathname> does not exist, it is created as an empty file. L is used throughout so file access should be portable. =head2 check_tilde $expanded_path = check_tilde( $path ) Expands a leading C<~> or C<~user> in C<$path> to the home directory. =head2 incpage_label $next_label = incpage_label( $label ) This function applies Perl's autoincrement operator to C<$label> and returns the result. (This means that the magic string autoincrement applies to values that match C.) This function is the default value of the L attribute. =head2 incpage_roman $next_label = incpage_roman( $label ) This function increments lower case Roman numerals. C<$label> must be a value between "i" and "xxxviii" (1 to 38), and C<$next_label> will be "ii" to "xxxix" (2 to 39). That should be quite enough for numbering the odd preface. This function is normally used as the value of the L attribute: $ps->set_incpage_handler( \&PostScript::File::incpage_roman ) =head2 quote_text $quoted = quote_text( $string ) $quoted = PostScript::File->quote_text( $string ) $quoted = $ps->quote_text( $string ) Quotes the string if it contains special characters, making it suitable for a DSC comment. Strings without special characters are returned unchanged. This may also be called as a class or object method, but it does not do hyphen-minus translation, even if L is true. =head2 str $code = str( $value ) If C<$value> is an arrayref, returns C. Otherwise, returns C<$value> as-is. This function was designed to simplify passing colors to the PostScript function L, which expects either an RGB array or a greyscale decimal. =head1 POSTSCRIPT DEBUGGING SUPPORT This section documents the PostScript functions which provide debugging output. Please note that any clipping or bounding boxes will also hide the debugging output which by default starts at the top left of the page. Typical C options required for debugging would include the following. $ps = PostScript::File->new ( errors => "page", debug => 2, clipcmd => "stroke" ); The debugging output is printed on the page being drawn. In practice this works fine, especially as it is possible to move the output around. Where the text appears is controlled by a number of PostScript variables, most of which may also be given as options to C. The main controller is C which needs to be non-zero for any output to be seen. It might be useful to set this to 0 in C, then at some point in your code enable it. Remember that the C dictionary needs to be selected in order for any of its variables to be changed. This is better done with C but it illustrates the point. /debugdict begin /db_active 1 def end (this will now show) db_show At any time, the next output will appear at C and C. These can of course be set directly. However, after most prints, the equivalent of a 'newline' is executed. It moves down C and left to C. If, however, that would take it below C, C is reset to C and the x coordinate will have C added to it, starting a new column. The positioning of the debug output is changed by setting C and C to the top left starting position, with C guarding the bottom. Extending to the right is controlled by not printing too much! Judicious use of C can help there. =head2 PostScript functions =head3 x0 y0 x1 y1 B This function is only available if 'clipping' is set. By calling the Perl method C (and resetting with C) it is possible to use this to identify areas on the page. $ps->draw_bounding_box(); $ps->add_to_page( <clip_bounding_box(); =head3 msg B If 'errors' is enabled, this call allows you to report a fatal error from within your PostScript code. It expects a string on the stack and it does not return. All the C variables (including function names) are defined within their own dictionary (C). But this can be ignored by all calls originating from within code passed to C (usually including C code) as the dictionary is automatically put on the stack before each page and taken off as each finishes. =head3 any B The workhorse of the system. This takes the item off the top of the stack and outputs a string representation of it. So you can call it on numbers or strings and it will show them. Arrays are printed using C and marks are shown as '--mark--'. =head3 n msg B This shows top C items on the stack. It requires a number and a string on the stack, which it removes. It prints out C then the top C items on the stack, assuming there are that many. It can be used to do a labelled stack dump. Note that if C was given the option C 2>, There will always be a '--mark--' entry at the base of the stack. See L. count (at this point) db_nshow =head3 B Prints out the contents of the stack. No stack requirements. The stack contents is printed top first, the last item printed is the lowest one inspected. =head3 array B The closest this module has to a print statement. It takes an array of strings and/or numbers off the top of the stack and prints them with a space in between each item. [ (myvar1=) myvar1 (str2=) str2 ] db_print will print something like the following. myvar= 23.4 str2= abc When printing something from the stack you need to take into account the array-building items, too. In the next example, at the point '2 index' fetches 111, the stack holds '222 111 [ (top=)' but 'index' requires 5 to get at 222 because the stack now holds '222 111 [ (top=) 111 (next=)'. 222 111 [ (top=) 2 index (next=) 5 index ] db_print willl output this. top= 111 next= 222 It is important that the output does not exceed the string buffer size. The default is 256, but it can be changed by giving C the option C. =head3 x y msg B It is common to have coordinates as the top two items on the stack. This call inspects them. It pops the message off the stack, leaving x and y in place, then prints all three. 450 666 (starting point=) db_print moveto would produce: starting point= ( 450 , 666 ) =head3 array B Like L but the array is printed enclosed within square brackets. =head3 var B A 'where' search is made to find the dictionary containing C. The messages 'found' or 'not found' are output accordingly. Of course, C should be quoted with '/' to put the name on the stack, otherwise it will either be executed or force an error. =head3 B Starts the next debugging column. No stack requirements. =head3 B Enable debug output =head3 B Disable debug output =head3 B Does a 'carriage-return, line-feed'. No stack requirements. =head3 B Moves output right by C. No stack requirements. Useful for indenting output within loops. =head3 B Moves output left by C. No stack requirements. =for Pod::Coverage clip_bounding_box draw_bounding_box =head1 EXPORTS No functions are exported by default. All the functions listed in L may be exported by request. In addition, the C method may be exported as a subroutine, but this usage is deprecated. =head1 BUGS AND LIMITATIONS When making EPS files, the landscape transformation throws the coordinates off. To work around this, avoid the landscape flag and set width and height differently. Most of these functions have only had a couple of tests, so please feel free to report all you find. =head1 AUTHOR Chris Willmot S >>> Thanks to Johan Vromans for the ISOLatin1Encoding. As of September 2009, PostScript::File is now being maintained by Christopher J. Madsen S >>>. Please report any bugs or feature requests to S >>>, or through the web interface at L You can follow or contribute to PostScript::File's development at L. =head1 COPYRIGHT AND LICENSE Copyright 2002, 2003 Christopher P Willmot. All rights reserved. Copyright 2012 Christopher J. Madsen. All rights reserved. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =head1 SEE ALSO I and I published by Adobe, 1992. L L, for PDF or PNG output. L, for creating monthly calendars. L, for creating tabular reports. L, for printing schedules in a grid format. L, for printing TV listings in a grid format. L, L, L, L, L, L. =for Pod::Coverage get_auto_hyphen get_bounding_box get_clipping get_eps get_extensions get_file_ext get_filename get_height get_incpage_handler get_landscape get_langlevel get_order get_page_bounding_box get_page_clipping get_page_label get_page_landscape get_paper get_strip get_title get_version get_width set_auto_hyphen set_bounding_box set_clipping set_file_ext set_filename set_height set_incpage_handler set_landscape set_page_bounding_box set_page_clipping set_page_label set_page_landscape set_paper set_strip set_width =head1 DISCLAIMER OF WARRANTY BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. =cut libpostscript-file-perl-2.20+dfsg.orig/examples/0000755000175000017500000000000011715743427021214 5ustar gregoagregoalibpostscript-file-perl-2.20+dfsg.orig/examples/minimal.pl0000755000175000017500000000110611715531042023164 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # This example is hereby placed in the public domain. # You may copy from it freely. # # This is a minimal Hello, World for PostScript::File. #--------------------------------------------------------------------- use strict; use warnings; use PostScript::File; my $ps = PostScript::File->new(); $ps->add_to_page( <output("minimal", $ENV{TMP}); libpostscript-file-perl-2.20+dfsg.orig/examples/cp1252.pl0000755000175000017500000000301111715531042022447 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # This example is hereby placed in the public domain. # You may copy from it freely. # # This displays the Windows cp1252 character set. #--------------------------------------------------------------------- use strict; use warnings; use PostScript::File 1.05; # Need cp1252 support my $ps = PostScript::File->new( paper => 'letter', reencode => 'cp1252', # Best available Unicode support (still not much) auto_hyphen => 0, # We don't want any hyphen translation need_fonts => ['Helvetica'], left => 72, top => 72, ); $ps->add_to_page( <get_bounding_box)[0,3]; my $xStep = 26; my $yStep = 24; my $xLeft = $xMar + 50; $y -= 2 * $yStep; for my $i (0 .. 0xF) { $ps->add_to_page(sprintf "%d %d moveto\n%s show\n", $xLeft + $i * $xStep, $y, $ps->pstr(sprintf '%X', $i)); } while ($char < 0x100) { $y -= $yStep; $ps->add_to_page(sprintf "%d %d moveto\n%s show\n", $xMar, $y, $ps->pstr(sprintf '0x%X_', $char/16)); for my $i (0 .. 0xF) { $ps->add_to_page(sprintf "%d %d moveto\n%s show\n", $xLeft + $i * $xStep, $y, $ps->pstr(pack('C', $char++))); } } printf "Wrote %s...\n", $ps->output("cp1252", $ENV{TMP}); libpostscript-file-perl-2.20+dfsg.orig/examples/iso-8859-1.pl0000755000175000017500000000301311715531042023100 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # This example is hereby placed in the public domain. # You may copy from it freely. # # This displays PostScript's slightly modified version of iso-8859-1. #--------------------------------------------------------------------- use strict; use warnings; use PostScript::File 1.05; # Need iso-8859-1 support my $ps = PostScript::File->new( paper => 'letter', reencode => 'iso-8859-1', auto_hyphen => 0, # We don't want any hyphen translation need_fonts => ['Helvetica'], left => 72, top => 72, ); $ps->add_to_page( <get_bounding_box)[0,3]; my $xStep = 26; my $yStep = 24; my $xLeft = $xMar + 50; $y -= 2 * $yStep; for my $i (0 .. 0xF) { $ps->add_to_page(sprintf "%d %d moveto\n%s show\n", $xLeft + $i * $xStep, $y, $ps->pstr(sprintf '%X', $i)); } while ($char < 0x100) { $y -= $yStep; $ps->add_to_page(sprintf "%d %d moveto\n%s show\n", $xMar, $y, $ps->pstr(sprintf '0x%X_', $char/16)); for my $i (0 .. 0xF) { $ps->add_to_page(sprintf "%d %d moveto\n%s show\n", $xLeft + $i * $xStep, $y, $ps->pstr(pack('C', $char++))); } } printf "Wrote %s...\n", $ps->output("iso-8859-1", $ENV{TMP}); libpostscript-file-perl-2.20+dfsg.orig/examples/hello_world.pl0000755000175000017500000000172311715531042024055 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # This example is hereby placed in the public domain. # You may copy from it freely. # # This is a slightly less minimal Hello, World for PostScript::File. #--------------------------------------------------------------------- use strict; use warnings; use PostScript::File 1.05; # Need cp1252 support my $ps = PostScript::File->new( paper => 'letter', reencode => 'cp1252', # Best available Unicode support (still not much) need_fonts => ['Helvetica'], ); # These characters are not in Latin-1, but they are in CP1252: my $ldquo = chr(0x201C); # \N{LEFT DOUBLE QUOTATION MARK} my $rdquo = chr(0x201D); # \N{RIGHT DOUBLE QUOTATION MARK} $ps->add_to_page( <<"END_PAGE" ); /Helvetica-iso findfont 12 scalefont setfont 72 300 moveto (${ldquo}Hello, world!$rdquo) show END_PAGE printf "Wrote %s...\n", $ps->output("hello_world", $ENV{TMP}); libpostscript-file-perl-2.20+dfsg.orig/examples/symbol.pl0000755000175000017500000000324611715531042023052 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # This example is hereby placed in the public domain. # You may copy from it freely. # # This displays PostScript's Symbol font in its default encoding. #--------------------------------------------------------------------- use strict; use warnings; use PostScript::File 1.05; # Need cp1252 support my $ps = PostScript::File->new( paper => 'letter', reencode => 'cp1252', auto_hyphen => 0, # We don't want any hyphen translation need_fonts => [qw(Helvetica Symbol)], left => 72, top => 72, ); $ps->add_to_page( <get_bounding_box)[0,3]; my $xStep = 26; my $yStep = 24; my $xLeft = $xMar + 50; $y -= 2 * $yStep; for my $i (0 .. 0xF) { $ps->add_to_page(sprintf "%d %d moveto\n%s show\n", $xLeft + $i * $xStep, $y, $ps->pstr(sprintf '%X', $i)); } while ($char < 0x100) { $y -= $yStep; $ps->add_to_page(sprintf("lblFont setfont\n%d %d moveto\n%s show\n". "symFont setfont\n", $xMar, $y, $ps->pstr(sprintf '0x%X_', $char/16))); for my $i (0 .. 0xF) { $ps->add_to_page(sprintf "%d %d moveto\n%s show\n", $xLeft + $i * $xStep, $y, $ps->pstr(pack('C', $char++))); } } printf "Wrote %s...\n", $ps->output("symbol", $ENV{TMP}); libpostscript-file-perl-2.20+dfsg.orig/examples/generate_metrics.pl0000755000175000017500000000775711715531042025100 0ustar gregoagregoa#! /usr/bin/perl #--------------------------------------------------------------------- # Copyright 2009 Christopher J. Madsen # # Author: Christopher J. Madsen # Created: 29 Oct 2009 # # This program is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. # # 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 either the # GNU General Public License or the Artistic License for more details. #===================================================================== # # This isn't really an example. It's the program that generates the # files in lib/PostScript/File/Metrics by loading the AFM files and # dumping the results into modules. You shouldn't need to run this # yourself, but you could if for some reason your fonts don't match # the metrics that are supplied with PostScript::File. #--------------------------------------------------------------------- use 5.008; use strict; use warnings; use autodie ':io'; use Data::Dumper; use Path::Class; use PostScript::File; use PostScript::File::Metrics; use PostScript::File::Metrics::Loader; #===================================================================== # Simple package for interpolating into strings: { package In_terpolation; sub TIEHASH { bless $_[1], $_[0] } sub FETCH { $_[0]->($_[1]) } } # end In_terpolation our (%E, %D); tie %E, 'In_terpolation', sub { $_[0] }; # eval tie %D, 'In_terpolation', \&dump_term; # Data::Dumper #===================================================================== my $outDir = dir('lib'); die "where's $outDir\n" unless -d $outDir; my @fonts = qw( Courier Courier-Bold Courier-BoldOblique Courier-Oblique Helvetica Helvetica-Bold Helvetica-BoldOblique Helvetica-Oblique Times-Bold Times-BoldItalic Times-Italic Times-Roman ); # end @fonts my @encodings = qw( std cp1252 iso-8859-1 ); dump_font($_, \@encodings) for @fonts; dump_font(Symbol => ['sym']); #--------------------------------------------------------------------- sub dump_font { my ($font, $encodings) = @_; # Load the AFM file and generate metrics for all encodings: PostScript::File::Metrics::Loader::load($font, $encodings); # Dump the encoding-independent information: my $info = dump_term($PostScript::File::Metrics::Info{$font}); # Clean up the formatting a bit: $info =~ s{(?<='font_bbox' => \[)\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(?=\],)} { $1 $2 $3 $4 }; # Now write out a module for each encoding: foreach my $encoding (@$encodings) { my $package = PostScript::File::Metrics::_get_package_name($font, $encoding); my $fn = $outDir->file(split /::/, "$package.pm"); $fn->dir->mkpath(1); print "Writing $fn\n"; open(my $out, '>', $fn); print $out <<"END HEADER"; # This file was generated by examples/generate_metrics.pl # # It is a data file for PostScript::File::Metrics, containing the # metrics for $font in the $encoding encoding. #--------------------------------------------------------------------- package $package; our \$VERSION = '$PostScript::File::VERSION'; # This file is part of {{\$dist}} {{\$dist_version}} ({{\$date}}) \$PostScript::File::Metrics::Info{$D{$font}} ||= $info; \$PostScript::File::Metrics::Metrics{$D{$font}}{$D{$encoding}} = [ END HEADER my $wx = $PostScript::File::Metrics::Metrics{$font}{$encoding}; print $out ' '; for my $c (0..255) { print $out "\n " if $c and not $c % 16; print $out "$wx->[$c],"; } # end for $c print $out "\n];\n\n__END__\n\n=for Pod::Loom-sections NONE\n"; close $out; } # end foreach $encoding in @$encodings } # end dump_font #--------------------------------------------------------------------- # Dump a single term using Data::Dumper: sub dump_term { my $d = Data::Dumper->new(\@_); my $term = $d->Indent(1)->Sortkeys(1)->Terse(1)->Dump; $term =~ s/\s+\z//; $term; } # end dump_term libpostscript-file-perl-2.20+dfsg.orig/README0000644000175000017500000000472311715531042020250 0ustar gregoagregoaPostScript::File version 2.20, released February 11, 2012 This module produces the outline for an Adobe PostScript file. It provides convenient routines for writing PostScript directly, including reporting PostScript errors and debugging support. Although it may be used independently, the functions provided are also suitable for use in other modules. See one of these modules for a top-level object. PostScript::Calendar PostScript::Report PostScript::Graph::XY PostScript::Graph::Bar Finance::Shares::Chart INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES This module requires these other modules and libraries, although they are all part of the standard Perl distribution: Package Minimum Version -------------- --------------- perl 5.008 Carp Encode 2.21 Exporter 5.57 File::Spec Scalar::Util Sys::Hostname CHANGES Here's what's new in version 2.20 of PostScript::File: (See the file "Changes" for the full revision history.) API improvements: - Added use_functions method, which selects functions from a library provided by new module PostScript::File::Functions. - Added set_min_langlevel method - Added all_comments strip type - Renamed methods add_function, get_functions, & has_function to add_procset, get_procsets, & has_procset. The old names are still available for backwards compatibility, but their use is deprecated. - Multi-line string literals are now protected from comment/whitespace stripping. - Fixed bug: add_preview might strip the preview - Fixed bug: check_tilde treated "0" like the empty string - Private methods bbox_comment, pre_pages, post_pages, & print_file were renamed. You shouldn't have been using them anyway. - The get_ordinal method is now private. While it was formerly documented, it unnecessarily exposed the internals and had no real use. - The documentation has been cleaned up. COPYRIGHT AND LICENCE Copyright 2002, 2003 Christopher P Willmot. All rights reserved. Copyright 2009 Christopher J. Madsen. All rights reserved. This work is published under the same licensing terms as Perl itself, which may be found at http://www.perl.org. The existance of this work does not imply that it is fit for any purpose implied by the code or accompanying documentation. There is no warranty whatsoever. Use at your own risk. libpostscript-file-perl-2.20+dfsg.orig/MANIFEST0000644000175000017500000000543011715743427020531 0ustar gregoagregoaChanges LICENSE MANIFEST META.json META.yml Makefile.PL README examples/cp1252.pl examples/generate_metrics.pl examples/hello_world.pl examples/iso-8859-1.pl examples/minimal.pl examples/symbol.pl lib/PostScript/File.pm lib/PostScript/File/Functions.pm lib/PostScript/File/Metrics.pm lib/PostScript/File/Metrics/Loader.pm lib/PostScript/File/Metrics/cp1252/Courier.pm lib/PostScript/File/Metrics/cp1252/Courier/Bold.pm lib/PostScript/File/Metrics/cp1252/Courier/BoldOblique.pm lib/PostScript/File/Metrics/cp1252/Courier/Oblique.pm lib/PostScript/File/Metrics/cp1252/Helvetica.pm lib/PostScript/File/Metrics/cp1252/Helvetica/Bold.pm lib/PostScript/File/Metrics/cp1252/Helvetica/BoldOblique.pm lib/PostScript/File/Metrics/cp1252/Helvetica/Oblique.pm lib/PostScript/File/Metrics/cp1252/Times/Bold.pm lib/PostScript/File/Metrics/cp1252/Times/BoldItalic.pm lib/PostScript/File/Metrics/cp1252/Times/Italic.pm lib/PostScript/File/Metrics/cp1252/Times/Roman.pm lib/PostScript/File/Metrics/iso_8859_1/Courier.pm lib/PostScript/File/Metrics/iso_8859_1/Courier/Bold.pm lib/PostScript/File/Metrics/iso_8859_1/Courier/BoldOblique.pm lib/PostScript/File/Metrics/iso_8859_1/Courier/Oblique.pm lib/PostScript/File/Metrics/iso_8859_1/Helvetica.pm lib/PostScript/File/Metrics/iso_8859_1/Helvetica/Bold.pm lib/PostScript/File/Metrics/iso_8859_1/Helvetica/BoldOblique.pm lib/PostScript/File/Metrics/iso_8859_1/Helvetica/Oblique.pm lib/PostScript/File/Metrics/iso_8859_1/Times/Bold.pm lib/PostScript/File/Metrics/iso_8859_1/Times/BoldItalic.pm lib/PostScript/File/Metrics/iso_8859_1/Times/Italic.pm lib/PostScript/File/Metrics/iso_8859_1/Times/Roman.pm lib/PostScript/File/Metrics/std/Courier.pm lib/PostScript/File/Metrics/std/Courier/Bold.pm lib/PostScript/File/Metrics/std/Courier/BoldOblique.pm lib/PostScript/File/Metrics/std/Courier/Oblique.pm lib/PostScript/File/Metrics/std/Helvetica.pm lib/PostScript/File/Metrics/std/Helvetica/Bold.pm lib/PostScript/File/Metrics/std/Helvetica/BoldOblique.pm lib/PostScript/File/Metrics/std/Helvetica/Oblique.pm lib/PostScript/File/Metrics/std/Times/Bold.pm lib/PostScript/File/Metrics/std/Times/BoldItalic.pm lib/PostScript/File/Metrics/std/Times/Italic.pm lib/PostScript/File/Metrics/std/Times/Roman.pm lib/PostScript/File/Metrics/sym/Symbol.pm t/00-all_prereqs.t t/00-load.t t/10-simple.t t/20-eps.t t/30-debug.t t/40-pages.t t/45-hyphens.t t/50-pstr.t t/55-wrapping.t t/60-content.t t/65-testable.t t/70-Courier.t t/71-Courier-Bold.t t/72-Courier-BoldOblique.t t/73-Courier-Oblique.t t/74-Helvetica.t t/75-Helvetica-Bold.t t/76-Helvetica-BoldOblique.t t/77-Helvetica-Oblique.t t/78-Times-Bold.t t/79-Times-BoldItalic.t t/7A-Times-Italic.t t/7B-Times-Roman.t t/Font_Test.pm t/recycle-i.epsi t/recycle-tiff4.eps t/recycle-wmf.epsf t/recycle.eps t/release-perlcritic.t t/release-pod-coverage.t t/release-pod-syntax.t libpostscript-file-perl-2.20+dfsg.orig/LICENSE0000644000175000017500000004370611715531042020401 0ustar gregoagregoaThis software is copyright (c) 2012 by Christopher J. Madsen. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2012 by Christopher J. Madsen. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy 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 1, 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. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2012 by Christopher J. Madsen. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End