| % Color and reverse video support for dpost. A call made to setcolor with two |
| % arguments implies reverse video printing. |
| /rgb {setrgbcolor} bind def |
| /hsb {sethsbcolor} bind def |
| /colordict 50 dict dup begin |
| dup colordict exch known not {pop /black} if |
| colordict exch get exec setrgbcolor |
| colordict backcolor known not colordict textcolor known not or { |
| /backcolor colordict /black get def |
| /textcolor colordict /white get def |
| /backcolor colordict backcolor get def |
| /textcolor colordict textcolor get def |
| textcolor exec setrgbcolor |
| currentfont /FontBBox get aload pop |
| currentfont /FontMatrix get dtransform /dY2 exch def pop |
| currentfont /FontMatrix get dtransform /dY1 exch def pop |
| backcolor exec setrgbcolor |
| textcolor exec setrgbcolor |