| 1 |
%% |
| 2 |
%% Idioms for the Windows PSCRIPT5 PostScript driver |
| 3 |
%% |
| 4 |
|
| 5 |
currentuserparams /IdiomRecognition get |
| 6 |
<</IdiomRecognition false>> setuserparams |
| 7 |
|
| 8 |
/Pscript5Idiom |
| 9 |
<< |
| 10 |
%% replacements for the artificial bold routines. When the current device supports text rendering modes we set the mode to 2 (fill and stroke) |
| 11 |
%% and only show the text once, which improves seaching with pdfwrite. The parameter 'sBdx' is always calculated as the intended print resolution/300. |
| 12 |
%% We can't do that in PDF so we just use a heuristically derived fixed value. |
| 13 |
/xsB [ |
| 14 |
{2 copy 2 copy 2 copy gsave sBdx 0 rmoveto xshow grestore gsave 0 sBdx rmoveto xshow grestore gsave sBdx sBdx rmoveto xshow grestore xshow} bind |
| 15 |
{ |
| 16 |
/PreserveTrMode /GetDeviceParam .special_op { |
| 17 |
exch pop |
| 18 |
}{ |
| 19 |
//false |
| 20 |
}ifelse |
| 21 |
{ gsave sBdx 2 div dup 0.2 setlinewidth currentcolor currentcolorspace .swapcolors setcolorspace setcolor .swapcolors rmoveto 2 .settextrenderingmode xshow currentpoint grestore moveto} |
| 22 |
{2 copy 2 copy 2 copy gsave sBdx 0 rmoveto xshow grestore gsave 0 sBdx rmoveto xshow grestore gsave sBdx dup rmoveto xshow grestore xshow} bind |
| 23 |
ifelse |
| 24 |
} bind |
| 25 |
] |
| 26 |
/ysB [ |
| 27 |
{2 copy 2 copy 2 copy gsave sBdx 0 rmoveto yshow grestore gsave 0 sBdx rmoveto yshow grestore gsave sBdx sBdx rmoveto yshow grestore yshow} bind |
| 28 |
{ |
| 29 |
/PreserveTrMode /GetDeviceParam .special_op { |
| 30 |
exch pop |
| 31 |
}{ |
| 32 |
//false |
| 33 |
}ifelse |
| 34 |
{ gsave sBdx 2 div dup 0.2 setlinewidth currentcolor currentcolorspace .swapcolors setcolorspace setcolor .swapcolors rmoveto 2 .settextrenderingmode yshow currentpoint grestore moveto} |
| 35 |
{2 copy 2 copy 2 copy gsave sBdx 0 rmoveto yshow grestore gsave 0 sBdx rmoveto yshow grestore gsave sBdx dup rmoveto yshow grestore yshow} bind |
| 36 |
ifelse |
| 37 |
} bind |
| 38 |
] |
| 39 |
/zsB [ |
| 40 |
{2 copy 2 copy 2 copy gsave sBdx 0 rmoveto xyshow grestore gsave 0 sBdx rmoveto xyshow grestore gsave sBdx sBdx rmoveto xyshow grestore xyshow} bind |
| 41 |
{ |
| 42 |
/PreserveTrMode /GetDeviceParam .special_op { |
| 43 |
exch pop |
| 44 |
}{ |
| 45 |
//false |
| 46 |
}ifelse |
| 47 |
{ gsave sBdx 2 div dup 0.2 setlinewidth currentcolor currentcolorspace .swapcolors setcolorspace setcolor .swapcolors rmoveto 2 .settextrenderingmode xyshow currentpoint grestore moveto} |
| 48 |
{2 copy 2 copy 2 copy gsave sBdx 0 rmoveto xyshow grestore gsave 0 sBdx rmoveto xyshow grestore gsave sBdx dup rmoveto xyshow grestore xyshow} bind |
| 49 |
ifelse |
| 50 |
} bind |
| 51 |
] |
| 52 |
/sB [ |
| 53 |
{1 copy 2 copy gsave sBdx 0 rmoveto show grestore gsave 0 sBdx rmoveto show grestore gsave sBdx sBdx rmoveto show grestore show} bind |
| 54 |
{ |
| 55 |
/PreserveTrMode /GetDeviceParam .special_op { |
| 56 |
exch pop |
| 57 |
}{ |
| 58 |
//false |
| 59 |
}ifelse |
| 60 |
{ gsave sBdx 2 div dup 0.2 setlinewidth currentcolor currentcolorspace .swapcolors setcolorspace setcolor .swapcolors rmoveto 2 .settextrenderingmode show currentpoint grestore moveto} |
| 61 |
{1 copy 2 copy gsave sBdx 0 rmoveto show grestore gsave 0 sBdx rmoveto show grestore gsave sBdx dup rmoveto show grestore show} bind |
| 62 |
ifelse |
| 63 |
} bind |
| 64 |
] |
| 65 |
/asB [ |
| 66 |
{3 copy 3 copy 3 copy gsave sBdx 0 rmoveto ashow grestore gsave 0 sBdx rmoveto ashow grestore gsave sBdx sBdx rmoveto ashow grestore ashow} bind |
| 67 |
{ |
| 68 |
/PreserveTrMode /GetDeviceParam .special_op { |
| 69 |
exch pop |
| 70 |
}{ |
| 71 |
//false |
| 72 |
}ifelse |
| 73 |
{ gsave sBdx 2 div dup 0.2 setlinewidth currentcolor currentcolorspace .swapcolors setcolorspace setcolor .swapcolors rmoveto 2 .settextrenderingmode ashow currentpoint grestore moveto} |
| 74 |
{3 copy 3 copy 3 copy gsave sBdx 0 rmoveto ashow grestore gsave 0 sBdx rmoveto ashow grestore gsave sBdx dup rmoveto ashow grestore ashow} bind |
| 75 |
ifelse |
| 76 |
} bind |
| 77 |
] |
| 78 |
/wsB [ |
| 79 |
{3 copy 3 copy 3 copy gsave sBdx 0 rmoveto widthshow grestore gsave 0 sBdx rmoveto widthshow grestore gsave sBdx sBdx rmoveto widthshow grestore widthshow} bind |
| 80 |
{ |
| 81 |
/PreserveTrMode /GetDeviceParam .special_op { |
| 82 |
exch pop |
| 83 |
}{ |
| 84 |
//false |
| 85 |
}ifelse |
| 86 |
{ gsave sBdx 2 div dup 0.2 setlinewidth currentcolor currentcolorspace .swapcolors setcolorspace setcolor .swapcolors rmoveto 2 .settextrenderingmode widthshow currentpoint grestore moveto} |
| 87 |
{3 copy 3 copy 3 copy gsave sBdx 0 rmoveto widthshow grestore gsave 0 sBdx rmoveto widthshow grestore gsave sBdx dup rmoveto widthshow grestore widthshow} bind |
| 88 |
ifelse |
| 89 |
} bind |
| 90 |
] |
| 91 |
|
| 92 |
/awsB [ |
| 93 |
{3 copy 3 copy 3 copy gsave sBdx 0 rmoveto awidthshow grestore gsave 0 sBdx rmoveto awidthshow grestore gsave sBdx sBdx rmoveto awidthshow grestore awidthshow} bind |
| 94 |
{ |
| 95 |
/PreserveTrMode /GetDeviceParam .special_op { |
| 96 |
exch pop |
| 97 |
}{ |
| 98 |
//false |
| 99 |
}ifelse |
| 100 |
{ gsave sBdx 2 div dup 0.2 setlinewidth currentcolor currentcolorspace .swapcolors setcolorspace setcolor .swapcolors rmoveto 2 .settextrenderingmode awidthshow currentpoint grestore moveto} |
| 101 |
{3 copy 3 copy 3 copy gsave sBdx 0 rmoveto awidthshow grestore gsave 0 sBdx rmoveto awidthshow grestore gsave sBdx dup rmoveto awidthshow grestore awidthshow} bind |
| 102 |
ifelse |
| 103 |
} bind |
| 104 |
] |
| 105 |
|
| 106 |
/mask_pbf [ |
| 107 |
{gsave /fEOFill exch def 20 dict begin /yOrg exch def /xOrg exch def /PaintData exch def /Height exch def |
| 108 |
/Width exch def /PatternType 1 def /PaintType 2 def /TilingType 1 def /BBox[0 0 Width Height] def |
| 109 |
/XStep Width def /YStep Height def /mx xOrg yOrg matrix translate def /PaintProc{begin Width Height T 1 1 dtransform abs exch abs exch 0 0 3 -1 roll 0 0 6 array astore {PaintData}imagemask end} b |
| 110 |
currentdict mx makepattern setpattern end fEOFill{eofill}{fill}ifelse grestore} bind |
| 111 |
{ |
| 112 |
/IsDistiller /GetDeviceParam .special_op { |
| 113 |
exch pop |
| 114 |
}{ |
| 115 |
//false |
| 116 |
} ifelse |
| 117 |
{ |
| 118 |
gsave |
| 119 |
/fEOFill exch def 20 dict begin /yOrg exch def /xOrg exch def /PaintData exch def |
| 120 |
/Height exch def /Width exch def /PatternType 1 def /PaintType 2 def /TilingType 1 def |
| 121 |
/BBox[0 0 1 1] def |
| 122 |
/XStep 1 def /YStep 1 def |
| 123 |
/mx xOrg yOrg matrix translate Width Height 3 -1 roll scale def |
| 124 |
/PaintProc{begin Width Height T Width Height 0 0 3 -1 roll 0 0 6 array astore {PaintData}imagemask end} b |
| 125 |
currentdict mx makepattern setpattern end fEOFill{eofill}{fill}ifelse grestore |
| 126 |
}{ |
| 127 |
gsave /fEOFill exch def 20 dict begin /yOrg exch def /xOrg exch def /PaintData exch def /Height exch def |
| 128 |
/Width exch def /PatternType 1 def /PaintType 2 def /TilingType 1 def /BBox[0 0 Width Height] def |
| 129 |
/XStep Width def /YStep Height def /mx xOrg yOrg matrix translate def /PaintProc{begin Width Height T 1 1 dtransform abs exch abs exch 0 0 3 -1 roll 0 0 6 array astore {PaintData}imagemask end} b |
| 130 |
currentdict mx makepattern setpattern end fEOFill{eofill}{fill}ifelse grestore |
| 131 |
} ifelse |
| 132 |
} bind |
| 133 |
] |
| 134 |
>> |
| 135 |
/IdiomSet defineresource pop |
| 136 |
|
| 137 |
<</IdiomRecognition 3 -1 roll>> setuserparams |