Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!apple!well!shiva From: shiva@well.sf.ca.us (Kenneth Porter) Newsgroups: comp.lang.postscript Subject: Re: limitcheck in flattenpath Summary: Confusion Message-ID: <21743@well.sf.ca.us> Date: 21 Nov 90 15:43:22 GMT References: <1642@umriscc.isc.umr.edu> <1698@chinacat.Unicom.COM> Lines: 23 There seems to be some confusion about the desired result of the char-fitting code. The idea was to, given a box, fit a character so that it *exactly* fit the box. The box could be as big as a page. stringwidth won't work here because it gives the change in the current point. The character origin is not co-incident with the bounding box origin, and the character width (returned by stringwidth) is not the same as the right-most edge of the bounding box, nor is it the same as the width of the bounding box. A character can bulge outside of its origin, width and baseline, or may not reach all the way to any of these dimensions. The only way to know for sure is to use the character bounding box calculated at the desired size (to compensate for hinting). The font bbox will give an even worse value for this purpose than stringwidth. Ken (shiva@well.sf.ca.us)