![字体系列 phv 不适用于字体系列 mc](https://linux22.com/image/408557/%E5%AD%97%E4%BD%93%E7%B3%BB%E5%88%97%20phv%20%E4%B8%8D%E9%80%82%E7%94%A8%E4%BA%8E%E5%AD%97%E4%BD%93%E7%B3%BB%E5%88%97%20mc.png)
我正在尝试获取一种窄的 Arial 字体,这对我来说很有用:
\fontfamily{phv}
\fontseries{mc}
\selectfont
当我尝试再次编译同一个 .tex 文件时,我收到警告和不同的输出。以下是警告消息:
LaTeX Font Warning: Font shape 'T1/phv/c/n' undefined
(Font) using 'T1/phv/m/n' instead on input line 17.
以下是最小工作示例:
\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}
输出结果如下:
答案1
使用最新的 Latex 版本,您可能需要为扩展字体处理添加额外的声明(参见 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}
但是标准 fd 文件可能需要更新才能包含该声明。