1*7c478bd9Sstevel@tonic-gate#ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.1	*/
2*7c478bd9Sstevel@tonic-gate#
3*7c478bd9Sstevel@tonic-gate# CDDL HEADER START
4*7c478bd9Sstevel@tonic-gate#
5*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
6*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
7*7c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
8*7c478bd9Sstevel@tonic-gate# with the License.
9*7c478bd9Sstevel@tonic-gate#
10*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
12*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
13*7c478bd9Sstevel@tonic-gate# and limitations under the License.
14*7c478bd9Sstevel@tonic-gate#
15*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
16*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
18*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
19*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
20*7c478bd9Sstevel@tonic-gate#
21*7c478bd9Sstevel@tonic-gate# CDDL HEADER END
22*7c478bd9Sstevel@tonic-gate#
23*7c478bd9Sstevel@tonic-gate
24*7c478bd9Sstevel@tonic-gate lc, rc, lf, and rf contain PostScript code that can be used to build the top
25*7c478bd9Sstevel@tonic-gate and bottom bracket pieces used by eqn. The files are only used if the character
26*7c478bd9Sstevel@tonic-gate code field in the S font file for lc, rc, lf, and rf is set to 1. A code larger
27*7c478bd9Sstevel@tonic-gate than 32 means a character from Adobe's Symbol font will be used. Think the real
28*7c478bd9Sstevel@tonic-gate solution is to change eqn so large brackets and braces are built differently.
29*7c478bd9Sstevel@tonic-gate
30*7c478bd9Sstevel@tonic-gate There were some serious collisions with eqn's bracket building algorithm and
31*7c478bd9Sstevel@tonic-gate Adobe's Symbol font. eqn extends all the pieces with the \(bv character, while
32*7c478bd9Sstevel@tonic-gate the bracket and brace pieces available in Adobe's Symbol are all quite different
33*7c478bd9Sstevel@tonic-gate and are designed to work with their own extenders. The reference points are
34*7c478bd9Sstevel@tonic-gate different, but worse still the thickness of brackets and braces don't match.
35*7c478bd9Sstevel@tonic-gate Anyway using a single extender (the way eqn does) can't ever work with the
36*7c478bd9Sstevel@tonic-gate bracket and brace characters available in Adobe's Symbol font.
37*7c478bd9Sstevel@tonic-gate
38*7c478bd9Sstevel@tonic-gate The lc, rc, lf, and rf files are a very complicated attempt to get around the
39*7c478bd9Sstevel@tonic-gate problem. Each builds the troff character by using the \(bv character from the
40*7c478bd9Sstevel@tonic-gate Symbol font and then draws a small horizontal line at either the top or bottom
41*7c478bd9Sstevel@tonic-gate of the \(bv. Using \(bv for the vertical part guarantees things will stack
42*7c478bd9Sstevel@tonic-gate properly, but getting to the precise top or bottom of the \(bv (down to the
43*7c478bd9Sstevel@tonic-gate pixel level on all devices and in all sizes) proved to be very difficult. In
44*7c478bd9Sstevel@tonic-gate fact you would think that determining the bounding box of \(bv would be enough
45*7c478bd9Sstevel@tonic-gate to let you draw a good bracket piece that matched up nicely with the extender.
46*7c478bd9Sstevel@tonic-gate Not quite, at least I didn't find that it was possible to do a good job drawing
47*7c478bd9Sstevel@tonic-gate the pieces from the \(bv bounding box. Think roundoff errors introduced by the
48*7c478bd9Sstevel@tonic-gate CTM caused the trouble, although I expect there's more to it.
49*7c478bd9Sstevel@tonic-gate
50*7c478bd9Sstevel@tonic-gate Clipping a rectangular region 2 pixels smaller in height than the bounding box
51*7c478bd9Sstevel@tonic-gate of the \(bv character, and using the corners of that box to locate the top and
52*7c478bd9Sstevel@tonic-gate bottom of the bv for the horizontal extender solved the problems I originally
53*7c478bd9Sstevel@tonic-gate had with the precise placement of the horizontal rule. Anyway that's what the
54*7c478bd9Sstevel@tonic-gate clipping and idtransform are for. The initgraphics stuff is an attempt to fit
55*7c478bd9Sstevel@tonic-gate a tight bounding box around the \(bv character independent of the rotation of
56*7c478bd9Sstevel@tonic-gate our coordinate system. pathbbox only returns what we want if the coordinate
57*7c478bd9Sstevel@tonic-gate system has been rotated by a multiple of 90 degrees.
58*7c478bd9Sstevel@tonic-gate
59