为什么 urw-garamond 中的 scshape 和 bfseries 会导致字母倾斜?

为什么 urw-garamond 中的 scshape 和 bfseries 会导致字母倾斜?

考虑这个例子:

\documentclass{article}
\usepackage[urw-garamond]{mathdesign}
\begin{document}
    {\bfseries \scshape Hello World!}

    {\bfseries Hello World!}

    {\scshape Hello World!}
\end{document}

结果是:

enter image description here

发生了什么事?粗体和大写都有效,甚至组合也“有效”,但“太好了”,它还使字母倾斜。我该如何“取消倾斜”?

答案1

提供的 URW-Garamond 字体描述文件mathdesign是错误的;这是一个修复版本,其中错误的行已被注释掉(供参考):

%Filename: t1mdugm.fd
%Created by: tex makevp
%Created using fontinst v1.933

%THIS FILE SHOULD BE PUT IN A TEX INPUTS DIRECTORY

\ProvidesFile{t1mdugm.fd}
   [2013/08/29 Fontinst v1.933 font definitions for T1/mdugm.]

\DeclareFontFamily{T1}{mdugm}{}

\DeclareFontShape{T1}{mdugm}{m}{it}{
   <-> mdugmri8t
}{}

\DeclareFontShape{T1}{mdugm}{m}{fic}{
   <-> mdugmrifc8t
}{}

\DeclareFontShape{T1}{mdugm}{m}{n}{
   <-> mdugmr8t
}{}

\DeclareFontShape{T1}{mdugm}{m}{fsc}{
   <-> mdugmrfc8t
%   <-> mdugmrofc8t%<<<<<<<<<<<<<<<<<<< WRONG!
}{}

\DeclareFontShape{T1}{mdugm}{m}{sl}{
   <-> mdugmro8t
}{}

\DeclareFontShape{T1}{mdugm}{mb}{sl}{
   <-> mdugmmo8t
}{}

\DeclareFontShape{T1}{mdugm}{mb}{fsc}{
%   <-> mdugmmofc8t%<<<<<<<<<<<<<<<<<<<<<<<< WRONG!
   <-> mdugmmfc8t
}{}

\DeclareFontShape{T1}{mdugm}{mb}{n}{
   <-> mdugmm8t
}{}

\DeclareFontShape{T1}{mdugm}{mb}{it}{
   <-> mdugmmi8t
}{}

\DeclareFontShape{T1}{mdugm}{mb}{fic}{
   <-> mdugmmifc8t
}{}

\DeclareFontShape{T1}{mdugm}{bx}{sl}{<->ssub * mdugm/mb/sl}{}
\DeclareFontShape{T1}{mdugm}{b}{sl}{<->ssub * mdugm/bx/sl}{}
\DeclareFontShape{T1}{mdugm}{bx}{fsc}{<->ssub * mdugm/mb/fsc}{}
\DeclareFontShape{T1}{mdugm}{b}{fsc}{<->ssub * mdugm/bx/fsc}{}
\DeclareFontShape{T1}{mdugm}{bx}{n}{<->ssub * mdugm/mb/n}{}
\DeclareFontShape{T1}{mdugm}{b}{n}{<->ssub * mdugm/bx/n}{}
\DeclareFontShape{T1}{mdugm}{bx}{it}{<->ssub * mdugm/mb/it}{}
\DeclareFontShape{T1}{mdugm}{b}{it}{<->ssub * mdugm/bx/it}{}
\DeclareFontShape{T1}{mdugm}{bx}{fic}{<->ssub * mdugm/mb/fic}{}
\DeclareFontShape{T1}{mdugm}{b}{fic}{<->ssub * mdugm/bx/fic}{}

\endinput

如果我在工作目录中复制该文件并修复错误的行,则输出将符合预期:

enter image description here

答案2

您只需加载garamondx,它将为您提供所有 4 种粗细/形状的真正小型大写字母(以及旧式数字 + 高级数字 + 所有 f 连字符):

\documentclass{article}
\usepackage[full]{textcomp}
\usepackage[urw-garamond]{mathdesign}
\usepackage{garamondx}

\begin{document}

    {\bfseries \scshape Hello World!}

    {\bfseries \scshape\itshape Hello World!}

    {\bfseries Hello World!}

    {\scshape Hello World!}

    {\scshape\itshape Hello World!}

\end{document} 

enter image description here

相关内容