I compile small latex math snippets using the standalone document class. I rasterize the resulting PDF to a PNG image using ImageMagick and finally include these images in some HTML document. However, for technical reasons of this procedure, I want to ensure a specific height of the document above + below the baseline, let's say the letter "Q" should always fit vertically, even if the document only contains one single "a".
I thought about including a phantom letter, but this also introduces additional whitespace in the horizontal dimension. Is there an easy way to tell standalone (or a special environment) to at least include a specific height above + below the baseline of the text? Is there some phantom-similar thing which enlarges the bounding box but doesn't occupy space by itself? I also thought abut a tikz image which doesn't draw anything but specify a bounding box. However, including the tikz package for this reason only will make compilation very slow since I have to compile dozens of latex snippets.
I use lualatex (but only because of the easy integration of true type fonts) and currently I compile the latex snippets using the following document template (the ... is replaced with the latex snipped to be rendered):
\documentclass{standalone}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{arev}
\usepackage{amsmath}
\begin{document}
$...$
\end{document}
(If this is not possible, I'll just use a phantom text to specify my minimum vertical bounding box + auto-crop the rasterized image horizontally.)

\vphantomthat only uses the vertical dimensions. – egreg Nov 27 '12 at 21:09