3

When I compile with LuaLaTeX and TL2016 this MWE

\documentclass{article}

\usepackage[no-math]{fontspec}
\usepackage{luatex85}
\usepackage{shellesc}

\setmainfont{Minion Pro}

\begin{document}

\huge{huge}
\textbf{\huge{huge}}

\Huge{Huge}
\textbf{\Huge{Huge}}


\end{document}

I have this .pdf.

enter image description here

Any help? With TL2015 all is correct. Thanks

  • What's the question? – Sverre Nov 30 '16 at 18:13
2

I'm guessing this is a luaotfload issue. At any rate, using the instruction

\setmainfont[BoldFont={Minion Pro Bold}]{Minion Pro}

instead of

\setmainfont{Minion Pro}

fixes the problem.

A full MWE:

\documentclass{article}
\usepackage{fontspec}
\setmainfont[BoldFont={Minion Pro Bold}]{Minion Pro}
\begin{document}
\huge huge \textbf{huge} \Huge Huge \textbf{Huge}
\end{document}

Incidentally, this MWE doesn't seem to require the luatex85 and shellesc packages.

A separate matter: \huge and \Huge don't take arguments. Hence, don't write \huge{huge}; instead, write {\huge huge}.

  • @MicoYes, this MWE doesn't required the luatex85 and ... but to cut and paste is a problem. – jpayansomet Jun 19 '16 at 8:15
6

It is indeed an issue with luatoftload as Mico said. But unfortunately the fix is not as simple as he shows. Mico's answer will not help the font loader to properly use the correct optical sized fonts (MinionPro-BoldCapt, etc.). And at the moment there's no fix from the fontspec end. Instead, you will need to patch the name database generated by luaotfload. Below is my approach.

  1. (Optional) Run luaotfload-tool -u -f
  2. Copy luaotfload-names.lua.gz to your working directory. Mine can be found in /usr/local/texlive/2016/texmf-var/luatex-cache/generic/names since my /usr/local's owner was changed. But most users will find it in the subdirectory of ~/.texlive.
  3. Apply the following patch, by texlua patch-names.lua, where patch-names.lua's contents is attached at the end of this post. It will fix not only Minion Pro but also all other Optical sized fonts in Adobe Font Folio. You can delete fixes for fonts that you don't have.
  4. Copy the generated luaotfload-names-patched.lua.gz and luaotfload-names-patched.luc to appropriate placed (e.g., /usr/local/texlive/2016/texmf-var/luatex-cache/generic/names in my case), remember to rename them to luaotfload-names.lua.gz and luaotfload-names.luc respectively. The reason I did not produce them with the original names was that I wanted to closely compare the generated files with the one I copied in step 2 first to make sure everything was all right.
  5. Also you may want to delete luaotfload-lookup-cache.lua and luaotfload-lookup-cache.luc.

This approach is quite complicated at the moment. Someone knows luaotfload, lua and kpse better may find a more automated process than I described here.

The patch-names.lua file:

kpse.set_program_name 'luatex'

require 'lualibs'

names = load(gzip.load('luaotfload-names.lua.gz'), 't')()

-- Change "system" to "local" or "texmf" if needed.
families = names.families.system.otf
files = names.files.bare.system.otf

-- Arno Pro
families['arnopro'] = {
  b = {
    {  8,  8.5,  5.9, files['ArnoPro-BoldCaption'] },
    { 10,   11,  8.5, files['ArnoPro-BoldSmText'] },
    { 12,   14,   11, files['ArnoPro-Bold'] },
    { 18, 21.5,   14, files['ArnoPro-BoldSubhead'] },
    { 36,   72, 21.5, files['ArnoPro-BoldDisplay'] },
  },
  bi = {
    {  8,  8.5,  5.9, files['ArnoPro-BoldItalicCaption'] },
    { 10,   11,  8.5, files['ArnoPro-BoldItalicSmText'] },
    { 12,   14,   11, files['ArnoPro-BoldItalic'] },
    { 18, 21.5,   14, files['ArnoPro-BoldItalicSubhead'] },
    { 36,   72, 21.5, files['ArnoPro-BoldItalicDisplay'] },
  },
  i = {
    {  8,  8.5,  5.9, files['ArnoPro-ItalicCaption'] },
    { 10,   11,  8.5, files['ArnoPro-ItalicSmText'] },
    { 12,   14,   11, files['ArnoPro-Italic'] },
    { 18, 21.5,   14, files['ArnoPro-ItalicSubhead'] },
    { 36,   72, 21.5, files['ArnoPro-ItalicDisplay'] },
  },
  r = {
    {  8,  8.5,  5.9, files['ArnoPro-Caption'] },
    { 10,   11,  8.5, files['ArnoPro-SmText'] },
    { 12,   14,   11, files['ArnoPro-Regular'] },
    { 18, 21.5,   14, files['ArnoPro-Subhead'] },
    { 36,   72, 21.5, files['ArnoPro-Display'] },
  },
}

-- Brioso Pro
families['briosopro'] = {
  b = {
    {  8, 9.4,   6, files['BriosoPro-BoldCapt'] },
    { 11,  14, 9.4, files['BriosoPro-Bold'] },
    { 18,  21,  14, files['BriosoPro-BoldSubh'] },
    { 72,  72,  21, files['BriosoPro-BoldDisp'] },
  },
  bi = {
    {  8, 9.4,   6, files['BriosoPro-BoldItCapt'] },
    { 11,  14, 9.4, files['BriosoPro-BoldIt'] },
    { 18,  21,  14, files['BriosoPro-BoldItSubh'] },
    { 72,  72,  21, files['BriosoPro-BoldItDisp'] },
  },
  i = {
    {  8, 9.4,   6, files['BriosoPro-ItCapt'] },
    { 11,  14, 9.4, files['BriosoPro-Italic'] },
    { 18,  21,  14, files['BriosoPro-ItSubh'] },
    { 72,  72,  21, files['BriosoPro-ItDisp'] },
  },
  r = {
    {  8, 9.4,   6, files['BriosoPro-Capt'] },
    { 11,  14, 9.4, files['BriosoPro-Regular'] },
    { 18,  21,  14, files['BriosoPro-Subh'] },
    { 72,  72,  21, files['BriosoPro-Disp'] },
  },
}

-- Chaparral Pro
families['chaparralpro'] = {
  b = {
    {  8,  8.4,    1, files['ChaparralPro-BoldCapt'] },
    { 11, 12.9,  8.4, files['ChaparralPro-Bold'] },
    { 18, 25.9, 12.9, files['ChaparralPro-BoldSubh'] },
    { 72, 99.9, 25.9, files['ChaparralPro-BoldDisp'] },
  },
  bi = {
    {  8,  8.4,    1, files['ChaparralPro-BoldItCapt'] },
    { 11, 12.9,  8.4, files['ChaparralPro-BoldIt'] },
    { 18, 25.9, 12.9, files['ChaparralPro-BoldItSubh'] },
    { 72, 99.9, 25.9, files['ChaparralPro-BoldItDisp'] },
  },
  i = {
    {  8,  8.4,    1, files['ChaparralPro-ItCapt'] },
    { 11, 12.9,  8.4, files['ChaparralPro-Italic'] },
    { 18, 25.9, 12.9, files['ChaparralPro-ItSubh'] },
    { 72, 99.9, 25.9, files['ChaparralPro-ItDisp'] },
  },
  r = {
    {  8,  8.4,    1, files['ChaparralPro-Capt'] },
    { 11, 12.9,  8.4, files['ChaparralPro-Regular'] },
    { 18, 25.9, 12.9, files['ChaparralPro-Subh'] },
    { 72, 99.9, 25.9, files['ChaparralPro-Disp'] },
  },
}

-- Garamond Premier Pro
families['garamondpremierpro'] = {
  b = {
    {  8,  8.9,  5.9, files['GaramondPremrPro-BdCapt'] },
    { 11, 14.9,  8.9, files['GaramondPremrPro-Bd'] },
    { 18, 22.9, 14.9, files['GaramondPremrPro-BdSubh'] },
    { 36,   72, 22.9, files['GaramondPremrPro-BdDisp'] },
  },
  bi = {
    {  8,  8.9,  5.9, files['GaramondPremrPro-BdItCapt'] },
    { 11, 14.9,  8.9, files['GaramondPremrPro-BdIt'] },
    { 18, 22.9, 14.9, files['GaramondPremrPro-BdItSubh'] },
    { 36,   72, 22.9, files['GaramondPremrPro-BdItDisp'] },
  },
  i = {
    {  8,  8.9,  5.9, files['GaramondPremrPro-ItCapt'] },
    { 11, 14.9,  8.9, files['GaramondPremrPro-It'] },
    { 18, 22.9, 14.9, files['GaramondPremrPro-ItSubh'] },
    { 36,   72, 22.9, files['GaramondPremrPro-ItDisp'] },
  },
  r = {
    {  8,  8.9,  5.9, files['GaramondPremrPro-Capt'] },
    { 11, 14.9,  8.9, files['GaramondPremrPro'] },
    { 18, 22.9, 14.9, files['GaramondPremrPro-Subh'] },
    { 36,   72, 22.9, files['GaramondPremrPro-Disp'] },
  },
}

-- Adobe Jenson Pro
families['adobejensonpro'] = {
  b = {
    {  8,    9,    6, files['AJensonPro-BoldCapt'] },
    { 12, 13.4,    9, files['AJensonPro-Bold'] },
    { 19, 21.9, 13.4, files['AJensonPro-BoldSubh'] },
    { 72,   72, 21.9, files['AJensonPro-BoldDisp'] },
  },
  bi = {
    {  8,    9,    6, files['AJensonPro-BoldItCapt'] },
    { 12, 13.4,    9, files['AJensonPro-BoldIt'] },
    { 19, 21.9, 13.4, files['AJensonPro-BoldItSubh'] },
    { 72,   72, 21.9, files['AJensonPro-BoldItDisp'] },
  },
  i = {
    {  8,    9,    6, files['AJensonPro-ItCapt'] },
    { 12, 13.4,    9, files['AJensonPro-It'] },
    { 19, 21.9, 13.4, files['AJensonPro-ItSubh'] },
    { 72,   72, 21.9, files['AJensonPro-ItDisp'] },
  },
  r = {
    {  8,    9,    6, files['AJensonPro-Capt'] },
    { 12, 13.4,    9, files['AJensonPro-Regular'] },
    { 19, 21.9, 13.4, files['AJensonPro-Subh'] },
    { 72,   72, 21.9, files['AJensonPro-Disp'] },
  },
}

-- Kepler Std
families['keplerstd'] = {
  b = {
    {  8,  8.9,    6, files['KeplerStd-BoldCapt'] },
    { 11, 13.9,  8.9, files['KeplerStd-Bold'] },
    { 18,   23, 13.9, files['KeplerStd-BoldSubh'] },
    { 72,   72,   23, files['KeplerStd-BoldDisp'] },
  },
  bi = {
    {  8,  8.9,    6, files['KeplerStd-BoldItCapt'] },
    { 11, 13.9,  8.9, files['KeplerStd-BoldIt'] },
    { 18,   23, 13.9, files['KeplerStd-BoldItSubh'] },
    { 72,   72,   23, files['KeplerStd-BoldItDisp'] },
  },
  i = {
    {  8,  8.9,    6, files['KeplerStd-ItCapt'] },
    { 11, 13.9,  8.9, files['KeplerStd-Italic'] },
    { 18,   23, 13.9, files['KeplerStd-ItSubh'] },
    { 72,   72,   23, files['KeplerStd-ItDisp'] },
  },
  r = {
    {  8,  8.9,    6, files['KeplerStd-Capt'] },
    { 11, 13.9,  8.9, files['KeplerStd-Regular'] },
    { 18,   23, 13.9, files['KeplerStd-Subh'] },
    { 72,   72,   23, files['KeplerStd-Disp'] },
  },
}

-- Minion Pro
families['minionpro'] = {
  b = {
    {  8,  8.4,    6, files['MinionPro-BoldCapt'] },
    { 11,   13,  8.4, files['MinionPro-Bold'] },
    { 19, 19.9,   13, files['MinionPro-BoldSubh'] },
    { 72,   72, 19.9, files['MinionPro-BoldDisp'] },
  },
  bi = {
    {  8,  8.4,    6, files['MinionPro-BoldItCapt'] },
    { 11,   13,  8.4, files['MinionPro-BoldIt'] },
    { 19, 19.9,   13, files['MinionPro-BoldItSubh'] },
    { 72,   72, 19.9, files['MinionPro-BoldItDisp'] },
  },
  i = {
    {  8,  8.4,    6, files['MinionPro-ItCapt'] },
    { 11,   13,  8.4, files['MinionPro-It'] },
    { 19, 19.9,   13, files['MinionPro-ItSubh'] },
    { 72,   72, 19.9, files['MinionPro-ItDisp'] },
  },
  r = {
    {  8,  8.4,    6, files['MinionPro-Capt'] },
    { 11,   13,  8.4, files['MinionPro-Regular'] },
    { 19, 19.9,   13, files['MinionPro-Subh'] },
    { 72,   72, 19.9, files['MinionPro-Disp'] },
  },
}

-- Utopia Std
families['utopiastd'] = {
  b = {
    {  8, 8.9,   6, files['UtopiaStd-BoldCapt'] },
    { 11,  13, 8.9, files['UtopiaStd-Bold'] },
    { 18,  20,  13, files['UtopiaStd-BoldSubh'] },
    { 72,  72,  20, files['UtopiaStd-BoldDisp'] },
  },
  bi = {
    {  8, 8.9,   6, files['UtopiaStd-BoldCaptIt'] },
    { 11,  13, 8.9, files['UtopiaStd-BoldIt'] },
    { 18,  20,  13, files['UtopiaStd-BoldSubhIt'] },
    { 72,  72,  20, files['UtopiaStd-BoldDispIt'] },
  },
  i = {
    {  8, 8.9,   6, files['UtopiaStd-CaptIt'] },
    { 11,  13, 8.9, files['UtopiaStd-Italic'] },
    { 18,  20,  13, files['UtopiaStd-SubhIt'] },
    { 72,  72,  20, files['UtopiaStd-DispIt'] },
  },
  r = {
    {  8, 8.9,   6, files['UtopiaStd-Capt'] },
    { 11,  13, 8.9, files['UtopiaStd-Regular'] },
    { 18,  20,  13, files['UtopiaStd-Subh'] },
    { 72,  72,  20, files['UtopiaStd-Disp'] },
  },
}

-- Warnock
families['warnockpro'] = {
  b = {
    {  8,  8.9,    1, files['WarnockPro-BoldCapt'] },
    { 11, 12.9,  8.9, files['WarnockPro-Bold'] },
    { 18, 22.9, 12.9, files['WarnockPro-BoldSubh'] },
    { 72, 99.9, 22.9, files['WarnockPro-BoldDisp'] },
  },
  bi = {
    {  8,  8.9,    1, files['WarnockPro-BoldItCapt'] },
    { 11, 12.9,  8.9, files['WarnockPro-BoldIt'] },
    { 18, 22.9, 12.9, files['WarnockPro-BoldItSubh'] },
    { 72, 99.9, 22.9, files['WarnockPro-BoldItDisp'] },
  },
  i = {
    {  8,  8.9,    1, files['WarnockPro-ItCapt'] },
    { 11, 12.9,  8.9, files['WarnockPro-It'] },
    { 18, 22.9, 12.9, files['WarnockPro-ItSubh'] },
    { 72, 99.9, 22.9, files['WarnockPro-ItDisp'] },
  },
  r = {
    {  8,  8.9,    1, files['WarnockPro-Capt'] },
    { 11, 12.9,  8.9, files['WarnockPro-Regular'] },
    { 18, 22.9, 12.9, files['WarnockPro-Subh'] },
    { 72, 99.9, 22.9, files['WarnockPro-Disp'] },
  },
}

-- Cronos Pro
families['cronospro'] = {
  b = {
    {  8,  8,  6, files['CronosPro-BoldCapt'] },
    { 11, 14,  8, files['CronosPro-Bold'] },
    { 18, 24, 14, files['CronosPro-BoldSubh'] },
    { 72, 72, 24, files['CronosPro-BoldDisp'] },
  },
  bi = {
    {  8,  8,  6, files['CronosPro-BoldCaptIt'] },
    { 11, 14,  8, files['CronosPro-BoldIt'] },
    { 18, 24, 14, files['CronosPro-BoldSubhIt'] },
    { 72, 72, 24, files['CronosPro-BoldDispIt'] },
  },
  i = {
    {  8,  8,  6, files['CronosPro-CaptIt'] },
    { 11, 14,  8, files['CronosPro-Italic'] },
    { 18, 24, 14, files['CronosPro-SubhIt'] },
    { 72, 72, 24, files['CronosPro-DispIt'] },
  },
  r = {
    {  8,  8,  6, files['CronosPro-Capt'] },
    { 11, 14,  8, files['CronosPro-Regular'] },
    { 18, 24, 14, files['CronosPro-Subh'] },
    { 72, 72, 24, files['CronosPro-Disp'] },
  },
}

-- Sanvito Pro
-- Note that, Sanvito is a script font, which does not have a distinction between Upright and Italic. So I used the same style for both.
families['sanvitopro'] = {
  b = {
    {  8,  9.5,    6, files['SanvitoPro-BoldCapt'] },
    { 12,   15,  9.6, files['SanvitoPro-Bold'] },
    { 18, 22.9, 15.1, files['SanvitoPro-BoldSubh'] },
    { 72,   72,   23, files['SanvitoPro-BoldDisp'] },
  },
  bi = {
    {  8,  9.5,    6, files['SanvitoPro-BoldCapt'] },
    { 12,   15,  9.6, files['SanvitoPro-Bold'] },
    { 18, 22.9, 15.1, files['SanvitoPro-BoldSubh'] },
    { 72,   72,   23, files['SanvitoPro-BoldDisp'] },
  },
  i = {
    {  8,  9.5,    6, files['SanvitoPro-Capt'] },
    { 12,   15,  9.6, files['SanvitoPro-Regular'] },
    { 18, 22.9, 15.1, files['SanvitoPro-Subh'] },
    { 72,   72,   23, files['SanvitoPro-Disp'] },
  },
  r = {
    {  8,  9.5,    6, files['SanvitoPro-Capt'] },
    { 12,   15,  9.6, files['SanvitoPro-Regular'] },
    { 18, 22.9, 15.1, files['SanvitoPro-Subh'] },
    { 72,   72,   23, files['SanvitoPro-Disp'] },
  },
}

-- Myriad Pro. This can also be done with fontspec using BoldFont etc., and similarly for many other fonts with extensive ranges of weights and widths, which luaotfload will often get it wrong.
families['myriadpro'] = {
  b = {
    {11, 0, 0, files['MyriadPro-Bold']},
  },
  bi = {
    {11, 0, 0, files['MyriadPro-BoldIt']},
  },
  i = {
    {11, 0, 0, files['MyriadPro-It']},
  },
  r = {
    {11, 0, 0, files['MyriadPro-Regular']},
  },
}

data = table.serialize(names, true)
gzip.save('luaotfload-names-patched.lua.gz', data)
local f = io.open('luaotfload-names-patched.luc', 'wb')
local s = load(data)
f:write(string.dump(s, true))
f:close()
  • +1. Not having access to the optically-sized variants of the Adobe fonts, I had no inkling of this problem. – Mico Jun 19 '16 at 4:36
  • @Mico Nonetheless your help is very welcome. I myself had many questions answered by you. I think the patch can be improved. There's quite a few things that are hard coded into it which I don't like. But I don't know luatex well enough to do it otherwise without making it terribly tedious – Yan Zhou Jun 19 '16 at 4:49
  • @Yan Zhou A very complete answer. Thank – jpayansomet Jun 19 '16 at 8:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.