5

I’ve found a rather strange bug, where the letter ‘å’ is sometimes (though very rarely) incorrectly rendered when using LuaLaTex. I’ve managed to reduce it to the following minimal document exhibiting the problem:

\documentclass{article}

\RequirePackage{polyglossia}
\setdefaultlanguage{nynorsk}

\RequirePackage{fontspec}
\setmainfont{Cambria}
\setmonofont{Consolas}

\begin{document}

Here the word språket is rendered incorrectly. \texttt{Monospace.}

\end{document}

The output (using LuaLaTeX from TeX Live 2015 on a Windows system) is:

Incorrect rendering.

The strange thing is that I can make the problem go away by removing either one of the \setdefaultlanguage, \setmainfont, \setmonofont lines or the \texttt command, or by changing the ‘å’ to an ‘ø’ or an ‘æ’, or by changing LuaLaTeX to XeLaTeX:

Correct rendering.

So I don’t know if the problem is with Polyglossia, the Cambria font, the Consolas font, the fontspec package or LuaLaTeX. This makes it difficult to report as a bug. Any idea where the bug is and what causes it (and perhaps a workaround)?

16
  • I'd guess problem is in luaotfload but not sure. I see same in cygwin. If you compare logs with and without the \setdefaultlanguage setting then you see first real diff is @firstpass [][]\EU2/Cambria(0)/m/n/10 He-re the word språ-ket is rende-red incor-rect-ly here å has been replaced by a followed by combining ring accent, and considered for hyphenation at that point. otherwise I can't help much. Jul 15, 2015 at 10:11
  • problem does not occur with xetex so it is unlikely to be the fonts at fault. Jul 15, 2015 at 10:14
  • The guess that it is breaking in hyphenation pass possibly confirmed in that \mbox{språket} provides a workaround and causes the correct rendering. Jul 15, 2015 at 10:17
  • How about a case-sensitive search-replace å with {\aa}? Jul 15, 2015 at 10:20
  • It could be related to this bug: github.com/lualatex/luaotfload/issues/265 Jul 15, 2015 at 10:32

1 Answer 1

1

Using test releases of luatex 0.85 and the luatotfload from github sources, I get

enter image description here

So this should work in texlive 2016.

1
  • I’m still not sure exactly what was causing the problem, but can confirm that everything’s working fine in TeX Live 2016, so I’m marking this answer as the ‘accepted’. Jul 12, 2016 at 12:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .