I really like the protrusion and margin kerning features of pdfTeX and LuaTeX. I also like to use other fonts than those available for TeX. What choices do I have when I want to use both? Also, what problems with typography should I expect?

  • Regarding 'expansion', IMO it's way too easy to confuse that with macro expansion. – Giel Aug 9 '10 at 12:51
  • 2
    tags added, using font-expansion – Taco Hoekwater Aug 9 '10 at 13:06

This is for lualatex:


\setmainfont[RawFeature={protrusion=default}]{TeX Gyre Pagella}

\pdfprotrudechars2 % 1 if you don't want to change line breaking

  • do you need the package microtype? – skan Nov 19 '16 at 16:55

XeTeX has recently been enhanced with microtypography extensions as well, but it's still in a beta phase.

  • 1
    The version of XeTeX in TeXlive 2010 testing supports this, right? Do you need to load the microtype package? – frabjous Aug 9 '10 at 16:27

I’ve recently converted a few OTF fonts using otdtotfm (LY1 encoding) and written a corresponding .fd file; then a few more imports to get the font selection done and the thing worked very well together with pdftex and microtype. Some protrusion is applied (though I don’t know if it’s ‘perfect’ – whatever that would mean) – in fact there are much, much less overfull boxes than without microtype.

So if one cannot rely on the very latest additions to lua- or xetex and a small subset of characters is all right (though one can of course create as many fonts as to cover the whole character range of the original OTF file) this seems to be a valid option.


LuaTeX supports both. I'm not sure about the state of Lua in LaTeX, but you can already do it in ConTeXt.

This is how I did it:

\setmainfont[Fontin Sans]
\setsansfont[Fontin Sans]
  • 2
    Not related to the question, but for document wide setup, it is better to use \setupbodyfont rather that \switchtobodyfont. – Aditya Aug 10 '10 at 15:43

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.