summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlgs/lib/wrfont.ps
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlgs/lib/wrfont.ps')
-rw-r--r--Master/tlpkg/tlgs/lib/wrfont.ps264
1 files changed, 132 insertions, 132 deletions
diff --git a/Master/tlpkg/tlgs/lib/wrfont.ps b/Master/tlpkg/tlgs/lib/wrfont.ps
index f2b331da8e1..63edf36d9a3 100644
--- a/Master/tlpkg/tlgs/lib/wrfont.ps
+++ b/Master/tlpkg/tlgs/lib/wrfont.ps
@@ -1,19 +1,19 @@
% Copyright (C) 1991, 1995, 1996, 2002 Aladdin Enterprises. All rights reserved.
-%
+%
% This software is provided AS-IS with no warranty, either express or
% implied.
-%
+%
% This software is distributed under license and may not be copied,
% modified or distributed except as expressly authorized under the terms
% of the license contained in the file LICENSE in this distribution.
-%
+%
% For more information about licensing, please refer to
% http://www.ghostscript.com/licensing/. For information on
% commercial licensing, go to http://www.artifex.com/licensing/ or
% contact Artifex Software, Inc., 101 Lucas Valley Road #110,
% San Rafael, CA 94903, U.S.A., +1(415)492-9861.
-% $Id: wrfont.ps 6300 2005-12-28 19:56:24Z giles $
+% $Id$
% wrfont.ps
% Write out a Type 1 font in readable, reloadable form.
% Note that this does NOT work on protected fonts, such as Adobe fonts
@@ -90,13 +90,13 @@ ifelse
{end} wol
} bind def
/wld % Write a large dictionary more efficiently.
- % Ignore the readonly attributes.
+ % Ignore the readonly attributes.
{ dup length wo {dict dup begin} wol
0 exch
{ exch wo wo () wl
- 1 add dup 200 eq
- { wo ({def} repeat) wl 0 }
- if
+ 1 add dup 200 eq
+ { wo ({def} repeat) wl 0 }
+ if
}
forall
dup 0 ne
@@ -112,32 +112,32 @@ ifelse
{ dup type /stringtype eq
{ 4330 exch changelenIV 0 ge
{ % Add some leading garbage bytes.
- wtstring changelenIV 2 index length getinterval
- .type1decrypt exch pop
- wtstring exch 0 exch length changelenIV add getinterval
- }
- { % Drop some leading garbage bytes.
- wtstring .type1decrypt exch pop
- changelenIV neg 1 index length 1 index sub getinterval
- }
- ifelse
+ wtstring changelenIV 2 index length getinterval
+ .type1decrypt exch pop
+ wtstring exch 0 exch length changelenIV add getinterval
+ }
+ { % Drop some leading garbage bytes.
+ wtstring .type1decrypt exch pop
+ changelenIV neg 1 index length 1 index sub getinterval
+ }
+ ifelse
binary_tokens encrypt_CharStrings and
- { % Suppress recognizing the readonly status of the string.
- 4330 exch dup .type1encrypt exch pop wo
- }
- { encrypt_CharStrings
- { 4330 exch dup .type1encrypt exch pop
- } if
- smallest_output
- { wo
- }
- { readonly dup length wo
- binary_tokens not { ( ) ws } if
- readproc ws wx
- }
- ifelse
- }
- ifelse
+ { % Suppress recognizing the readonly status of the string.
+ 4330 exch dup .type1encrypt exch pop wo
+ }
+ { encrypt_CharStrings
+ { 4330 exch dup .type1encrypt exch pop
+ } if
+ smallest_output
+ { wo
+ }
+ { readonly dup length wo
+ binary_tokens not { ( ) ws } if
+ readproc ws wx
+ }
+ ifelse
+ }
+ ifelse
}
{ wo % PostScript procedure
}
@@ -150,10 +150,10 @@ ifelse
0 1 255 {
(\221 ) dup 1 3 index put
{ token } stopped {
- pop pop
+ pop pop
} {
- % Stack: char () token true
- pop exch pop exch snit 3 1 roll put
+ % Stack: char () token true
+ pop exch pop exch snit 3 1 roll put
} ifelse
} for
} {
@@ -165,7 +165,7 @@ ifelse
{ psfile exch write==only
} bind def
- % Lookup table for ASCII output.
+ % Lookup table for ASCII output.
/intbytes % int nbytes -> byte*
{ { dup 255 and exch -8 bitshift } repeat pop
@@ -174,7 +174,7 @@ ifelse
{ /booleantype /integertype }
{ { ( ) ws woa } def }
forall
- % Iterate over arrays so we can print operators.
+ % Iterate over arrays so we can print operators.
/arraytype
{ dup xcheck {(}) ({)} {(]) ([)} ifelse ws exch dup wol exch ws wop
} bind def
@@ -183,77 +183,77 @@ ifelse
/nametype
{ dup xcheck { ( ) ws } if woa
} bind def
- % Map back operators to their names,
- % so we can write procedures.
+ % Map back operators to their names,
+ % so we can write procedures.
/nulltype
{ pop ( null) ws
} bind def
/operatortype
{ wtstring cvs cvn cvx wo
} bind def
- % Convert reals to integers if possible.
+ % Convert reals to integers if possible.
/realtype
{ dup cvi 1 index eq { cvi wo } { ( ) ws woa } ifelse
} bind def
- % == truncates strings longer than 200 characters!
+ % == truncates strings longer than 200 characters!
/stringtype
{ (\() ws dup
- { dup dup 32 lt exch 127 ge or
- { (\\) ws dup -6 bitshift 48 add w1
- dup -3 bitshift 7 and 48 add w1
- 7 and 48 add
- }
- { dup dup -2 and 40 eq exch 92 eq or {(\\) ws} if
- }
- ifelse w1
- }
- forall
- (\)) ws wop
+ { dup dup 32 lt exch 127 ge or
+ { (\\) ws dup -6 bitshift 48 add w1
+ dup -3 bitshift 7 and 48 add w1
+ 7 and 48 add
+ }
+ { dup dup -2 and 40 eq exch 92 eq or {(\\) ws} if
+ }
+ ifelse w1
+ }
+ forall
+ (\)) ws wop
} bind def
/packedarraytype
{ ([) ws dup { wo } forall
- encodingnames 1 index known
- % This is an encoding, but not one of the standard ones.
- % Use the built-in encoding only if it is available.
- { encodingnames exch get wo
- ({findencoding}stopped{pop) ws
- (}{counttomark 1 add 1 roll cleartomark}ifelse)
- }
- { pop ()
- }
- ifelse
- (/packedarray where{pop counttomark packedarray exch pop}{]readonly}ifelse) ws
- wl
+ encodingnames 1 index known
+ % This is an encoding, but not one of the standard ones.
+ % Use the built-in encoding only if it is available.
+ { encodingnames exch get wo
+ ({findencoding}stopped{pop) ws
+ (}{counttomark 1 add 1 roll cleartomark}ifelse)
+ }
+ { pop ()
+ }
+ ifelse
+ (/packedarray where{pop counttomark packedarray exch pop}{]readonly}ifelse) ws
+ wl
}
def
end def
- % Lookup table for binary output.
+ % Lookup table for binary output.
/wottb 8 dict dup begin
wotta currentdict copy pop
/integertype
{ dup dup 127 le exch -128 ge and
{ 136 wb 255 and wb }
- { dup dup 32767 le exch -32768 ge and
- { 134 wb 2 intbytes wb wb }
- { 132 wb 4 intbytes wb wb wb wb }
- ifelse
- }
- ifelse
+ { dup dup 32767 le exch -32768 ge and
+ { 134 wb 2 intbytes wb wb }
+ { 132 wb 4 intbytes wb wb wb wb }
+ ifelse
+ }
+ ifelse
} bind def
/nametype
{ dup snit exch known
{ dup xcheck { 146 } { 145 } ifelse wb
- snit exch get wb
- }
- { wotta /nametype get exec
- }
- ifelse
+ snit exch get wb
+ }
+ { wotta /nametype get exec
+ }
+ ifelse
} bind def
/stringtype
{ dup dup length dup 255 le { 142 2 } { 2 intbytes 143 3 } ifelse wnb
- ws wop
+ ws wop
} bind def
end def
@@ -274,12 +274,12 @@ ifelse
{ ws
}
{ % Some systems choke on very long lines, so
- % we break up the hexstring into chunks of 50 characters.
- { dup length 25 le {exit} if
- dup 0 25 getinterval psfile exch writehexstring (\n) ws
- dup length 25 sub 25 exch getinterval
- } loop
- psfile exch writehexstring
+ % we break up the hexstring into chunks of 50 characters.
+ { dup length 25 le {exit} if
+ dup 0 25 getinterval psfile exch writehexstring (\n) ws
+ dup length 25 sub 25 exch getinterval
+ } loop
+ psfile exch writehexstring
} ifelse
} bind def
@@ -304,23 +304,23 @@ enc_dict { 1 index where { pop pop pop } { def } ifelse } forall
{ 2 copy eq
{ pop pop true }
{ % Special hack for comparing FontMatrix values
- dup type /arraytype eq 2 index type /arraytype eq and
- { dup length 2 index length eq
- { true 0 1 3 index length 1 sub
- { % Stack: arr1 arr2 true index
- 3 index 1 index get 3 index 3 -1 roll get eq not
- { pop false exit }
- if
- }
- for 3 1 roll pop pop
- }
- { pop pop false
- }
- ifelse
- }
- { pop pop false
- }
- ifelse
+ dup type /arraytype eq 2 index type /arraytype eq and
+ { dup length 2 index length eq
+ { true 0 1 3 index length 1 sub
+ { % Stack: arr1 arr2 true index
+ 3 index 1 index get 3 index 3 -1 roll get eq not
+ { pop false exit }
+ if
+ }
+ for 3 1 roll pop pop
+ }
+ { pop pop false
+ }
+ ifelse
+ }
+ { pop pop false
+ }
+ ifelse
}
ifelse
} bind def
@@ -389,7 +389,7 @@ currentdict end /unencrypted_procs exch def
.knownEncodings length 256 mul dict begin
0 .knownEncodings
{ { currentdict 1 index known { pop } { 1 index def } ifelse
- 1 add
+ 1 add
}
forall
}
@@ -433,12 +433,12 @@ currentdict end /inverseencodings exch def
eexec_encrypt
{ /eexecfilter psfile binary_CharStrings not
{ pop /bxstring 35 string def
- { pop dup length 0 ne
- { realpsfile exch writehexstring realpsfile (\n) writestring }
- { pop }
- ifelse bxstring
- }
- /NullEncode filter dup /hexfilter exch def
+ { pop dup length 0 ne
+ { realpsfile exch writehexstring realpsfile (\n) writestring }
+ { pop }
+ ifelse bxstring
+ }
+ /NullEncode filter dup /hexfilter exch def
}
if 55665 /eexecEncode filter def
}
@@ -457,11 +457,11 @@ currentdict end /inverseencodings exch def
}
{ Font /UniqueID known
{ ({} FontDirectory) ws Font /FontName get dup wo ( known) wl
- ( {) ws wo ( findfont dup /UniqueID known) wl
- ( { dup /UniqueID get) ws Font /UniqueID get wo ( eq exch /FontType get 1 eq and }) wl
- ( { pop false } ifelse) wl
- ( { pop save /restore load } if) wl
- ( } if) wl
+ ( {) ws wo ( findfont dup /UniqueID known) wl
+ ( { dup /UniqueID get) ws Font /UniqueID get wo ( eq exch /FontType get 1 eq and }) wl
+ ( { pop false } ifelse) wl
+ ( { pop save /restore load } if) wl
+ ( } if) wl
}
if
}
@@ -490,14 +490,14 @@ currentdict end /inverseencodings exch def
Font
{ minimize
{ .minfontskipkeys 2 index known
- { pop pop
- }
- { //.compactfontdefault 2 index .knownget
- { 1 index valueeq { pop pop } { we } ifelse }
- { we }
- ifelse
- }
- ifelse
+ { pop pop
+ }
+ { //.compactfontdefault 2 index .knownget
+ { 1 index valueeq { pop pop } { we } ifelse }
+ { we }
+ ifelse
+ }
+ ifelse
}
{ .fontskipkeys 2 index known { pop pop } { we } ifelse
}
@@ -571,9 +571,9 @@ if
{ (/Subrs[) wl
Subrs
{ dup null ne
- { wcs minimize not { () wl } if }
- { pop /null cvx wo }
- ifelse
+ { wcs minimize not { () wl } if }
+ { pop /null cvx wo }
+ ifelse
} forall
{] dup {readonly pop} forall readonly def} wol () wl
}
@@ -599,20 +599,20 @@ if
CharStrings length dict
CharStrings
{ exch inverseencodings 1 index .knownget not { dup } if wo
- % Stack: vdict value key
- 3 copy pop .knownget { wo pop pop } { 3 copy put pop wcs } ifelse
+ % Stack: vdict value key
+ 3 copy pop .knownget { wo pop pop } { 3 copy put pop wcs } ifelse
} forall
}
{ {dict dup Private begin begin} wol () wl
CharStrings length dict
CharStrings
{ 2 index 1 index known
- { exch wo 1 index exch get wo {load def} wol () wl
- }
- { 2 index 1 index 3 index put
- exch wo wcs ( |-) wl
- }
- ifelse
+ { exch wo 1 index exch get wo {load def} wol () wl
+ }
+ { 2 index 1 index 3 index put
+ exch wo wcs ( |-) wl
+ }
+ ifelse
} forall
{end end} wol
}