[Tex/LaTex] Vertical alignment between a custom symbol and text

symbolsvertical alignment

I managed to include symbols inside custom fonts (.ttf):

\documentclass[12pt]{article} 
\usepackage{fontspec}

\newcommand*{\icmobile}{{\fontspec{mat.ttf}\symbol{"E0D4}}}
\newcommand*{\icpin}{{\fontspec{mat.ttf}\symbol{"E55E}}}
\newcommand*{\icmail}{{\fontspec{mat.ttf}\symbol{"E158}}}
\newcommand*{\icarrowr}{{\fontspec{mat.ttf}\symbol{"E5CC}}}

\begin{document}

\icmail \hspace{2mm} my.email@domain.it 


\begin{itemize} 
   \item[\icarrowr] one 
   \item[\icarrowr] two
   \item three \dots{}
\end{itemize}

\end{document}

But I can not vertically align text and symbols.

enter image description here

…as you can see the symbol is always higher than the text.

I'm creating the custom fonts symbols correctly? It's possible to achieve the vertical center alignment between symbol and text?

Thanks in advance.

Best Answer

If a 'glyph' or box is too high or low compared to the baseline, it is possible to raise or lower it with \raisebox{dimension value}{content}. Positive values raise the content, negative values shift it down.

The precise value depends on the font size declarations and the details of the symbol actually.

Perhaps it is possible to query the depth of the glyph box.

Related Question