home *** CD-ROM | disk | FTP | other *** search
- %%BeginResource: procset Adobe_typography_AI3 1.0 0
- %%Title: (Typography Operators)
- %%Version: 1.0
- %%CreationDate:(5/31/90) ()
- %%Copyright: ((C) 1987-1990 Adobe Systems Incorporated All Rights Reserved)
-
- currentpacking true setpacking
- userdict /Adobe_typography_AI3 46 dict dup begin put
- /initialize % - initialize -
- {
- /TZ
- where
- {
- pop
- }
- {
- Adobe_typography_AI3 begin
- Adobe_typography_AI3
- {
- dup xcheck
- {
- bind
- } if
- pop pop
- } forall
- end
- Adobe_typography_AI3 begin
- } ifelse
- } def
- /terminate % - terminate -
- {
- currentdict Adobe_typography_AI3 eq
- {
- end
- } if
- } def
-
- % [ number value stream [ array for encoding modification ] modifyEncoding ==> [ modified array ]
- /modifyEncoding
- {
- /_tempEncode exch ddef
-
- % pointer for sequential encodings
- /_pntr 0 ddef
-
- {
- % get bottom object
- counttomark -1 roll
-
- % is it a mark ?
- dup type dup /marktype eq
- {
- % exit
- pop pop exit
- }
- {
- % ... object ... type ....
-
- % insert if a nametype
- /nametype eq
- {
- % insert the name at _pntr and increment pointer
- _tempEncode /_pntr dup load dup 3 1 roll 1 add ddef 3 -1 roll
- put
- }
- {
- % reset _pntr if it's a number
- /_pntr exch ddef
- }
- ifelse
- }
- ifelse
- }
- loop
-
- % return the modified encoding
- _tempEncode
- }
- def
-
- /TE % Set std platform encoding % (encoding pairs) TE -
- {
- StandardEncoding 256 array copy modifyEncoding
- /_nativeEncoding exch def
- } def
-
- % re-define font
- % expected arguments
- % for 'normal fonts :
- % [ /_Helvetica-Bold/Helvetica-Bold direction fontScript defaultEncoding TZ
- %
- % for cartographic, pictographic, and expert fonts :
- % [ ... number value stream ... /_Helvetica-Bold/Helvetica-Bold
- % direction fontScript defaultEncoding TZ
- /TZ
- {
- % platform dependent coding flag
- /_useNativeEncoding exch def
-
- % pop fontScript & direction
- pop pop
-
- % create a new dictionary with length
- % equal to original dictionary length + 2
- % copy all the key/value pairs except FID
- findfont dup length 2 add dict
-
- begin
-
- % copy all the values but the FID
- % into the new dictionary
- mark exch
- {
- 1 index /FID ne { def } if cleartomark mark
- }
- forall
- % discard last mark
- pop
-
- % define FontName
- /FontName exch def
-
- % if no re-encoding stream is present
- % then if the base encoding vector of the font
- % is the same as StandardEncoding
- % and the use platform encoding flag is true
- % then install AI platform encoding
- % else leave the base encoding in effect
-
- counttomark 0 eq
- {
- Encoding StandardEncoding eq 1 _useNativeEncoding eq and
- {
- /Encoding _nativeEncoding def
- }
- if
- % clean up
- cleartomark
- }
- {
- % custom encoding to be done
- % start off with a copy of the font's standard encoding
- /Encoding load 256 array copy
- modifyEncoding /Encoding exch def
- }
- ifelse
- FontName currentdict
- end
-
- % register the new font
- definefont pop
- }
- def
-
- % text painting operators
- /tr % string tr ax ay string
- {
- _ax _ay 3 2 roll
- } def
- /trj % string trj cx cy fillchar ax ay string
- {
- _cx _cy _sp _ax _ay 6 5 roll
- } def
-
- /a0
- {
- /Tx % text % textString Tx -
- {
- dup
- currentpoint 3 2 roll
- tr _psf
- newpath moveto
- tr _ctm _pss
- } ddef
- /Tj % justified text % textString Tj -
- {
- dup
- currentpoint 3 2 roll
- trj _pjsf
- newpath moveto
- trj _ctm _pjss
- } ddef
-
- } def
- /a1
- {
- W B
- } def
-
- /e0
- {
- /Tx % text % textString Tx -
- {
- tr _psf
- } ddef
- /Tj % justified text % textString Tj -
- {
- trj _pjsf
- } ddef
- } def
-
- /e1
- {
- W F
- } def
-
-
- /i0
- {
- /Tx % text % textString Tx -
- {
- tr sp
- } ddef
- /Tj % justified text % textString Tj -
- {
- trj jsp
- } ddef
- } def
-
- /o0
- {
- /Tx % text % textString Tx -
- {
- tr sw rmoveto
- } ddef
- /Tj % justified text % textString Tj -
- {
- trj swj rmoveto
- } ddef
- } def
-
- /r0
- {
- /Tx % text % textString Tx -
- {
- tr _ctm _pss
- } ddef
- /Tj % justified text % textString Tj -
- {
- trj _ctm _pjss
- } ddef
- } def
- /r1
- {
- W S
- } def
-
- % font operators
-
- % Binding
- /To % begin text % bindType To -
- {
- pop _ctm currentmatrix pop
- } def
-
- /TO % end text % TO -
- {
- Te _ctm setmatrix newpath
- } def
-
- % Text paths
- /Tp % begin text path % a b c d tx ty startPt Tp -
- {
- pop _tm astore pop _ctm setmatrix
- 2 dict begin /W {} def /h {} def
- } def
-
- /TP % end text path % TP -
- {
- end
- iTm 0 0 moveto
- } def
-
- % Render mode & matrix operators
- /Tr % begin render % render Tr -
- {
- Te currentpoint newpath moveto
- dup 8 eq {pop 0} {dup 9 eq {pop 1} if} ifelse
- dup /_render exch ddef
- _renderStart exch get load exec
- } def
-
- /iTm % internal set text matrix % - iTm - (uses _tm as implicit argument)
- {
- _ctm setmatrix _tm concat 0 _rise translate _hs 1 scale
- } def
-
- /Tm % set text matrix % a b c d tx ty Tm -
- {
- _tm astore pop iTm 0 0 moveto
- } def
-
- /Td % translate text matrix % tx ty Td -
- {
- _mtx translate _tm _tm concatmatrix pop iTm 0 0 moveto
- } def
-
- /Te % end render % - Te -
- {
- _render -1 eq {} {_renderEnd _render get dup null ne {load exec} {pop} ifelse} ifelse
- /_render -1 ddef
- } def
-
-
- % Attributes
- /Ta % set alignment % alignment Ta -
- {
- pop
- } def
-
- /Tf % set font name and size % fontname size Tf -
- {
- dup 1000 div /_fScl exch ddef
- exch findfont exch scalefont setfont
- } def
-
- /Tl % set leading % leading paragraphLeading Tl -
- {
- pop
- 0 exch _leading astore pop
- } def
-
- /Tt % set user tracking % userTracking Tt -
- {
- pop
- } def
-
- /TW % set word spacing % minSpace optSpace maxSpace TW -
- {
- 3 npop
- } def
-
- /Tw % set computed word spacing % wordSpace Tw
- {
- /_cx exch ddef
- } def
-
- /TC % set character spacing % minSpace optSpace maxSpace TC -
- {
- 3 npop
- } def
-
- /Tc % set computed char spacing % charSpace Tc -
- {
- /_ax exch ddef
- } def
-
- /Ts % set super/subscripting (rise) % rise Ts -
- {
- /_rise exch ddef
- currentpoint
- iTm
- moveto
- } def
-
- /Ti % set indentation % firstStartIndent otherStartIndent stopIndent Ti -
- {
- 3 npop
- } def
-
- /Tz % set horizontal scaling % scalePercent Tz -
- {
- 100 div /_hs exch ddef
- iTm
- } def
-
- /TA % set pairwise kerning % autoKern TA -
- % autoKern = 0 -> no pair kerning
- % = 1 -> automatic pair kerning
- {
- pop
- } def
-
- /Tq % set hanging quotes % hangingQuotes Tq -
- % hangingQuotes = 0 -> no hanging quotes
- % = 1 -> hanging quotes
- {
- pop
- } def
-
-
- % Text Bodies
- /TX {pop} def
-
- %/Tx % non-justified text % textString Tx -
- %/Tj % justified text % textString Tj -
-
- /Tk % kern % autoKern kernValue Tk -
- % autoKern = 0 -> manual kern, = 1 -> auto kern
- % kernValue = kern value in em/1000 space
- {
- exch pop _fScl mul neg 0 rmoveto
- } def
- /TK % non-printing kern % autoKern kernValue TK -
- {
- 2 npop
- } def
-
- /T* % carriage return & line feed % - T* -
- {
- _leading aload pop neg Td
- } def
-
- /T*- % carriage return & negative line feed % - T*- -
- {
- _leading aload pop Td
- } def
-
- /T- % print a discretionary hyphen % - T- -
- {
- _hyphen Tx
- } def
-
- /T+ % discretionary hyphen hyphen % - T+ -
- {} def
-
- /TR % reset pattern matrix % a b c d tx ty TR -
- {
- _ctm currentmatrix pop
- _tm astore pop
- iTm 0 0 moveto
- } def
-
- /TS % special chars % textString justified TS -
- {
- 0 eq {Tx} {Tj} ifelse
- } def
-
- currentdict readonly pop end
- setpacking
-
- %%EndResource