# Generate a “blank” font using the metrics of another font

This question is in relation to one of my previous questions: How to replace a large block of text by an empty block of the same size?

Is it possible to generate a "blank" font using the metrics of another font in LaTeX? Can this be done "on the fly", during the typesetting of the document?

-
Not "on the fly", without substantial work. Moreover this would defeat your purpose, as the metric information and the character names would be present in the output. –  egreg Jun 5 '12 at 12:45
Are you after something substantially different than \textcolor{white}{Some text}? –  Scott H. Jun 5 '12 at 16:08
You could also produce transparent text as per the answers here –  Scott H. Jun 5 '12 at 16:19
@ScottH. Please see the linked post. Changing color is the easiest alternative and has a similar effect, but it is not the same. –  digital-Ink Jun 5 '12 at 16:47
@digital-Ink: It's still worth trying to produce a minimal example - you might find a bug in one of the packages! For each package, you could try to see what happens if you remove it. –  Hendrik Vogt Jun 6 '12 at 9:41

Edit: different method.

Depending on what you want to do with it, the implementation could likely be improved, but how about the following:

\documentclass{article}
\usepackage{xcolor}
\usepackage{transparent}
\usepackage{etoolbox}

\newbool{trans}

\newcommand{\transon}{
\booltrue{trans}
}
\newcommand{\transoff}{
\boolfalse{trans}
}
\newcommand{\ttext}[1]{
\ifbool{trans}
{\texttransparent{0}{#1}}
{#1}
}

\begin{document}

\transoff{}
\ttext{Here is some text.}

\transon{}
\ttext{Here is some text.}

\end{document}

-

@digital-Ink: am not sure this answers your question but the command \special{color rgb X Y Z} changes the color of the pen' until the document ends or you change the color again. Here X Y Z is the rgb color specification, so you could just change it to white, i.e.

\special{color rgb 1 1 1}


would change the font color to white but of course latex keeps going as though nothing happened.

\special{color rgb 0 0 0}
`

changes it back to normal.

-
Welcome to TeX.sx! No need to sign your posts since your user badge will show as part of any posts you make. –  Peter Jansson Feb 22 '13 at 12:47