8

Update: I upgraded to TeX Live 2013 and things have gotten slightly worse, see end of post for details.

I have Garamond Premier Pro and I'm trying to make sure my documents use all the appropriate optical sizes. They work fully when using XeLaTeX but the display font is not being used in LuaLaTeX but for various reasons I have to use LuaLaTeX in all my projects. Here's the MWE:

\documentclass{memoir}
\usepackage{fontspec}
\setmainfont{Garamond Premier Pro}
\begin{document}
{\tiny tiny}\\
{\normalsize normal}\\
{\Huge Huge}\\
{\HUGE HUGE}\\
\end{document}

When I run it with XeLaTeX and look at the embedded fonts I get:

GaramondPremrPro-Identity-H
GaramondPremrPro-Capt-Identity-H
GaramondPremrPro-Subh-Identity-H
GaramondPremrPro-Disp-Identity-H

When I run it with LuaLaTeX:

GaramondPremrPro-Med
GaramondPremrPro-Capt
GaramondPremrPro-MedSubh

Notice the display font is not listed and is not being used (though the text displays at the correct size, just not using the Garamond display font).

I thought I would try to force the issue with this

\documentclass{memoir}
\usepackage{fontspec}
\setmainfont[SizeFeatures=
{Size=-8,Font=GaramondPremrPro-Capt.otf}
{Size=8-14,Font=GaramondPremrPro.otf}
{Size=14-21,Font=GaramondPremrPro-Subh.otf}
{Size=21-,Font=GaramondPremrPro-Disp.otf}}
]{Garamond Premier Pro}
\begin{document}
{\tiny tiny}\\
{\normalsize normal}\\
{\Huge Huge}\\
{\HUGE HUGE}\\
\end{document}

But when I run this in either LuaLaTeX or XeLaTeX I get the following error:

! LaTeX Error: Font EU2/GaramondPremierPro(0)/m/n/10 not found.

I have no idea what that means or if I've even gotten the syntax correct for specifying sizes like that.

So in the end I seem unable to get the display size in Garamond with LuaLaTeX.

As a side note, if instead of {Garamond Premier Pro} I use {GaramondPremrPro.otf} then none of the other optical sizes are loaded with either XeLaTeX or LuaLaTeX.

I'm using TeX Live 2012 and whatever versions of LuaTeX and XeTeX come with that.

Update I managed to upgrade to the vanilla TeX Live 2013 installation (just barely) and the problem has gotten slightly worse. XeLaTeX still uses all the appropriate sizes but now LuaLaTeX doesn't use any of them. It only uses the main size font and ignores the rest.

7
  • 2
    I suggest you report this to luaotfload developers directly, it is simply a bug. Commented Jun 22, 2013 at 2:17
  • 3
    That’s an oversight. The fonts should resolve correctly if you add \directlua{ config = { luaotfload = { resolver = "normal" } } } just before loading fontspec. (Font resolving will become marginally slower, though.) Commented Jun 22, 2013 at 9:42
  • 1
    Fixed in the dev version. Commented Jun 22, 2013 at 10:08
  • @phg I added the line as you say and it does get me back to the state of the original question which means that the display font is still not being utilized (though the caption and subheading ones are). XeLaTeX compiles as it should using the display font size. I'm still trying to compile the dev version but it's going slowly.
    – bfootdav
    Commented Jun 22, 2013 at 13:53
  • 1
    @bfootdav with the current version (I modified the style synonyms table just now) I get this result: <i.imgur.com/s72VwFT.png>. luaotfload resolves the same files as xetex. Btw. you don’t exactly have to compile anything in order to update luaotfload. Get the souces, run make tds, and extract the zipfile into your texmf. Commented Jun 22, 2013 at 14:41

0

Browse other questions tagged .