我正在尝试获取一种窄的 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 文件可能需要更新才能包含该声明。