Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!mcsun!hp4nl!alchemy!piet From: piet@cs.ruu.nl (Piet van Oostrum) Newsgroups: comp.lang.postscript Subject: Re: Obliquing fonts Keywords: Oblique, slant, tan Message-ID: <1991May23.140358.23521@cs.ruu.nl> Date: 23 May 91 14:03:58 GMT References: <24968@well.sf.ca.us> <1991May23.092143.14619@nntp-server.caltech.edu> Sender: piet@cs.ruu.nl (Piet van Oostrum) Reply-To: piet@cs.ruu.nl (Piet van Oostrum) Organization: Dept of Computer Science, Utrecht University, The Netherlands Lines: 40 In-Reply-To: carl@hamlet.caltech.edu (Lydick, Carl) >>>>> carl@hamlet.caltech.edu (Lydick, Carl) (LC) writes: LC> In article <24968@well.sf.ca.us>, capslock@well.sf.ca.us (Allen Crider) writes... >I'm trying to oblique a roman font. I know the pointsize and I know the >obliquing angle. The only example of obliquing type I have seen is in >the Blue book (Tutorial and Cookbook) in which they give an example of >a font obliqued 30 degrees: > [12 0 6.93 12 0 0] makefont > "The 6.93 in our last matrix above is the product of 12xtan30, so our >characters are obliqued by thirty degrees." Says the Blue Book. > >I tried doing this in C: >f = 12 * tan(30); > >and get 76.864, not 6.93. >Since I wasn't around when they passed out the trigonometry, maybe some >kind soul could guide me to the best way to figure out the correct value >to put in that matrix. Thanks LC> PostScript uses degrees. C's tan() uses radians. Tan(30 degrees) = 1/sqrt(3), LC> which is, in fact, about 6.93. Well, nitpicking: It is 6.93 after multiplying by 12: Emacs Calc Mode v1.07 by Dave Gillespie 30 tan 0.57735026919 12 * 6.92820323028 Moreover he gave tan an int, whereas it needs a double (apparently he used no ANSI style prototypes) so the result was very much implementation dependent. Just using a calculator would have been easier. -- Piet* van Oostrum, Dept of Computer Science, Utrecht University, Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands. Telephone: +31 30 531806 Uucp: uunet!mcsun!ruuinf!piet Telefax: +31 30 513791 Internet: piet@cs.ruu.nl (*`Pete')