# Title spacing and margins in moderncv

I just noted something weird with my resume written in moderncv (obviously): the \firstname{} is typeset slightly outside the page margins. This is most visible on the left margin, but upon close zoom it's also possible to see that the top of the A crosses the upper margin as well. When letting \familyname{} begin on the next line, it's slightly indented to the right. So is the \title{} macro. How can I get them properly aligned to the page margin?

MWE:

\documentclass[a4paper,10pt]{moderncv}

\moderncvstyle{classic}
\moderncvcolor{green}
\renewcommand{\familydefault}{\rmdefault}

\usepackage[utf8]{inputenc}
\usepackage{fouriernc}
\usepackage[scale=0.75, showframe]{geometry}

\firstname{Andrew}
\familyname{\\ Doe}
\title{Curriculum Vitae}

\begin{document}
\maketitle
\end{document}


Producing

EDIT:

Following Stevens feedback on fonts, I tried to skip the fouriernc package, and use Computer Modern. It solves the problem with the \title{} print, but the names are still off.

The issue is the font itself, as seen by the \fbox around "A" and "D" in this MWE below. It is typical for font designers to allow "protrusions" of letters beyond their bounding box. It is a form of trickery to (if done properly) give the appearance of uniformity by introducing a little bit of non-uniformity...a form of optical illusion. In this case, it fails. See my answer here, What is the local height of a capital letter?, for more details and a reference to the literature on the subject.

\documentclass[a4paper,10pt]{moderncv}

\moderncvstyle{classic}
\moderncvcolor{green}
\renewcommand{\familydefault}{\rmdefault}

\usepackage[utf8]{inputenc}
\usepackage{fouriernc}
\usepackage[scale=0.75, showframe]{geometry}

\fboxrule=.1pt
\fboxsep=-\fboxrule
\firstname{Andrew}
\familyname{\newline Doe}
\title{Curriculum Vitae}

\begin{document}
\maketitle

~\scalebox{3}{\fbox{\Huge A}}~\scalebox{3}{\fbox{\Huge D}}
\end{document}


One can manually fix it for this font by defining

\firstname{\kern.4ptAndrew}
\familyname{\\\leavevmode\kern-,9pt Doe}


• Aha! There's so much to learn... The A and D are still not aligned in your MWE. See my edit! :-) Apr 15 '16 at 12:22
• @Holene The issue exists for both "A" and "D". I gave a general comment on how to fix it manually with leading kerns. I have revised my solution to provide a more precise rendition. Apr 15 '16 at 12:31
• @Holene Seeing your edit, I will note that changing fonts won't necessarily fix the problem. Protrusions are a part of the artistry of fonts. You would have more luck changing your name from "Andrew Doe" than in getting fonts to not protrude by default. Apr 15 '16 at 12:40

To add to the nice (and correct) answer of Steven B. Segletes, notice that the reason of the protrusion is the following:

Thiese square and circle have the same height, but the squares look optically taller than the circles, especially at small size. The same for lining letters at the start or end of a paragraph. This is the reason why the font designers add overshoots to some features.

Now, this should be different for different size of the font ("optically adjusted sizes"), but most font now are scaled automatically. So it's ok on smaller size, and not-so-ok on bigger ones...

Reference: Coursera course on typography

BTW --- they are the same size. I did that with

\documentclass[margin=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning,calc}
\begin{document}
\def\do{%
\draw [ultra thick] (0cm,0cm) rectangle (1cm,1cm);
\draw [ultra thick] (2cm, 0.5cm) circle (0.5cm);
}
\begin{tikzpicture}[]
\begin{scope}[yshift=-0cm, scale=0.5]
\do
\end{scope}
\begin{scope}[yshift=-0.5cm, scale=0.25]
\do
\end{scope}\begin{scope}[yshift=-1cm, scale=0.125]
\do
\end{scope}\end{tikzpicture}
\end{document}