I'm using the small capital font \textsc{MyAlgorithm} several times inside my algorithm2e environment as follows:
\documentclass[a4paper, english]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage[ruled,linesnumbered,vlined]{algorithm2e}
\begin{document}
\begin{algorithm}
\DontPrintSemicolon
\FuncSty{${\textsc{FirstAlgorithm}}(a, b))$} \Begin{
$ X \leftarrow \textsc{AnotherAlgorithm}(c, d)$\;
}
\end{algorithm}
\end{document}
I don't undestand why FirstAlgorithm has a completely and unexpected (looks like \textit) font and AnotherAlgorithm later looks as it should? Any ideas?