Path: utzoo!utgpu!watmath!att!dptg!rutgers!tut.cis.ohio-state.edu!ucbvax!decwrl!adobe!greid From: greid@adobe.com (Glenn Reid) Newsgroups: comp.lang.postscript Subject: Re: bizarre bbox behaviour Keywords: sideBearings,"f" Message-ID: <1074@adobe.UUCP> Date: 15 Aug 89 14:32:37 GMT References: <281@unmvax.unm.edu> Sender: news@adobe.COM Reply-To: greid@adobe.COM (Glenn Reid) Organization: Adobe Systems Incorporated, Mountain View Lines: 26 In article <281@unmvax.unm.edu> stone@unmvax.cs.unm.edu (Andrew Stone) writes: >Enlightenment, please! > >It works fine except for the letter "f" in Times-Roman, the >top right part of the f does not get filled. It must overhang its bounding >box, a poor computer scientist's ligature device? Or is the stringwidth of >a character different from the bbox? The stringwidth of a character is the amount by which the current point is displaced. It has nothing to do with the bounding box, other than coincidence (Take a look at the Sonata font if you want to see a strong example of this). What you want is to use the bounding box information directly. This is found in the font metrics files (AFM files) which are avaiable on NeXT. I think it should be available through the NXFontMetrics or whatever the call is, but I've not tried it. You get four numbers, LLx, LLy, URx, URy (lower-left, upper-right). These numbers are expressed from the origin of the character. Many italic characters actually extend somewhat to the right of their width and to the left of their origins, for better visual placement. Glenn Reid Adobe Systems