The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

PostScript::PseudoISO - Module with handy ISO enhancements

SYNOPSYS

    $str = "This is an emdash: ---";
    # Encode
    $t = PostScript::PseudoISO::->prepstr($str);

DESCRIPTION

This module contains some handy extensions to PostScript ISO Latin1 encoding (ISO 8859.1).

The (class) routine prepstr massages a string and makes the following changes, if appropriate:

  • Any sequence of whitespace characters is compressed into a single space. To retain spaces, use characters with ocal code 240 which will be turned into ordinary spaces but not compressed.

  • Any sequence of three consecutive periods will be changed to render an ellipses.

  • Any sequence of three consecutive dashes will be changed to render an em-dash.

  • Any sequence of two consecutive dashes will be changed to render an en-dash.

  • Straight quotes " and ' will be changed to render curly quotes.

CLASS METHODS

prepstr

Example:

    $str = PostScript::PseudoISO::->prepstr ("emdash '---'");

This routine makes the changes as described above.

reencodingvector

Example:

    $vec = PostScript::PseudoISO::->reencodingvector;

This function returns a reference to a hash that contains the mapping of glyphs that are not part of the ISO Latin1 encoding. This vector can be used with the reencode method of a PostScript::BasicTypesetter object.

AUTHOR

Johan Vromans, Squirrel Consultancy <jvromans@squirrel.nl>

COPYRIGHT and DISCLAIMER

This program is Copyright 2000 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.