[Tex/LaTex] microtype settings for dummies

fontsfontspecluaotfloadluatexmicrotype

More than a year ago, a friend of mine was totally excited about microtype features in LaTeX. He was talking about it quite a bit and then said to me: "Show me your document, let me add some lines of code and it's gonna be awesome!"

What he added was this:

\usepackage[    protrusion=true,
            expansion=true,
            final,
            babel
                ]{microtype}
\usepackage{fontspec}
\pdfprotrudechars=2
\pdfadjustspacing=2
\newfontfeature{Microtype}{protrusion=default;expansion=default;}
\directlua{fonts.protrusions.setups.default.factor=.5}
\setmainfont[   Microtype,
            Numbers={OldStyle, Proportional},
            Ligatures=TeX
                ]{Brill}

The only thing I changed about this was the font. I use the Brill Font, but only because it contains many special characters I need for work. About the rest, I don't have a clue what all this means. Okay, I did look into the documentations (months ago) and searched tex.sx (just now), and I learned what protrusion is and what expansion is, and what they do, but I don't really see a difference, for — to me — simply (almost) every TeX result looks super, and I certainly see no real difference between Garamond, Minion, Caslon, et al., nor could I tell which I'd prefer. I am not a man of the "finer" arts, so deciding about microtype settings and features is but a little too "designical" for me.

By the way: I am using LuaLaTeX.

So maybe, someone could just tell me if these settings may be alright the way they are.

Brill makes a full "Typeface User Guide" available. If you want an example of how this font looks in order to answer my question, please see this document.

Best Answer

A number of answers:

Firstly, microtypography is (in my book) the art of enhancing the appearance of a document while exhibiting the minimum degree of visual obtrubsion, that is, ideally, without even being recognisable: Characters with less optical weight should slightly protrude into the margin to make it appear more even, but they shouldn't stick in your face; fonts may be distorted ever-so-slightly to allow for better line breaks, but they should not look distorted. Therefore, it is actually good that you don't see any difference. You should, however, make sure that something does indeed happen: for protrusion, find a hyphen at the end of a line and check whether it protrudes, as it should do, into the margin (by about half of its length), or whether it is fully contained in the text block; for expansion, check whether line breaks in a longer paragraph change when you remove the lines your colleague added. If line breaks are the same in both cases, and if hyphens don't hang over, then protrusion and expansion are in fact not enabled at all, which would be a topic for a new question.

Secondly, the microtypepackage tries to lift the burden of deciding about settings as much as possible from the user. Considering that you say yourself that you are not a man of the finer arts, I would advise to just load the microtype package without any options at all. (In your code, the protrusion and expansion options are superfluous as they are enabled anyway, babel doesn't have any effect, only final may be justified to ensure that line breaks don't change when adding draft as a class option.)

Now for the final point, which obviously causes the most confusion. As Jörg has pointed out, you are using both the microtype package as well as lualatex's own microtypography feature (with the latter taking precedence). You should therefore decide, and either load microtype:

\usepackage[final]{microtype}
\usepackage{fontspec}
\setmainfont[Numbers={OldStyle, Proportional},
             Ligatures=TeX
            ]{Brill}

or use lualatex's techniques:

\usepackage{fontspec}
\protrudechars=2 % or \pdfprotrudechars=2 and
\adjustspacing=2 %    \pdfadjustspacing=2 with luatex < v0.85
\newfontfeature{Microtypography}{protrusion=default;expansion=default}
\directlua{fonts.protrusions.setups.default.factor=.5}
\setmainfont[Microtypography,
             Numbers={OldStyle, Proportional},
             Ligatures=TeX
            ]{Brill}

I would advise to go with the first, as microtype's settings are more complete and balanced IMHO (but then, I am, of course, biased ...). The second option has the advantage of better integration with luatex. Here, a factor of .5 seems reasonable (the default protrusion, especially of the hyphen, is just too much, quite obtrusive and therefore contradicting the idea of microtypography to me).