I just began to try LuaTeX in order to make use of OpenType fonts. After loading fontspec I select such a font the usual way:

\setmainfont{Adobe Garamond Pro}

Now I wonder how I can fine tune the typesetting by the means of microtype, i.e. how I can set up protrusion rules for the selected font. The microtype manual only mentions fonts which adhere to Karl Berry's naming scheme:

   { encoding = T1,
     family   = cmr }
   { A              = {50,50},
     \textquoteleft = {700, } }

My Question is: How does the way of using OT fonts with fontspec relate to these settings?

For starters I want to use the predefined settings for the Type1 version pad by the means of \DeclareMicrotypeAlias{<font name>}{<alias font>} but mt-pad.cfg won't get loaded with the following file:

\setmainfont{Adobe Garamond Pro}
\DeclareMicrotypeAlias{Adobe Garamond Pro}{pad}
  Some Text.

EDIT: I just realized that LuaTeX uses EU2 as internal font enconding which renders the deaults in mt-pad.cfg useless. Nevertheless the question remains: What is the name of the font family I have to use in the microtype directives?


For OpenType fonts, you simply take the name you use when loading the font, in your case Adobe Garamond Pro. You could then use the file mt-pad.cfg as your template, by copying it to mt-AdobeGaramondPro.cfg (note, no spaces), and changing/adding the protrusion values:

   [ name     = AdobeGaramondPro ]
   { encoding = {EU1,EU2}, % EU1 = xetex, EU2 = luatex
     family   = {Adobe Garamond Pro} }
   { ... }

The glyphs may either be specified as Unicode letters, or via the respective latex commands. The file test-microtype.tex (included in the package) may be of some help to check the protrusion values. Though it was originally meant for Type1 fonts (with their 256 glyphs), it can easily be extended.

To really get complete settings, it would also be advisable to define the set of character inheritance, as there are usually many more diacritical characters in an OpenType font that are not covered by the default inheritance rules. You could have a look at the provided configuration files for OpenType fonts, eg., mt-CharisSIL.cfg.

As a final remark, be warned that creating complete settings is quite a time-consuming task, and requires some patience. It goes without saying that I would gratefully include your settings in the package, once you're finished!

  • 3
    Are you, by chance, aware of workflow on how to easily detect the "right" settings? I.e. is there any test document which makes it easy to spot the relevant charakters / values to enhance the microtypography of a font? – FredFisch Feb 22 '14 at 20:24
  • @FredFisch Here's a version of nice a "test text" originally proposed by Robert Bringhurst in "The Elements of Typographic Style". – phg Feb 24 '14 at 18:17

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.