[XeTeX] bounding box of a character

Will Robertson wspr81 at gmail.com
Tue Jun 3 04:22:48 CEST 2008


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 :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2415 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20080603/8dac7509/attachment.bin 


More information about the XeTeX mailing list