Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No small caps with \setmainfont{Latin Modern Roman} #449

Open
2 of 4 tasks
dbitouze opened this issue Oct 17, 2021 · 6 comments
Open
2 of 4 tasks

No small caps with \setmainfont{Latin Modern Roman} #449

dbitouze opened this issue Oct 17, 2021 · 6 comments

Comments

@dbitouze
Copy link

Description

A sentence or two describing the issue.

Check/indicate

  • Relevant for XeTeX
  • Relevant for LuaTeX
  • Issue tracker has been searched for similar issues?
  • Links to <tex.stackexchange.com> discussion if appropriate

Minimal examples demonstrating the issue

Minimal example 1

\documentclass{article}
\begin{document}
\textsc{Small capitals}.
\end{document}

Minimal example 2

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\begin{document}
\textsc{Small capitals}.
\end{document}

Minimal example 3

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Latin Modern Roman}
\begin{document}
\textsc{Small capitals}.
\end{document}

Minimal example 4

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Latin Modern Roman}[
  SmallCapsFont = Latin Modern Roman Caps,
]
\begin{document}
\textsc{Small capitals}.
\end{document}

Further details

Minimal examples 1 (compiled with lualatex) and 2 (compiled with pdflatex and lualatex) provide small caps. By contrast, minimal example 3 (compiled with lualatex) doesn't provide small caps:

LaTeX Font Warning: Font shape TU/LatinModernRoman(0)/m/sc' undefined (Font) using TU/LatinModernRoman(0)/m/n' instead on input line 39
.

Okay, small caps can be obtained with the code in minimal example 4, but shouldn't they be included in the basic font and obtained by the smcp font feature?

@u-fischer
Copy link
Member

Okay, small caps can be obtained with the code in minimal example 4, but shouldn't they be included in the basic font and obtained by the smcp font feature?

Well perhaps, but how a font implements a feature (and which one) is not an fontspec issue.

@interkosmos
Copy link

interkosmos commented Oct 17, 2021

Having the same issue here with TexLive 2021 and LuaTeX, regardless of the small caps feature provided by the chosen OTF. Seems to be a fontspec bug.

Edit: Log of example 3:

[…]
LaTeX Font Warning: Font shape `TU/LatinModernRoman(0)/m/sc' undefined
(Font)              using `TU/LatinModernRoman(0)/m/n' instead on input line 12
[…]

@dbitouze
Copy link
Author

@u-fischer Sorry, I was not sure where to report this. Should I report to the maintainers of lmodern package?

@interkosmos I guess Ulrike is right, since the problem does not arise with e.g. Erewhon:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{erewhon}
\begin{document}
\textsc{Small capitals}.
\end{document}

@interkosmos
Copy link

@dbitouze Specifically, I’m having the issue with the Minion Pro OTF font. Small caps are a style of the OTF font but not recognised by fontspec:

$ otfinfo -f ~/.fonts/Minion\ Pro/MinionPro-Regular.otf
aalt    Access All Alternates
c2sc    Small Capitals From Capitals
case    Case-Sensitive Forms
cpsp    Capital Spacing
dlig    Discretionary Ligatures
dnom    Denominators
fina    Terminal Forms
frac    Fractions
hist    Historical Forms
kern    Kerning
liga    Standard Ligatures
lnum    Lining Figures
numr    Numerators
onum    Oldstyle Figures
ordn    Ordinals
ornm    Ornaments
pnum    Proportional Figures
salt    Stylistic Alternates
sinf    Scientific Inferiors
size    Optical Size
smcp    Small Capitals
sups    Superscript
swsh    Swash
tnum    Tabular Figures
xx01    <unknown feature>
zero    Slashed Zero

In contrast, fontspec:

LaTeX Font Warning: Font shape `TU/MinionPro(1)/m/sc' undefined
(Font)              using `TU/MinionPro(1)/m/n' instead on input line 16.

[1{/usr/local/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./test.aux)

LaTeX Font Warning: Some font shapes were not available, defaults substituted.

@dbitouze
Copy link
Author

@interkosmos Indeed, sorry. In contrast, small caps aren't a style of the OTF Latin Modern Roman font:

otfinfo -f /usr/local/texlive/2021/texmf-dist/fonts/opentype/public/lm/lmroman12-regular.otf    
aalt    Access All Alternates
cpsp    Capital Spacing
dlig    Discretionary Ligatures
frac    Fractions
kern    Kerning
liga    Standard Ligatures
lnum    Lining Figures
onum    Oldstyle Figures
pnum    Proportional Figures
size    Optical Size
tnum    Tabular Figures
zero    Slashed Zero

so your issue (which seems to be a fontspec's one) differs from mine (which isn't a fontspec's one). It is worth opening a new issue I guess.

@interkosmos
Copy link

@dbitouze: Right, thank you for the feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants