Hmm, looks better now: with your idea I made another test, which can produce the following picture...

- this look fine...
- ok.jpeg (11.64 KiB) Viewed 3854 times

- not precisely for width, but close...
- Ā reg.jpeg (7.32 KiB) Viewed 3854 times
If italic is used, the situation gets worse however (!zoom problem in effect!):

- not so good at all...
- Ā italic.jpeg (5.15 KiB) Viewed 3854 times
Also I didn't realize that my PDF viewer doesn't show correctly while not zoomed close enough (Adobe Acrobat 9, well)...
This could be produced with the following code:
Code: Select all
\documentclass{article}
\usepackage{geometry} % just to set up the page margin distances
\usepackage{xcolor} % to have colors, also required by tabu
\usepackage{fontspec} % provides font selecting commands
\usepackage{calc}
\geometry{papersize={11cm, 7cm}, inner=4mm,outer=4mm,top=4mm,bottom=4mm}
\definecolor{myblue}{rgb}{0, 0.4, 0.7}
\definecolor{mygreen}{rgb}{0, 1, 0}
\definecolor{myred}{rgb}{1, 0, 0}
\definecolor{myorange}{rgb}{1, 0.7, 0}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont{Times New Roman}
\newcommand{\textmode} {%
\color{myblue}%
\fontsize{160}{0}%
\bfseries%
%\itshape
}
\newlength{\widthB}%
\newlength{\heightB}%
\newlength{\depthB}%
\newlength{\thicknessLine}
\setlength{\thicknessLine}{2pt}
\newcommand{\bAnalyze}[1]{%
\settowidth{\widthB}{\usebox{#1}}%
\settoheight{\heightB}{\usebox{#1}}%
\settodepth{\depthB}{\usebox{#1}}%
\color{myorange}%
\usebox{#1}%
\llap{%
\rule[-\thicknessLine]{\widthB}{\thicknessLine}%
}%
\color{mygreen}%
\vrule width \thicknessLine height \heightB depth 0pt \relax%
\color{myred}%
\llap{%
\vrule width \thicknessLine height 0pt depth \depthB \relax%
}%
}
\begin{document}
\thispagestyle{plain}
\newsavebox{\analyzeBox}
\savebox{\analyzeBox}{\textmode{}Ā}
\bAnalyze{\analyzeBox}
\end{document}
So the question is in part still valid:
can I get exact dimensions of some (whatever) element (glyph, table, picture etc), meaning the visible width, height and depth?