3

I'm trying to extend the microtype features also to the bold and italic faces of a given font family.

In the sample text, the expansion features apply only to the roman shape.

enter image description here

This is the source code I used:

\documentclass[12pt, a5paper]{memoir}

\usepackage[russian, italian]{babel}
\usepackage{parallel}
\usepackage{fontspec}
\usepackage[protrusion=true, factor = 100, expansion=true, shrink = 250, stretch = 250]{microtype}

\setlength{\parindent}{0pt}
\setlength{\parskip}{\baselineskip}

\setmainfont{Baskerville}%{Avenir Next}

\newcommand\TextSlav{
    \begin{hyphenrules}{russian}
    Христос воскресый из мертвых, смертию смерть поправый и сущим во гробех живот даровавый,
    \end{hyphenrules}
    }
\newcommand\TextLat{
    \begin{hyphenrules}{italian}
    Cristo, il risorto dai morti, che con la morte ha calpestato la morte e ha donato la vita a coloro che stavano nelle tombe,
    \end{hyphenrules}
    }


\begin{document}

\TextLat\\
\TextSlav

\bfseries

\TextLat\\
\TextSlav

\itshape

\TextLat\\
\TextSlav


\end{document}
  • load microtype with the option expansion=alltext – Robert Aug 12 '16 at 16:27
2

By default, microtype enables font expansion for a limited set of fonts only, in which the bold series is not included. You can choose a different font set by loading microtype with:

\usepackage[expansion=alltext]{microtype}

or after loading the package:

\UseMicrotypeSet[expansion]{alltext}

All predefined font sets are listed in the documentation, chapter 4, table 2. With the allmath set, math fonts would be expanded too, with all, well, all fonts.

(The default dates back to the time when pdftex had to embed each expanded font instance in the pdf file, which could lead to a considerable increase in the file size. With pdftex v1.20 or newer, expanding all fonts shouldn't create a large overhead.)

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.