PostScript::Resources - module to fetch data from Unix PostScript Resource 'C<.upr>' files |
PostScript::Resources - module to fetch data from Unix PostScript Resource '.upr
' files
my $rsc = new PostScript::Resources (options); print STDOUT $rsc->FontAFM ("Times-Roman"), "\n";
This package allows Unix font resource files, so called '.upr
'
files, to be read and parsed.
PSRESOURCEPATH
, which defaults to '::
'.
Two adjacent colons in the path represent the list of default places in which a component looks for resources. This is also the default value for users who have not installed private resources. Users with private resources should end the path with a double colon if they want their resources to override the system defaults, or begin it with a double colon if they don't want to override system defaults.
On Unix systems, resource files end with the suffix '.upr
' (for
Unix PostScript resources). The principal resource file in a directory
is named 'PSres.upr
'.
If the first line of a principal resource file is
'PS-Resources-Exclusive-1.0
', only this file will be loaded and
processing continues with the next entry from the path.
If, however, the first line of the principal resource file is
'PS-Resources-1.0
', or if there is no such file, all files in the
directory with the suffix '.upr
' will be loaded.
Invalid entries in the file are always reported unless the error handling strategy is set to 'ignore'.
Each of these methods can return undef
if the corresponding
information could not be found in the file.
DPS.refmanuals.TK.pdf
.
Only FontAFM and FontOutline resources are implemented. All other resource sections are ignored.
All info is loaded in memory structures. This is okay for small files or if several lookups are done on the same file.
Backslash escape processing is not yet implemented, except for the handling of line continuation.
This module is intended to be used on Unix systems only. Your mileage on other platforms may vary.
Johan Vromans, Squirrel Consultancy <jvromans@squirrel.nl>
This program is Copyright 2000,1999 by Squirrel Consultancy. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of either: 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'' which comes with Perl.
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.
PostScript::Resources - module to fetch data from Unix PostScript Resource 'C<.upr>' files |