3

I am trying to get a narrow Arial font, and this used to work for me:

\fontfamily{phv}
\fontseries{mc}
\selectfont

When I try to compile the same .tex file again, I get warning and a different output. Here is the warning message:

LaTeX Font Warning: Font shape 'T1/phv/c/n' undefined
(Font) using 'T1/phv/m/n' instead on input line 17.

Here is the minimum working example:

\documentclass[a4paper]{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\title{Minimum working example}
\author{Marko}

\begin{document}

\maketitle

{%
    \fontsize{16pt}{16pt}%
    \fontfamily{phv}%
    \fontseries{mc}%
    \selectfont%
    \begin{center}
        THIS IS SAMPLE TEXT\\%
        \textbf{THIS IS SAMPLE TEXT}%
    \end{center}
}

This is the rest of it...

\end{document}

And here is how the output looks for me:

mwe

6

With the latest latex release you may need to add additional declarations for the extended font handling (see ltnews31)

\documentclass[a4paper]{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\title{Minimum working example}
\author{Marko}

\makeatletter
\input{t1phv.fd}
\DeclareFontShape{T1}{phv}{c}{n}{
   <-> \Hv@@scale phvr8tn
}{}
\makeatother

\begin{document}

\maketitle

{%
    \fontsize{16pt}{16pt}%
    \fontfamily{phv}%
    \fontseries{mc}%
    \selectfont%
    \begin{center}
        THIS IS SAMPLE TEXT\\%
        \textbf{THIS IS SAMPLE TEXT}%
    \end{center}
}

This is the rest of it...

\end{document}

But the standard fd file should probably be updated to include this declaration.

|improve this answer|||||
  • That fixed the problem, thank you! – Marko Gulin Feb 23 at 17:26
  • Setting up "mc" inside the .fd file for phv was always wrong but in the past it didn't matter. With the new LaTeX it does matter, so yes, the standard .df files hsould get corrected if they contain such shape declarations. – Frank Mittelbach Feb 23 at 18:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.