How Do I Get a Glyph's Bounding Box After a "glyphshow"?
I am trying to capture the bounding box from painting a character using glyphshow, but the result seems not to be the actual bounding box. Here is a snippet of PS code that I am trying:
% begin snippet
/BickhamScriptPro-Bold 70 selectfont
0 0 moveto
newpath
/glyphname glyphshow pathbbox
/ury exch def
/urx exch def
/lly exch def
/llx exch dev
% end snippet
I use the result to center the glyph like so:
% begin snippet
/hw llx urx add .5 mul def
0 hw sub 0 moveto /glyphname glyphshow
% end snippet
For the glyph I'm using the result is not centered ("d.begin", font: Adobe Bickham Script Bold). Note the glyph is a very slanted cursive 'd' with the upper right part extending well over adjacent characters to its right.
What am I doing wrong?
Thanks.
