I am using a custom table of contents style, but when I get to high page numbers (>100) the gap between the title and the page number gets very small. Does anyone know how to fix that? It seems like it is simply right aligned, whereas I would like it to be left aligned with a gap between text and title.

MWE: \documentclass[openany]{memoir}

\usepackage{lipsum}

\renewcommand{\cftpartfont}{\large}
\renewcommand{\cftpartafterpnum}{\cftparfillskip}
\cftsetindents{part}{0em}{0em}
\renewcommand{\partnumberline}[1]{}
\cftpagenumbersoff{part}

\renewcommand{\cftchapterfont}{\normalsize}
\renewcommand{\cftchapterpagefont}{\normalsize}
\renewcommand{\cftchapterpresnum}{\bfseries}
\renewcommand{\cftchapterafterpnum}{\cftparfillskip}

\begin{document}

\chapter*{Acknowledgements}
\lipsum[1]

\tableofcontents*

\chapter{Introduction}
\lipsum[1]

\chapter{Background}
\lipsum[1]

\chapter{Conclusion}
\lipsum[1]

\end{document}

• Well, the typical TOC where the page number is all the way on the left on the page does not really make sense. At least I never look at a TOC and think "I wonder what chapter starts on page 49?". Having the page number directly after the chapter title conforms better to the function of the TOC, which is figure out the structure of the text and allows for skipping ahead to some parts of the text. – maero21 Jul 4 '18 at 16:44

\renewcommand*{\cftchapterformatpnum}[1]{%