Microtypography protrusion with Polish quotation marks

I use pdfLaTeX with Polish documents. In Polish quotation marks look like this: „Lorem”. With package polski, one can use them in LaTeX with ,,Lorem''. All was well, but I recently discovered the amazing microtype package.

Unfortunately, protrusion just doesn't want to work with Polish „:

As you can see, regular English quotes are treated differently from Polish ones.

What I would expect would be something like this:

Here is minimal code example:

\documentclass{article}
\usepackage{polski}
\usepackage[utf8]{inputenc}
\usepackage{microtype}

\begin{document}

\noindent
Lorem'' \newline
,,Lorem'' \newline
Lorem

\end{document}


My question is: how to make output look like the second image?

• I did not use LaTeX for 20 years or so but I read this group exactly for that: to learn things I would have never known otherwise (Polish quoting in that case). Thanks for that.
– WoJ
Feb 26, 2019 at 11:15

Use T1 fontencoding instead of OT4 (default).

\documentclass{article}
\usepackage[T1]{polski}
\usepackage[utf8]{inputenc}
\usepackage{microtype}

\begin{document}

\noindent
Lorem'' \newline
,,Lorem'' \newline
Lorem \newline
ć, ń, ó, ś, ź, ż, ą, ę, ł \newline
Ć, Ń, Ó, Ś, Ź, Ż, Ą, Ę, Ł

\end{document}


EDIT: This has been fixed in version 2.7b (28 Feb 2019).

The default microtype configuration lacks protrusion settings for the „ ligature. You can add them like this (in the preamble):

\LoadMicrotypeFile{cmr}
\SetProtrusion
[ name     = cmr-OT4,