7

With current texlive 2016, the file

\documentclass{article}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures={TeX}}
\setmainfont{Minion Pro}

\begin{document}%
\newcommand{\MyText}{No offence meant, I even upvoted your answer.}

\verb|\tiny|=\tiny\MyText\par
\verb|\scriptsize|=\scriptsize\MyText\par
\verb|\footnotesize|=\footnotesize\MyText\par
\verb|\normalsize|=\normalsize\MyText\par
\verb|\large|=\large\MyText\par
\verb|\Large|=\Large\MyText\par
\verb|\LARGE|=\LARGE\MyText\par
\verb|\huge|=\huge\MyText\par
\verb|\Huge|=\Huge\MyText\par

\end{document}

results in a PDF that makes use of LMMono8, -10, and -12, but from the MinionPro Opticals, only MinionPro-Regular is used. Switching back to TeXLive-2015 results in a file with MinionPro-Regular, -Capt, -Subh, and -Disp, as expected.

Any hint on how to restore automatic selection of proper optical sizes for opentype fonts?

11
  • What are »Capt«, »Subh« and »Disp«? Why do you expect their usage, even when simply changing the size of the letters?
    – Keks Dose
    Jun 13, 2016 at 10:41
  • 1
    Caption, Subhead and Display are terms used to discern fonts designed for different sizes. The legibility of text printed in very small sizes, say, 6pt, is increased in a Caption font designed for small sizes, while the intricacy and beauty of the glyphs come to their full beauty in fonts designed for larger sizes, say, 20pt. An example waits at link
    – Ernst M.
    Jun 13, 2016 at 11:24
  • As it seems, you can have this feature with pdftex as well: This website recordnotfound.com/FontPro-sebschub-107127 explains, how to setup Minion Pro etc. for pdftex and says: »Furthermore, the optical sizes Caption, Text, Subhead and Display are supported...« OK, this does not solve your issue, however, thank you for the explanation.
    – Keks Dose
    Jun 13, 2016 at 11:51
  • Does it work for you with the solution described here: tex.stackexchange.com/a/46685/4736 ?
    – Keks Dose
    Jun 13, 2016 at 12:26
  • There are a lot of similar issues recently. This is due to some issues with luaotfload. For example, see github.com/lualatex/luaotfload/issues/363, which is an issue I opened recently. I showed an example of working around the issue with Cronos Pro. The same method will work for Minion as well. I think luaotfload will fix these issues in the near future.
    – Yan Zhou
    Jun 13, 2016 at 12:31

2 Answers 2

5

Section 8.6 of the fontspec manual says:

[...] OpenType fonts with optical scaling will exist in several discrete sizes, and these will be selected by XETEX and LuaTEX automatically determined by the current font size [...]

But it can only do so, if it gets the information it needs to make this automatical selection. What information does it need? The fontspec manual only gives an indrect hint in the next paragraph by specifing how it expects the information to be provided:

The SizeFeatures feature (Section 7.6 on page 17) can be used to specify exactly which optical sizes will be used for ranges of font size. [...]

Fontspec needs the design sizes of the fonts. As the name says this size is determined by the font designer. Unfortunately the otf file format does not contain this information. If you buy the fonts they usually come with a readme file. In case of Minion Pro this readme file has a section on optical sizes. There a little table can be found, that provides the need information.

Caption: from 6.0 to 8.4 points

Body Text: from 8.4 to 13.0 points

Subhead: from 13.0 to 19.9 points

Display: from 19.9 to 72.0 points

This table is likely to be different for every font, because the respective font designer made different choices.

As already mentioned in the comments you now can change

\setmainfont{Minion Pro}

which is not enough, too

\setmainfont{minionpro-}[
Extension={.otf},
UprightFont={*regular},
ItalicFont={*it},
BoldFont={*bold},
BoldItalicFont={*boldit},
Numbers={Proportional,OldStyle},
SizeFeatures={
    {Size={-8.4},Font=*capt},
    {Size={8.4-13.0}},
    {Size={13.0-19.9},Font=*subh},
    {Size={19.91-},Font=*disp}
}]

This is of course dependant on the naming conventions of the otf files. As there is no standard that I am aware of you probably have to adjust them. The otf files on my computer are all in lower case thus I have file names like:

minionpro-capt.otf
minionpro-regular.otf
minionpro-subh.otf
minionpro-disp.otf

for the upright fonts, for the italics ones I have

minionpro-itcapt.otf
minionpro-it.otf
minionpro-itsubh.otf
minionpro-itdisp.otf

and so on

minionpro-boldcapt.otf
minionpro-bold.otf
minionpro-boldsubh.otf
minionpro-bolddisp.otf

Minion Pro also comes with medium and semibold versions. Thus if the "normal" bold version is too bold, then one could replace them by changing

BoldFont={*bold},
BoldItalicFont={*boldit},

into

BoldFont={*medium},
BoldItalicFont={*mediumit},

fontspec also offers to work with the font names instead for the fonts file names. According to the fontspec manual section 7.6 page 22

Interaction with other features For SizeFeatures to work with ItalicFeatures, BoldFeatures, etc., and SmallCapsFeatures, a strict heirarchy is required: [...]

I can get it to work by writing this:

\setmainfont{Minion Pro}[
Numbers={Proportional,OldStyle},
UprightFeatures={
  SizeFeatures={
    {Size={-8.4},Font=*Capt},
    {Size={8.4-13.0},Font=*Regular},
    {Size={13.0-19.9},Font=*Subh},
    {Size={19.9-},Font=*Disp}
}},
ItalicFeatures={
  SizeFeatures={
    {Size={-8.4},Font=*It Capt},
    {Size={8.4-13.0},Font=*It},
    {Size={13.0-19.9},Font=*It Subh},
    {Size={19.9-},Font=*It Disp}
}},
BoldFeatures={
  SizeFeatures={
    {Size={-8.4},Font=*Bold Capt},
    {Size={8.4-13.0},Font=*Bold},
    {Size={13.0-19.9},Font=*Bold Subh},
    {Size={19.9-},Font=*Bold Disp}
}},
BoldItalicFeatures={
  SizeFeatures={
    {Size={-8.4},Font=*Bold It Capt},
    {Size={8.4-13.0},Font=*Bold It Capt},
    {Size={13.0-19.9},Font=*Bold It Subh},
    {Size={19.9-},Font=*Bold It Disp}
}}]
1
  • The otf file format does contain the design sizes: see the output of otfinfo -z *.otf (run in the directory where you keep Minion Pro Opticals).
    – Thérèse
    Sep 23, 2016 at 11:02
3

Before fontspec is loaded the document class defines all font sizes, the reason why Latin Modern is used here as a default. However, after loading fontspec and using \setmainfont everything is redefined. Compare the output: in the left column there is Minion Pro and in the right Latin Modern.

\documentclass[twocolumn]{article}
\usepackage{fontspec}
\setmainfont{Minion Pro}
\parindent=0pt
\newcommand\MyText{No offence meant, I even upvoted your answer.}
\newcommand\cs[1]{\texttt{\textbackslash#1}}

\begin{document}%

    \cs{tiny}=\tiny\MyText\par
    \cs{scriptsize}=\scriptsize\MyText\par
    \cs{footnotesize}=\footnotesize\MyText\par
    \cs{normalsize}=\normalsize\MyText\par
    \cs{large}=\large\MyText\par
    \cs{Large}=\Large\MyText\par
    \cs{LARGE}=\LARGE\MyText\par
    \cs{huge}=\huge\MyText\par
    \cs{Huge}=\Huge\MyText\par

\newpage\normalsize
\fontspec{Latin Modern Roman}
    \cs{tiny}=\tiny\MyText\par
    \cs{scriptsize}=\scriptsize\MyText\par
    \cs{footnotesize}=\footnotesize\MyText\par
    \cs{normalsize}=\normalsize\MyText\par
    \cs{large}=\large\MyText\par
    \cs{Large}=\Large\MyText\par
    \cs{LARGE}=\LARGE\MyText\par
    \cs{huge}=\huge\MyText\par
    \cs{Huge}=\Huge\MyText\par
\end{document}

enter image description here

However, the

[...]
ZUQBJT+MinionPro-Capt-Identity-H     CID Type 0C       Identity-H       yes yes yes      9  0
GZICFI+MinionPro-Subh-Identity-H     CID Type 0C       Identity-H       yes yes yes     15  0
VLPSCX+MinionPro-Disp-Identity-H     CID Type 0C       Identity-H       yes yes yes     17  0
[...]

are used only by xelatex, if not defined via fontspec

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .