PostSc...:Loader(3pm)
π NAME π
PostScript::File::Metrics::Loader β the lil module that loads metrics for PostScript fonts using Font::AFM π
β¨ VERSION β¨
bestie, this doc is describing version 2.20 of PostScript::File::Metrics::Loader, which was released October 10, 2015, as part of PostScript-File version 2.23 π
πΈ DESCRIPTION πΈ
okay so here's the vibe: PostScript::File::Metrics::Loader gets called in by PostScript::File::Metrics whenever there are no pre-compiled metrics hanging around for the font or encoding you asked for. It grabs Font::AFM to read the AFM file and scoop the metrics out of it π
ngl, you should not normally need to use this module, because pre-compiled metrics for the standard PostScript fonts already ship with this distribution. If you ask for metrics for a non-standard font, PostScript::File::Metrics will just load this module automatically, no cap. π¦
If you need metrics for additional fonts, you might wanna go modify and run examples/generate_metrics.pl to build pre-compiled modules for them β¨
π SUBROUTINES π
get_encoding_vector
PostScript::File::Metrics::Loader::get_encoding_vector($encoding)
this one hands back the encoding vector for $encoding β and that's an arrayref of 256 glyph names, periodt π
load
PostScript::File::Metrics::Loader::load($font, \@encodings)
this one uses Font::AFM to read the metrics for $font, and then it creates width tables for each of the @encodings. Where do the metrics go? Straight into the hashes that PostScript::File::Metrics uses internally π₯
π DIAGNOSTICS π
"Can't find definition for %s"β if this pops up, it means you found a bug inPostScript::File::Metrics::Loader. Please report it the way it says under AUTHOR π"Can't find the AFM file for %s"βFont::AFMcould not find%s.afmin any of the directories it searched. Go look at CONFIGURATION AND ENVIRONMENT π"Invalid term %s in %s"β this also means there's a bug inPostScript::File. Please report it π"Unknown encoding %s"β you asked for an encoding thatPostScript::File::Metricsdoesn't know about, bestie π«Ά
π§ CONFIGURATION AND ENVIRONMENT π§
PostScript::File::Metrics::Loader requires no configuration files or environment variables. iconic behavior honestly π
However. It does use Font::AFM, and unfortunately that thing is difficult to configure properly (which is literally why I created PostScript::File::Metrics in the first place π). Font::AFM expects to find a file named FontName.afm in one of the directories it searches.
So I wound up creating symlinks in /usr/local/lib/afm/ (which is one of the default paths that Font::AFM searches if you don't have a METRICS 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, no cap. My suggestion: search for ".afm" files, and then grep them for "FontName X", where X is the font you need metrics for. iykyk π
π INCOMPATIBILITIES π
None reported. we love a clean record π
π¦ BUGS AND LIMITATIONS π¦
No bugs have been reported. (obsessed with that for us honestly) π
π AUTHOR π
Christopher J. Madsen "<perl AT cjmweb.net>" β¨
Please report any bugs or feature requests to "<bug-PostScript-File AT rt.cpan.org>" or through the web interface at http://rt.cpan.org/Public/Bug/Report.html?Queue=PostScript-File π¬
You can follow or contribute to PostScript-File's development at https://github.com/madsen/postscript-file π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2015 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. π«Ά
β οΈ 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.
okay that's the whole thing, bestie π
this page came out of the User Contributed Perl Documentation pile, running under perl v5.36.0, dated 2022-10-14 β and the man page name folds out to PostSc...:Loader(3pm). mwah, take care of her πβ¨π
π¦ where this page comes from
- ubuntu noble: libpostscript-file-perl 2.23+dfsg-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpostscript-file-perl 2.23+dfsg-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpostscript-file-perl 2.23+dfsg-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms