I try to use the command outlined by David Carlisle here: Flush what's following \hfill to the next line if it doesn't fit
But in this MWE it doesn't work:
\documentclass[fontsize=10pt]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[babel]{microtype}
\usepackage[textwidth=10cm]{geometry}
\def\foo{\hspace{\fill}\mbox{}\linebreak[0]\hspace*{\fill}}
\begin{document}
Schöne Verhältnis herzustellen, in
welchem sich erst das eigentliche Talent zeigt, bleibt abzuwarten.\foo\mbox{H. B.}
\end{document}
The name of the author is moved to the next line even though there is enough space:

Why?
babel. In particular, by thengermanoption. Changengermantoenglishto see the effect. – Steven B. Segletes May 05 '17 at 14:53\usepackage[T1]{fontenc}– David Carlisle May 05 '17 at 15:14