為什麼Latin Modern Mono 粗體系列看起來不像粗體?

為什麼Latin Modern Mono 粗體系列看起來不像粗體?

這是 MWE:

\documentclass{article}
\usepackage{lmodern}
% \usepackage[T1]{fontenc}
\usepackage{bold-extra}
\begin{document}
\noindent
\ttfamily\footnotesize % small size is set intentionally
Keywords are \textbf{\textsc{normal}}\\
Keywords are \textbf{\textsc{bold}}\\
Keywords are \textsc{caps}\\
Keywords are \textbf{\textsc{bold-and-caps}}\\
\end{document}

輸出:

在此輸入影像描述

我認為匆忙的人不會發現正常和正常之間有任何合理的區別大膽的。我做了中所說的https://tug.org/FontCatalogue/latinmodernmono為了得到相同的結果,也嘗試了 automagic 包bold-extra,但也沒有任何區別。是的,我可以進行設定\fontseries{l}\selectfont以使其更加明顯,但我不喜歡使用單聲道燈光。那我錯了什麼?您還可以看到小型大寫字母+粗體不會混合,但感覺如果只有粗體,它們可能會「開始工作」。


與 相比\usepackage{sourcecodepro},確實形成了鮮明的對比:

在此輸入影像描述

是的,它不支援小型大寫字母,但如上述字體目錄所示,這是預期的。

答案1

countor例如,使用套件可能是一個解決方案。您可以更改參數1,2以獲得較強的粗體。

\documentclass[12pt]{article}
\usepackage{lmodern}
% \usepackage[T1]{fontenc}
\usepackage{contour}
\begin{document}
\noindent
\ttfamily\footnotesize % small size is set intentionally
Keywords are \textbf{\textsc{normal bold}}\\
Keywords are \textbf{\contour[2]{black}{\textsc{bold}}}\\
Keywords are \textsc{\contour[1]{black}{caps}}\\
Keywords are \contour[1]{black}{\textsc{bold-and-caps}}\\
\end{document}

在此輸入影像描述

答案2

首先有幾個考慮因素:

  • bold-extra當字體系列為 時,包不執行任何操作lmtt
  • 中沒有粗體小型大寫字母字體lmtt

確實你得到了

LaTeX Font Warning: Font shape `OT1/lmtt/bx/sc' undefined
(Font)              using `OT1/lmtt/bx/n' instead on input line 8.

修改後的例子:

\documentclass{article}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
%\usepackage{bold-extra}

\begin{document}

\noindent
\ttfamily\footnotesize % small size is set intentionally
Keywords are \textbf{\textsc{normal \fontname\font}}\\
Keywords are \textbf{\textsc{bold \fontname\font}}\\
Keywords are \textsc{caps \fontname\font}\\
Keywords are \textbf{\textsc{bold-and-caps \fontname\font}}\\

\end{document}

表示確實使用了粗體字體。 OT1 編碼也是如此。問題在於,粗體拉丁現代打字機字體實際上並沒有那麼重,因為它需要具有真正可區分的外觀。

在此輸入影像描述

透過該lighttt選項,您可以獲得獨特的外觀:

在此輸入影像描述

解決方案?使用不同的打字機字體。

相關內容