home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1999 May
/
PCWorld_1999-05_cd.bin
/
software
/
Vyzkuste
/
inprise
/
ADOBE
/
ARCHIVE.Z
/
AcroRd32.exe
/
PSPROCSET
/
14
< prev
next >
Wrap
Text File
|
1997-06-16
|
10KB
|
610 lines
%%BeginFile: makeocf.prc
%%Copyright: Copyright 1987-1997 Adobe Systems Incorporated. All Rights Reserved.
PDFText begin
PDF /PDFMakeOCF 25 dict dup begin put
/CIDFONT_MAX_STRING_SIZE 8000 def
/_mkocfString100 100 string def
/pdf_BuildCharDict 15 dict dup begin
/dst_string 1500 string def
/nullstring () def
end def
/pdf_raise {exch cvx exch errordict exch get exec stop} bind def
/pdf_reraise
{ cvx $error /errorname get (Error: ) print dup ( ) cvs print
errordict exch get exec stop
} bind def
/pdf_cvnsi
{
1 index add 1 sub 1 exch 0 4 1 roll
{
2 index exch get
exch 8 bitshift
add
}
for
exch pop
} bind def
/pdf_GetInterval
{
pdf_BuildCharDict begin
/dst_index 0 def
dup /dst_string length gt
{dup string /dst_string exch def}
if
1 index CIDFONT_MAX_STRING_SIZE idiv
/arrayIndex exch def
2 index arrayIndex get
2 index
arrayIndex CIDFONT_MAX_STRING_SIZE mul
sub
{
dup 3 index add 2 index length le
{
2 index getinterval
dst_string dst_index 2 index putinterval
length dst_index add /dst_index exch def
exit
}
{
1 index length 1 index sub
dup 4 1 roll
getinterval
dst_string dst_index 2 index putinterval
pop dup dst_index add /dst_index exch def
sub
/arrayIndex arrayIndex 1 add def
2 index dup length arrayIndex gt
{
arrayIndex get
}
{
pop
exit
}
ifelse
0
}
ifelse
} loop
pop pop pop
dst_string 0 dst_index getinterval
end
} bind def
Level2?
{
/CIDFont /Category resourcestatus
{ pop pop }
{
currentglobal true setglobal
/Generic /Category findresource
dup length dict copy
dup /InstanceType /dicttype put
/CIDFont exch /Category defineresource pop
setglobal
} ifelse
pdf_has_composefont?
{
/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo 3 dict dup begin
/Registry (Adobe) def
/Ordering (Identity) def
/Supplement 0 def
end def
/CMapName /pdf_Identity def
/CMapVersion 1.000 def
/CMapType 1 def
1 begincodespacerange
<0000> <FFFF>
endcodespacerange
1 begincidrange
<0000> <FFFF> 0
endcidrange
endcmap
CMapName currentdict /CMap defineresource pop
end
end
%%EndResource
%%EOF
}
if
}
{
/pdf_Category 2 dict begin
/CIDFont 10 dict def
/ProcSet 2 dict def
currentdict
end
def
/defineresource
{
pdf_Category 1 index 2 copy known
{
get
3 index 3 index put
pop exch pop
}
{
pop pop
/defineresource /undefined pdf_raise
}
ifelse
} bind def
/findresource
{
pdf_Category 1 index 2 copy known
{
get
2 index 2 copy known
{ get 3 1 roll pop pop}
{ pop pop /findresource /undefinedresource pdf_raise }
ifelse
}
{
pop pop
/findresource /undefined pdf_raise
}
ifelse
} bind def
/resourcestatus
{
pdf_Category 1 index 2 copy known
{
get
2 index known
exch pop exch pop
}
{
pop pop
/findresource /undefined pdf_raise
}
ifelse
} bind def
}
ifelse
/pdf_CIDInit 2 dict begin
/pdf_cidfont_stream_init
{
{
dup (Binary) eq
{
pop
null
currentfile
Level2?
{
{ cid_BYTE_COUNT () /SubFileDecode filter }
stopped
{ pop pop pop }
if
}
if
/readstring load
exit
}
if
dup (Hex) eq
{
pop
currentfile
Level2?
{
{ null exch /ASCIIHexDecode filter /readstring }
}
stopped
{ pop exch pop (>) exch /readhexstring }
if
{ (>) exch /readhexstring }
ifelse
load
exit
}
if
/StartData /typecheck pdf_raise
}
loop
cid_BYTE_COUNT CIDFONT_MAX_STRING_SIZE le
{
2 copy cid_BYTE_COUNT string exch exec
pop
1 array dup
3 -1 roll
0 exch put
}
{
cid_BYTE_COUNT CIDFONT_MAX_STRING_SIZE div ceiling cvi
dup array exch 2 sub 0 exch 1 exch
{
2 copy
5 index
CIDFONT_MAX_STRING_SIZE
string
6 index exec
pop
put
pop
}
for
2 index
cid_BYTE_COUNT CIDFONT_MAX_STRING_SIZE mod string
3 index exec
pop
1 index exch
1 index length 1 sub
exch put
}
ifelse
cid_CIDFONT exch /GlyphData exch put
2 index null eq
{
pop pop pop
}
{
pop /readstring load
1 string exch
{
3 copy exec
pop
dup length 0 eq
{
pop pop pop pop pop
true exit
}
if
4 index
eq
{
pop pop pop pop
false exit
}
if
}
loop
pop
}
ifelse
} bind def
/StartData
{
mark
{
currentdict
dup /CDevProc known not
{
/CDevProc
1183615869 internaldict /stdCDevProc 2 copy known
{ get }
{
pop pop
{pop pop pop pop pop 0 -1000 7 index 2 div 880 }
}
ifelse
def
} if
/cid_temp 15 dict def
cid_temp
begin
/cid_CIDFONT exch def
3 copy pop
dup /cid_BYTE_COUNT exch def 0 gt
{
pdf_cidfont_stream_init
FDArray
{
/Private get
dup /SubrMapOffset known
{
begin
/Subrs SubrCount array def
Subrs
SubrMapOffset
SubrCount
SDBytes
Level2?
{
currentdict dup /SubrMapOffset undef
dup /SubrCount undef
/SDBytes undef
}
if
end
/cid_SD_BYTES exch def
/cid_SUBR_COUNT exch def
/cid_SUBR_MAP_OFFSET exch def
/cid_SUBRS exch def
cid_SUBR_COUNT 0 gt
{
GlyphData cid_SUBR_MAP_OFFSET cid_SD_BYTES pdf_GetInterval
0 cid_SD_BYTES pdf_cvnsi
0 1 cid_SUBR_COUNT 1 sub
{
exch 1 index
1 add
cid_SD_BYTES mul cid_SUBR_MAP_OFFSET add
GlyphData exch cid_SD_BYTES pdf_GetInterval
0 cid_SD_BYTES pdf_cvnsi
cid_SUBRS 4 2 roll
GlyphData exch
4 index
1 index
sub
pdf_GetInterval
dup length string copy put
}
for
pop
}
if
}
{ pop }
ifelse
}
forall
}
if
cleartomark pop pop
end
CIDFontName currentdict /CIDFont
defineresource pop
end end
}
stopped
{ cleartomark /StartData pdf_reraise }
if
} bind def
currentdict
end
def
/pdf_saveCIDInit
{
/CIDInit /ProcSet 2 copy resourcestatus
{
pop pop
findresource
pdf_has_composefont?
{ pop null }
{
/CIDInit pdf_CIDInit /ProcSet defineresource pop
} ifelse
}
{
pop pop
/CIDInit pdf_CIDInit /ProcSet defineresource pop
null
}
ifelse
PDFVars exch /_pdf_oldCIDInit exch put
} bind def
/pdf_restoreCIDInit
{
PDFVars /_pdf_oldCIDInit get null ne
{
/CIDInit _pdf_oldCIDInit /ProcSet defineresource
}
if
} bind def
/pdf_BuildCharVM
{
%% set up vm state
{
PDFMakeOCF begin
1 index begin
CIDFont begin
pdf_BuildCharDict begin
/pdf_dfCharCode exch def
/pdf_dfDict exch def
CIDFirstByte pdf_dfCharCode add
dup CIDCount ge
{ pop 0 }
if
/cid exch def
{
/cidMapOffset cid GDBytes FDBytes add mul CIDMapOffset add def
/cidMapNextOffset cidMapOffset GDBytes add FDBytes add def
GlyphData cidMapOffset FDBytes GDBytes add pdf_GetInterval
dup
FDBytes 0 ne
{ 0 FDBytes pdf_cvnsi }
{ 0 }
ifelse
/fdIndex exch def
FDBytes GDBytes pdf_cvnsi
/charStringOffset exch def
GlyphData cidMapNextOffset FDBytes GDBytes add pdf_GetInterval
FDBytes GDBytes pdf_cvnsi
charStringOffset sub
/charStringLength exch def
charStringLength 0 ne
{
GlyphData charStringOffset charStringLength pdf_GetInterval
/charstring exch def
exit
}
{
cid 0 eq
{
/charstring nullstring def
exit
}
if
/cid 0 def
}
ifelse
}
loop
pdf_dfDict pdf_dfCharCode charstring
FDArray fdIndex get
/Private get
Level2? not
{
pdf_dfDict /Private
3 -1 roll
{ put } 1183615869 internaldict /superexec get exec
}
if
1183615869 internaldict
Level2?
{ 1 index }
{ 3 index /Private get }
ifelse
dup /RunInt known
{ /RunInt get }
{ pop /CCRun }
ifelse
get exec
}
stopped
{ stop }
if
end
end
end
end
%% Restore VM state
} def
/BaseFontNameStr (BF00) def
/BaseFontTemplate 8 dict begin
/FontType 4 def
/FontMatrix [0.001 0 0 0.001 0 0] def
/FontBBox [-250 -250 1250 1250] def
/Encoding cHexEncoding def
/PaintType 0 def
/BuildChar /pdf_BuildCharVM load def
/Private 1 dict dup /lenIV -1 put def
/CharStrings 1 dict dup /.notdef <8B FA 8E 0D 0F> put def
currentdict
end def
/BaseFontDictSize BaseFontTemplate length 5 add def
/pdf_makeocf
{
11 dict begin
exch /FontName exch def
/FontType 0 def
/FontMatrix matrix def
/FMapType 2 def
/bfCount 1 index /CIDCount get 1 sub 256 idiv 1 add def
/Encoding 256 array def
0 1 255 { Encoding exch dup dup bfCount ge { pop bfCount } if put } for
/FDepVector bfCount 1 add array def
BaseFontTemplate BaseFontDictSize dict copy
begin
/CIDFont exch def
CIDFont /FontBBox known
{
CIDFont /FontBBox get
/FontBBox exch def
}
if
/CDevProc CIDFont /CDevProc get def
currentdict
end
BaseFontNameStr 3 48 put
0 1 bfCount
{
FDepVector exch
2 index BaseFontDictSize dict copy
begin
dup /CIDFirstByte exch 256 mul def
currentdict
end
1 index 16
BaseFontNameStr 2 2 getinterval cvrs pop
BaseFontNameStr exch definefont
put
} for
pop
FontName
currentdict
end
definefont
} bind def
/pdf_MakeIdentity
{
pdf_has_composefont?
{
1 index /CMap resourcestatus
{ pop pop }
{
/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CMapName 2 index def
/CMapVersion 1.000 def
/CMapType 1 def
/CIDSystemInfo 3 dict dup begin
/Registry (Adobe) def
/Ordering
CMapName _mkocfString100 cvs
(Adobe-) search
{
pop pop
(-) search
{
dup length string copy
exch pop exch pop
}
{ (Identity)}
ifelse
}
{ (Identity) }
ifelse
def
/Supplement 0 def
end def
1 begincodespacerange
<0000> <FFFF>
endcodespacerange
1 begincidrange
<0000> <FFFF> 0
endcidrange
endcmap
CMapName currentdict /CMap defineresource pop
end
end
%%EndResource
}
ifelse
composefont
}
{
exch pop
0 get /CIDFont findresource
pdf_makeocf
}
ifelse
} bind def
/pdf_MakeSubsetFont
{
PDFText begin
dup
_pdfSubSetFontByStyleDict exch
known
{
pop
Level2?
{
dup 0 get
/CIDFont undefineresource
}
if
pop pop
}
{
_pdfFaceByStyleDict exch 2 copy
known
{ get }
{ pop /Default get }
ifelse
2 index _pdfConcatNames
3 1 roll
pdf_MakeIdentity
pop
}
ifelse
end
} bind def
currentdict readonly pop end
end
%%EndFile