[XeTeX] bounding box of a character

Wenchang Sun xecjk at yahoo.cn
Tue Jun 3 06:40:56 CEST 2008


Thanks! 
   
  The "ink box" could be the one I am looking for. I want to trim off the spaces around a punctuation char.
   
  Best,
  Wenchang

Will Robertson <wspr81 at gmail.com> 写道:
  On 03/06/2008, at 10:47 AM, Wenchang Sun wrote:

> Is there a macro to get the bounding box of a char?
> I think it could be easy for XeTeX to do that because XeTeX know the 
> font metric.

You can get the bounding box but not the "ink box". In LaTeX terms, 
it's something like:

\newlength\lengtha
\newlength\lengthb
\newlength\lengthc
\settowidth\lengtha{a}
\settoheight\lengthb{a}
\settodepth\lengthc{a}

The calc package also provides the \lengthof{} (etc.) macros when 
calculating lengths.

Hope this helps,
Will

P.S. Please don't reply to a previous message to the list with a new 
subject to start a new thread; it messes up threading of the previous 
messages and makes it harder to find things :)_______________________________________________
XeTeX mailing list
postmaster at tug.org
http://tug.org/mailman/listinfo/xetex


       
---------------------------------
 雅虎邮箱,您的终生邮箱!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20080603/f600eed0/attachment.html 


More information about the XeTeX mailing list