🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #2537

Re: Character side bearings

#2537
From: Glenn Reid
Date: Mon, 16 Jul 1990 23:31
27 lines
1477 bytes
In article <2260@dino.cs.iastate.edu> hascall@cs.iastate.edu (John Hascall) writes:
>Greetings fellow PSers,
>
>   How does one determine the left side bearing of a character (in a
>particular font)?  I am looking at section 5.5, "Font Metric Information",
>of the Red Book, (pp 95-96), which says:  "The sequence
>
>   charpath flattenpath pathbbox
>
>may be used to determine character bounding boxes and side bearings."

The left side bearing is the difference in X between the lower-left
corner of the bounding box and the origin of the character.

The right side bearing is the difference in X between the upper-right
corner of the bounding box and (origin + width) of the character.

Assuming that the origin is at zero, the left side bearing is just the
llX value of the bounding box, and the right side bearing is
(width - urX).

/Glenn

-- 
 Glenn Reid				PostScript/NeXT consultant
 glenn@heaven.woodside.ca.us		Independent Software Developer
 ..{adobe,next}!heaven!glenn		415-851-1785
Technical Details
Message-ID: <209@heaven.woodside.ca.us>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sdd.hp.com!decwrl!adobe!heaven!glenn
References: <2260@dino.cs.iastate.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sdd.hp.com!decwrl!adobe!heaven!glenn
From: glenn@heaven.woodside.ca.us (Glenn Reid)
Newsgroups: comp.lang.postscript
Subject: Re: Character side bearings
Message-ID: <209@heaven.woodside.ca.us>
Date: 16 Jul 90 23:31:40 GMT
References: <2260@dino.cs.iastate.edu>
Reply-To: glenn@heaven.UUCP (Glenn Reid)
Distribution: usa
Organization: Skyline Press, Woodside CA
Lines: 27