Using the latest (2012-05-18) ulem package gives inconsistent underlining after font changes respectively depending on the position of the underlined text:
\documentclass{article}
\usepackage{ulem}
\begin{document}
\textbf{foo} \dashuline{bar}\par
\textit{foo} \dashuline{bar}\par
f \dashuline{bar}\par
fo \dashuline{bar}\par
foo \dashuline{bar}\par
foof \dashuline{bar}\par
foofo \dashuline{bar}\par
\end{document}
leads to

with different a) counts of dashes and b) horizontal placement relative to the underlined word.
Is there a way to get consistent (\dashuline{bar} looking exactly the same in all above positions) underlining?


\dashulineuses a fixed grid. – karlkoeller Feb 08 '14 at 09:25