Minion Pro、TL2016 和 LuaLaTeX

Minion Pro、TL2016 和 LuaLaTeX

当我使用 LuaLaTeX 和 TL2016 编译此 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}

我有这个.pdf。

在此处输入图片描述

有什么帮助吗?使用 TL2015 一切正常。谢谢

答案1

我猜这是个luaotfload问题。无论如何,使用指令

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

代替

\setmainfont{Minion Pro}

解决了这个问题。

完整的 MWE:

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

顺便说一句,这个 MWE 似乎不需要luatex85shellesc包。

另一件事:\huge并且\Huge不接受参数。因此,不要写\huge{huge};而是写{\huge huge}

答案2

正如 Mico 所说,这确实是 的问题luatoftload。但不幸的是,修复并不像他展示的那么简单。Mico 的答案不会帮助字体加载器正确使用正确的光学尺寸字体(MinionPro-BoldCapt 等)。目前还没有最终的解决方案fontspec。相反,您需要修补 生成的名称数据库luaotfload。下面是我的方法。

  1. (可选)运行luaotfload-tool -u -f
  2. 复制到您的工作目录。由于我的 的所有者已更改luaotfload-names.lua.gz,因此可以在 中找到它。但大多数用户会在 的子目录中找到它。/usr/local/texlive/2016/texmf-var/luatex-cache/generic/names/usr/local~/.texlive
  3. 应用以下补丁,由 提供texlua patch-names.lua,其中patch-names.lua的内容附在本帖末尾。它不仅可以修复 Minion Pro,还可以修复 Adob​​e Font Folio 中所有其他光学尺寸的字体。您可以删除没有的字体的修复。
  4. 将生成的luaotfload-names-patched.lua.gz和复制luaotfload-names-patched.luc到适当的位置(例如,/usr/local/texlive/2016/texmf-var/luatex-cache/generic/names在我的情况下),记得分别将它们重命名为luaotfload-names.lua.gzluaotfload-names.luc。我没有用原始名称生成它们的原因是我想先将生成的文件与我在步骤 2 中复制的文件进行仔细比较,以确保一切正常。
  5. 您可能还想删除luaotfload-lookup-cache.lualuaotfload-lookup-cache.luc

目前这种方法相当复杂。有人知道luaotfloadlua并且kpse可能找到比我在这里描述的更自动化的流程。

文件patch-names.lua

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()

相关内容