xref: /illumos-gate/usr/src/cmd/lp/filter/postscript/font/devpost/charlib/rc (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1%ident	"@(#)lp:filter/postscript/font/devpost/charlib/rc	1.2"
2%
3% CDDL HEADER START
4%
5% The contents of this file are subject to the terms of the
6% Common Development and Distribution License, Version 1.0 only
7% (the "License").  You may not use this file except in compliance
8% with the License.
9%
10% You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11% or http://www.opensolaris.org/os/licensing.
12% See the License for the specific language governing permissions
13% and limitations under the License.
14%
15% When distributing Covered Code, include this CDDL HEADER in each
16% file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17% If applicable, add the following below this CDDL HEADER, with the
18% fields enclosed by brackets "[]" replaced with your own identifying
19% information: Portions Copyright [yyyy] [name of copyright owner]
20%
21% CDDL HEADER END
22%
23%
24% This stuff has gotten terribly complicated - sorry.
25%
26
27currentdict /bvbbox known not {/bvbbox [0 0 0 0 0 0 0] def} if
28
29/build_rc {
30    pop
31    gsave
32	currentpoint translate newpath
33	bvbbox 6 get size ne {
34	    gsave
35		initgraphics
36		scaling scaling scale
37		0 0 moveto
38		(\357) false charpath flattenpath pathbbox 0 0 size bvbbox astore pop
39		0 1 idtransform dup mul exch dup mul add sqrt dup
40		bvbbox 1 get add bvbbox 1 3 -1 roll put
41		bvbbox 3 get exch sub bvbbox 3 3 -1 roll put
42		bvbbox 2 get bvbbox 0 get sub bvbbox 4 3 -1 roll put
43		bvbbox 2 get bvbbox 0 get add 2 div bvbbox 5 3 -1 roll put
44	    grestore
45	} if
46	bvbbox 2 get bvbbox 1 get moveto
47	bvbbox 2 get bvbbox 3 get lineto
48	bvbbox 5 get bvbbox 4 get 8 mul sub dup bvbbox 3 get lineto
49	bvbbox 1 get lineto closepath clip newpath
50	0 0 moveto (\357) show
51	bvbbox 5 get bvbbox 3 get moveto
52	bvbbox 4 get dup dup
53	8 mul neg 0 rlineto
54	0 exch neg rlineto
55	8 mul 0 rlineto
56	closepath clip eofill
57    grestore
58} def
59