Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
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
add comment

4 Answers 4

up vote 5 down vote accepted

This is for lualatex:

\documentclass{article}

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

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

\begin{document}
\input{knuth}
\end{document}
share|improve this answer
add comment

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

share|improve this answer
    
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
add comment

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.

share|improve this answer
add comment

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:

\usemodule[simplefonts]
\setupsimplefonts[expansion=quality,protrusion=quality]
\setmainfont[Fontin Sans]
\setsansfont[Fontin Sans]
\setmathfont[iwona]
\setupalign[hanging,hz]
\switchtobodyfont[11pt]
share|improve this answer
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.