4

Is microtype compatible (and effective) with a font like Calibri ?

For details on microtype, see also here and here.


Edit

  • With "compatible" I mean error-message-free.
  • With "effective" I mean that one would see a markedly positive difference when using microtype: that it just looks a lot better!
  • 2
    Your question is a bit vague: What do you mean by "compatible" and/or "effective"? Do you use XeTeX or LuaTeX? Please advise. – Mico Jun 28 '13 at 14:35
  • @Mico So far I'm using neither XeTeX nor LuaTeX (or Calibri in TeX, for that matter) and have only used microtype with pdflatex (with Computer Modern). – nutty about natty Jun 28 '13 at 14:42
  • @Mico With "compatible" I mean error-msg-free and with "effective" I mean that one would see a markedly positive difference when using microtype: that it just looks a lot better! – nutty about natty Jun 28 '13 at 14:44
  • 2
    I don’t have Calibri, but I’ve used many fonts for which no .cfg file is supplied, and yes, microtype still produces more pleasing output. And you can write your own configuration file if you have the patience. – Thérèse Jun 29 '13 at 17:35
  • @Thérèse Thanks for your vote of confidence! Just had a quick glance at font configuration which seems pretty involved; I hope microtype & Calibri will just look smashing by default -- even without taking a look beneath the bonnet... – nutty about natty Jun 29 '13 at 18:27
  • 1
    That configuration guide is involved. I meant the configuration described in section 5.7 of the microtype manual. Use the files in /texlive/2013/texmf-dist/tex/latex/microtype (or wherever they dwell on your system) as models. Nothing needed except — hah! — a very good eye, time, and abundant patience. – Thérèse Jun 29 '13 at 20:24
  • @nuttyaboutnatty -- you've provided an explanation in your comments for "what you mean". if you edit this explanation into the question, it will improve the question. (and probably save it from being closed.) – barbara beeton Jul 01 '13 at 21:03
  • @barbarabeeton Added the comment to the question; only today am I finding the time to attempt an MWE: the MWE will probably answer the question... – nutty about natty Jul 02 '13 at 05:42

3 Answers3

15

First of all, microtype will never issue an error message when it encounters a font that it doesn't know about, so it is always "compatible" in your sense.

With regards to "effective": For protrusion of unknown fonts (Calibri being one of them), microtype will use fallback settings and write an info about this in the log file. These fallback settings (in microtype.cfg) are quite conservative and contain protrusion settings only for the characters which are most likely to require protrusion (but this is still more than what the settings from luaotfload contain, which actually only protrude the punctuation characters). This should give reasonable results in most cases. Of course, it is possible, and probably preferable, to create a proper configuration file for the font in question, but this requires some time and a good eye.

With expansion the situation is even better, as it doesn't require dedicated font settings, and will just work, even for unknown fonts.

Robert
  • 14,181
  • 1
  • 52
  • 77
  • Where does luaotfload come into play? When using Lua's Microtype feature? -- Also, why is there no change in vector/pixel what-so-ever in here ? – nutty about natty Jul 02 '13 at 21:48
  • 2
    luaotfload is the package that provides the protrusion and expansion features you activate via \newfontfeature (it is loaded by fontspec). As to why there is no change for you with the microtype package, I don't know, there certainly is for me, and for @bfootdav as well. That's why I asked whether you are using the latest version of microtype. – Robert Jul 02 '13 at 22:57
  • I guess I'm still on v. 2.4. Could that be the explanation for having no effect (for me / my installation) with Calibri? – nutty about natty Jul 03 '13 at 05:48
  • @nuttyaboutnatty That will be the explanation -- support for luatex and xetex came with v2.5. Can you not update (e.g. by installing TeX Live 2013)? – Robert Jul 03 '13 at 05:56
  • As explained in the link given my previous comment, I'm using the latest available ppa (for Ubuntu) and wouldn't like to do manual installs, unless I find a compelling reason to do so. Would you say \lipsum looks a lot better with microtype vs. Microtype (in your more updated installation), or are they more or less on par? I can see a clear/dominant improvement using Microtype (as opposed to not using any micro-typing..) already; would it still get that much better using microtype (which I've gratefully used in a longer, recent Computer Modern document compiled with pdftex) ? – nutty about natty Jul 03 '13 at 06:01
  • 2
    @nuttyaboutnatty Depends on how demanding you are. As I said in my answer, the luatex solution will only protrude punctuation characters (comma, period, (semi)colon, hyphens and dashes), whereas microtype will also protrude other characters like, e.g. "A" and "«". For expansion, there won't be much difference. So, as the improvement only lies in the details, you might as well wait until you can easily update your TeX installation. – Robert Jul 03 '13 at 06:17
2

Using LuaLateX, default settings (default *.cfg, see microtype manual):

  • compatible: yes
  • effective: no.

No as in no change, not even on the sub-pixel level.

MWE:

\documentclass[11pt]{article}

\usepackage{fontspec}
\setmainfont{Calibri}

\usepackage{lipsum}

\usepackage{microtype}

\begin{document}

\lipsum

\end{document}

Edit

Even / also tried with the Asap font family (free, open, ..) which is v much like Calibri: same here, \usepackage{microtype} alone has zero effect.


Edit 2

Nota bene:

  • No effect in microtype v.2.4, but apparently does have an effect in later versions (v.2.5 and above).
  • That's odd. I don't have Calibri but I just downloaded Asap and I got noticeable differences with both protrusion and font expansion. You might try using \setmainfont[Ligatures=TeX]{Asap-Regular}as I did notice that it wasn't using ligatures or even proper quotation marks by default.
    Also, I used Lualatex, what engine did you use?
    – bfootdav Jul 02 '13 at 15:03
  • 1
    Are you using the latest microtype version (v2.5a)? – Robert Jul 02 '13 at 16:15
  • @Robert No... (see my comment to your question below) – nutty about natty Jul 03 '13 at 05:56
  • @bfootdav I guess you're using version 2.5 then? See my updated answer: Edit 2. – nutty about natty Jul 03 '13 at 11:02
  • @nuttyaboutnatty Yep, 2.5a. You can upgrade to the latest version if you want and it's pretty easy. – bfootdav Jul 03 '13 at 15:27
2

Building on Robert's answer, this is a viable workaround using LuaLateX's own Microtype implementation (note the capital M):

\documentclass[11pt]{article}

\usepackage{fontspec}
% \setmainfont{Calibri}

% \usepackage{microtype}

\pdfprotrudechars=2
\pdfadjustspacing=2
\newfontfeature{Microtype}{protrusion=default;expansion=default;}
\directlua{fonts.protrusions.setups.default.factor=.5}
\setmainfont[Microtype,
             Numbers={OldStyle, Proportional},
             Ligatures=TeX
            ]{Calibri}

\usepackage{lipsum}

\begin{document}

\lipsum

\end{document}

This, unlike microtype, does have an immediate (and positive !) effect.

:-)