[Tex/LaTex] How to set-up LuaTeX, Microtype, with Minion Pro, Myriad Pro

fontsfontspecluatexmicrotype

Since recently I am using LuaLaTeX with the most recent beta version of Microtype, along with the fonts Minion Pro and Myriad Pro. In the manual of Microtype it says:

    Currently, this package provides protrusion settings for [...] Adobe Garamond and Minion, [...] as well as some generic settings for unknown fonts
(cf. table 3 on page 21)

Currently, I just include the fonts like this (with some other font definitions for headings etc. settings left out here):

\defaultfontfeatures{Ligatures=TeX, Scale=MatchLowercase}

\setmainfont[SmallCapsFeatures={LetterSpace=6}, Numbers={Proportional,OldStyle}]{Minion Pro}
\setsansfont[LetterSpace=3, Numbers={Proportional,OldStyle}]{Myriad Pro}

But this way I still get the following message from Microtype:

Package microtype Warning: Loading generic settings for font family `MinionPro'

How can I load the correct settings? Also, is there a way to avoid all these warnings I get for fonts that are not supported, and Microtype just loads the generic settings?

Best Answer

With the current microtype from TeXlive 2011, you can do the following:

\documentclass{article}
\usepackage{fontspec,microtype}
\defaultfontfeatures{Ligatures=TeX, Scale=MatchLowercase}


\setmainfont[SmallCapsFeatures={LetterSpace=6}, Numbers={Proportional,OldStyle}]{Minion Pro}
\setsansfont[LetterSpace=3, Numbers={Proportional,OldStyle}]{Myriad Pro}


\SetProtrusion
   [ name     = min-eu2 ]
   { encoding = {EU2},
     family   = MinionPro  }
   {
     {,} = {  ,500},
      -  = {  ,500}
   }


\begin{document}
  \hsize 3in

When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable
foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the
trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me.

\end{document}

LuaTeX with fontspec uses EU2 encoding internally, so all you need to do is the regular microtype setup with encoding EU2.