I'm playing with coffins for a title page and would like to have a square framed box that aligns with the topline and baseline of text within a rotated coffin. I have a couple of issues with this so far that I need some help with:
There appears to be a margin to the left and right of the frame that produces space between the handles and the frame. Why is this here and how can I fix it?
The framed box, in addition to not being square, is too large. How can I set the size of the framed box to match the height of the text?

From the image (edited a bit to show the problem) the handles on the text appear to be where I would expect as are the handles on the top and bottom of the framed box. MWE below.
\documentclass{article}
\usepackage{tgheros}
\usepackage[T1]{fontenc}
\usepackage{xcoffins}
\usepackage{xcolor}
\renewcommand*\familydefault{\sfdefault}
\begin{document}
\NewCoffin \result
\NewCoffin \TRBlock
\NewCoffin \LeftMar
\SetHorizontalCoffin \result {}
\SetHorizontalCoffin \LeftMar {\fontsize{52}{50}\selectfont\color{gray}D}
\SetHorizontalCoffin \TRBlock {
\fbox{\begin{minipage}[c][\CoffinHeight\LeftMar]{\CoffinHeight\LeftMar}\centering A\end{minipage}}
}
\RotateCoffin \LeftMar {90}
\JoinCoffins\result[vc,hc]\LeftMar[r,vc]
\JoinCoffins\result[\LeftMar-B,\LeftMar-r] \TRBlock[r,b]
\TypesetCoffin \result
\end{document}
\fboxadds a margin: try setting\fboxsep = 0 pt. Also, watch for additional spaces: you need a%after the{in the\SetHorizontalCoffin \TRBlockline, for example. – Joseph Wright Jun 09 '12 at 07:37