Here you go:
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[margin=1cm]{geometry}
\usepackage{xinttools}
\newcommand\WithFont [4]{%
\csname text#1\endcsname {%
\csname text#3\endcsname {%
\csname text#2\endcsname {#4}}}}
\begin{document}
\begin{table}
\centering
\Large\textbf{Computer Modern fonts (pdf\LaTeX) [10pt]}\\
\small
Selected using \detokenize{\textA{\textB{\textC{(some text)}}}},\\
with A in \detokenize{{rm, sf, tt}}; B in \detokenize{{md, bf}}; C in
\detokenize{{up, it, sl, sc}}\\
\begin{tabular}{*{9}{l}}
\bf Font&\bf 1em&&\bf M-width&\bf 1ex&&\bf x-height&\bf x-width&\bf x-depth\\
\hline
\xintForpair #1#2 in {(Roman,rm), (Sans,sf), (Typewriter,tt)} \do
{%
\xintFor #3 in {up, it, sl, sc}\do
{%
\xintFor #4 in {md, bf}\do
{%
\WithFont {#2}{#3}{#4}{#1, #3, #4\normalsize
\xdef\oneem{\the\dimexpr 1em\relax}%
\xdef\oneex{\the\dimexpr 1ex\relax}%
\setbox0\hbox{M}\xdef\Mwidth{\the\wd0}%
\setbox0\hbox{x}\xdef\xheight{\the\ht0}%
\xdef\xwidth{\the\wd0}%
\xdef\xdepth{\the\dp0}}%
&\oneem&\WithFont{#2}{#3}{#4}{\normalsize\strut M}&\Mwidth
&\oneex&\WithFont{#2}{#3}{#4}{\normalsize x}&\xheight&\xwidth&\xdepth
\\
}%
}\hline
}\hline
\end{tabular}
\end{table}
\end{document}
(\normalsize added in edit, because all the table was produced earlier under \small regime, including computation of dimensions).

Attention that in the table above, there are a number of font substitutions going on :
LaTeX Font Warning: Font shape `T1/cmss/m/sc' in size <9> not available
(Font) Font shape `T1/cmr/m/sc' tried instead on input line 55.
LaTeX Font Warning: Font shape `T1/cmss/m/sc' in size <10> not available
(Font) Font shape `T1/cmr/m/sc' tried instead on input line 55.
LaTeX Font Warning: Font shape `T1/cmss/bx/sc' undefined
(Font) using `T1/cmss/bx/n' instead on input line 55.
LaTeX Font Info: Font shape `T1/cmtt/bx/n' in size <9> not available
(Font) Font shape `T1/cmtt/m/n' tried instead on input line 55.
LaTeX Font Info: Font shape `T1/cmtt/bx/n' in size <10> not available
(Font) Font shape `T1/cmtt/m/n' tried instead on input line 55.
LaTeX Font Info: Font shape `T1/cmtt/bx/it' in size <9> not available
(Font) Font shape `T1/cmtt/m/it' tried instead on input line 55.
LaTeX Font Info: Font shape `T1/cmtt/bx/it' in size <10> not available
(Font) Font shape `T1/cmtt/m/it' tried instead on input line 55.
LaTeX Font Warning: Font shape `T1/cmtt/bx/sl' undefined
(Font) using `T1/cmtt/bx/n' instead on input line 55.
LaTeX Font Info: Font shape `T1/cmtt/bx/sl' in size <10> not available
(Font) Font shape `T1/cmtt/m/n' tried instead on input line 55.
LaTeX Font Info: Font shape `T1/cmtt/bx/sl' in size <9> not available
(Font) Font shape `T1/cmtt/m/n' tried instead on input line 55.
LaTeX Font Warning: Font shape `T1/cmtt/bx/sc' undefined
(Font) using `T1/cmtt/bx/n' instead on input line 55.
LaTeX Font Info: Font shape `T1/cmtt/bx/sc' in size <10> not available
(Font) Font shape `T1/cmtt/m/n' tried instead on input line 55.
LaTeX Font Info: Font shape `T1/cmtt/bx/sc' in size <9> not available
(Font) Font shape `T1/cmtt/m/n' tried instead on input line 55.
I thought about for example drawing a strike-through line across the full row, but doing this automatically has complications. As this is not the main focus of the OP, I just leave standing as is.
For automatic determination, shamelessly copying over egreg's answer into another syntax. Notice that xinttools used above is a separate package from xintfrac used below.
\documentclass[border=4pt]{standalone}
\usepackage{zlmtt}
\usepackage{xintfrac}
\makeatletter
\newcommand{\scalezlmtt}[2][1]{%
{\setbox0\hbox{\normalfont #2}%
\setbox2\hbox{\fontfamily{lmtt}\selectfont #2}%
\xdef\zlmtt@scale {\xintPFloat {\xintMul{#1}{\ht0/\ht2}}}%
\typeout{zlmtt scaling factor: \zlmtt@scale}%
}%
}%
\makeatother
\AtBeginDocument{\scalezlmtt[.9]{a}}
\begin{document}
TT font scaled to 90\% lowercase: A\texttt{A}a\texttt{a}
\end{document}

You will find in the log:
zlmtt scaling factor: 0.9143980556305698
This differs in the last digit from l3fp's calculation, but that's not so much typographically relevant...
(try it with \xintPFloat [32]... for example if you want more --irrelevant-- digits, well ok I did it:
zlmtt scaling factor: 0.91439805563056980826357007831488
I would really need a scaling factor of 0.1 to hide my irrelevant toying here)
zlmtt; there's probably some automatic method to find the correct factor without looking at tables or eyeballing. – egreg Feb 18 '16 at 14:03\edefprimitive. LaTeX's\newcommandis a wrapper for\def, but there is no one for\edef. Replace all your\renewcommand's by\edef's and it should work. By the way, do leave the\newcommandin the preamble, to check that nothing defined in packages is overwritten. I should have chosen longer names, like\heightofletterx. (my answer uses\xdefwhich is\global\edef, needed due to cell scope). – Feb 19 '16 at 07:52\heightofletterx" I like the emacs convention of amyprefix when I want to avoid collisions with my own personal code and published code, which helps preserve brevity. – dedded Feb 19 '16 at 12:45