| 1 | # RCS Status : $Id: ISOLatin9Encoding.pm,v 1.2 2002-12-24 17:49:19+01 jv Exp $ | ||
| 2 | # Author : Johan Vromans | ||
| 3 | # Created On : Sat Dec 21 11:48:19 2002 | ||
| 4 | # Last Modified By: Johan Vromans | ||
| 5 | # Last Modified On: Tue Dec 24 00:11:33 2002 | ||
| 6 | # Update Count : 16 | ||
| 7 | # Status : Released | ||
| 8 | |||
| 9 | ################ Module Preamble ################ | ||
| 10 | |||
| 11 | package PostScript::ISOLatin9Encoding; | ||
| 12 | |||
| 13 | $VERSION = "1.01"; | ||
| 14 | |||
| 15 | use 5.005; | ||
| 16 | use strict; | ||
| 17 | |||
| 18 | # Adobe ISOLatin9Encoding. | ||
| 19 | my $ISOLatin9Encoding_str = | ||
| 20 | ".notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef ". | ||
| 21 | ".notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef ". | ||
| 22 | ".notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef ". | ||
| 23 | ".notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef ". | ||
| 24 | "space exclam quotedbl numbersign dollar percent ampersand quoteright ". | ||
| 25 | "parenleft parenright asterisk plus comma minus period slash zero one ". | ||
| 26 | "two three four five six seven eight nine colon semicolon less equal ". | ||
| 27 | "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 ". | ||
| 28 | "Y Z bracketleft backslash bracketright asciicircum underscore ". | ||
| 29 | "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 ". | ||
| 30 | "braceleft bar braceright asciitilde .notdef .notdef .notdef .notdef ". | ||
| 31 | ".notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef ". | ||
| 32 | ".notdef .notdef .notdef .notdef .notdef dotlessi grave acute ". | ||
| 33 | "circumflex tilde macron breve dotaccent dieresis .notdef ring ". | ||
| 34 | "cedilla .notdef hungarumlaut ogonek caron space exclamdown cent ". | ||
| 35 | "sterling Euro yen Scaron section scaron copyright ". | ||
| 36 | "ordfeminine guillemotleft logicalnot hyphen registered macron degree ". | ||
| 37 | "plusminus twosuperior threesuperior Zcaron mu paragraph ". | ||
| 38 | "periodcentered zcaron onesuperior ordmasculine guillemotright ". | ||
| 39 | "OE oe Ydieresis questiondown Agrave Aacute ". | ||
| 40 | "Acircumflex Atilde Adieresis Aring AE Ccedilla Egrave Eacute ". | ||
| 41 | "Ecircumflex Edieresis Igrave Iacute Icircumflex Idieresis Eth Ntilde ". | ||
| 42 | "Ograve Oacute Ocircumflex Otilde Odieresis multiply Oslash Ugrave ". | ||
| 43 | "Uacute Ucircumflex Udieresis Yacute Thorn germandbls agrave aacute ". | ||
| 44 | "acircumflex atilde adieresis aring ae ccedilla egrave eacute ". | ||
| 45 | "ecircumflex edieresis igrave iacute icircumflex idieresis eth ntilde ". | ||
| 46 | "ograve oacute ocircumflex otilde odieresis divide oslash ugrave ". | ||
| 47 | "uacute ucircumflex udieresis yacute thorn ydieresis"; | ||
| 48 | |||
| 49 | my @ISOLatin9Encoding; | ||
| 50 | |||
| 51 | sub string { | ||
| 52 | my ($self) = @_; | ||
| 53 | $ISOLatin9Encoding_str; | ||
| 54 | } | ||
| 55 | |||
| 56 | sub array { | ||
| 57 | my ($self) = @_; | ||
| 58 | @ISOLatin9Encoding = split(' ', $ISOLatin9Encoding_str) | ||
| 59 | unless @ISOLatin9Encoding; | ||
| 60 | wantarray ? @ISOLatin9Encoding : \@ISOLatin9Encoding; | ||
| 61 | } | ||
| 62 | |||
| 63 | sub ps_vector { | ||
| 64 | my ($self) = @_; | ||
| 65 | array(); # will fill @ISOLatin9Encoding | ||
| 66 | my $tally = 0; | ||
| 67 | my $ret = "/ISOLatin9Encoding [\n"; | ||
| 68 | |||
| 69 | foreach my $sym ( @ISOLatin9Encoding ) { | ||
| 70 | if ( $tally + length($sym) + 2 > 72 ) { | ||
| 71 | $ret .= "\n"; | ||
| 72 | $tally = 0; | ||
| 73 | } | ||
| 74 | $ret .= " /$sym"; | ||
| 75 | $tally += length($sym) + 2; | ||
| 76 | } | ||
| 77 | |||
| 78 | $ret . "\n] def\n"; | ||
| 79 | } | ||
| 80 | |||
| 81 | 1; | ||
| 82 | |||
| 83 | __END__ |