# Yet another glyph problem with Unicode

I have a tricky problem with combined diacritics and the CMU font family (CMU Serif). There seems to be no simple way to get the correct .pdf-output for a character like å̄, i.e. a + ring above (U+00E5) + macron (U+0304).

Here's an example:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{CMU Serif}

\begin{document}

I’m stuck with this problem: å̄

\end{document}


Oliver

• I guess it's a specific problem with the font; if I try with different ones, I get the expected output. Not with Latin Modern, though, where the macron overprints the ring. – egreg Feb 23 '18 at 13:46

It seems a specific problem with the font. If I use a different one, I get the expected result (but not with Latin Modern, where the macron overprints the ring).

I can offer a workaround:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{CMU Serif}

\NewDocumentCommand{\aringmacron}{}{%
\leavevmode
\vbox{%
\offinterlineskip
\ialign{\hfil##\hfil\cr\accent"AF{}\cr\noalign{\kern-1.3ex}å\cr}%
}%
}
\begin{document}

I’m stuck with this problem: å̄

\aringmacron

\end{document}


With lualatex I get

With xelatex