9

I am using Baskerville font following the answer to the question: Is a “real” Baskerville font available for LaTeX?

But I found some letters are out of alignment. For example:

\documentclass[a4paper,12pt]{article}
\usepackage[demo]{graphicx}
\usepackage{blindtext}
\usepackage[T1]{fontenc} 
\usepackage{baskervald}

\begin{document}
\listoffigures

\section{TEST}
\blindtext
\begin{figure}[hpb]
    \centering
    \includegraphics[width=3cm]{example-image-a}
    \caption{The Figure AA}
\end{figure}

\begin{figure}[hpb]
    \centering
    \includegraphics[width=3cm]{example-image-b}
    \caption{Jer Figure BB}
\end{figure}

\begin{figure}[hpb]
    \centering
    \includegraphics[width=3cm]{example-image-c}
    \caption{A Figure CC}
\end{figure}

\end{document}

Obviously, the letter "J" is out of alignment, as shown in the figure below: letter "J" is out of alignment Using the default font (is it Modern Roman?), "J" aligns properly, as shown below enter image description here

Zheng
  • 249
  • Interesting. The J is defined with the foot hanging out of the bounding box. for example, try \fboxsep=-\fboxrule\fbox{J}. I would guess the font designer called that a "feature" not a "bug". See? "AJ" looks really cool in baskervald! – Steven B. Segletes Mar 28 '17 at 10:51
  • You could always use \,J to shift it a bit in the figure caption... – Steven B. Segletes Mar 28 '17 at 10:55

3 Answers3

11

You can change the protrusion at the margin with microtype:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{baskervald}
\usepackage{lipsum,microtype}
\parindent 0pt
\SetProtrusion
 [load= default,context = testJ]
 { encoding = T1,
  family = ybv }
 { J = {-500,},
 }

\begin{document}
J shows protrusion; \\ABC

\begin{microtypecontext}{protrusion=testJ}
J shows protrusion; \\ABC
\end{microtypecontext}

\end{document}

enter image description here

Ulrike Fischer
  • 327,261
6

As I commented, I think the font designer intended this for the letter "J". In the MWE, I show the protrusion of a leading "J", I show its bounding box, which makes it easier to understand why it protrudes, and I show it in combination with other letters, which might explain why the font designer wanted it this way (the AJ combo does look cool).

I show on the next two lines how one can manually compensate, by leading with a \,J (while in horizontal mode).

\documentclass{article}
\usepackage{baskervald,lipsum}
\parindent 0pt
\begin{document}
J shows protrusion; \fboxsep=-\fboxrule\fbox{J} shows bounding box; AJ shows kerning

A shows non-protruding letter

\leavevmode\,J artificially compensates for protrusion

\lipsum[1]

\end{document}

enter image description here

Thus, in conclusion, one's options are limited. I think one has to learn to embrace the choice of the font designer and just go with it.

  • 1
    the designer may have made this choice to enable the dutch "IJ" which i believe is treated as a single letter; it is at least often presented as a ligature. – barbara beeton Mar 28 '17 at 11:49
4

Maybe a very old post, but... Like most the fonts I gave to the free publication and free design community, the aim was to offer alternative fonts not to copy them. So, Baskervald is not Baskerville, Gillius is not Gill Sans etc., they have there own identity. That explains why the J glyph is a design choice, a style effect. That said, it's always possible to add an alternative J glyph in a future Baskervald font revision. Regards

JustinT
  • 1,163
Hirwen
  • 41