# Unicode character not showing properly

I would like to type a word using Unicode character U+1E17 (Latin small letter e with macron and acute) using the TeX Gyre Pagella font (a clone of Palatino Linotype). However, when I do so the acute accent is too low. Is there a way to rectify this?

Below is a MWE:

\documentclass{article}
\usepackage{unicode-math}
\setmainfont{TeX Gyre Pagella}
\begin{document}
\textit{\huge{\char"1E17th}} \textsc{\huge{test}}
\end{document}


Edit: I could set Palatino (NOT Palatino Linotype) as the main font, but then I would not be able to use small caps

\documentclass{article}
\usepackage{unicode-math}
\setmainfont{Palatino}
\begin{document}
\textit{\huge{\char"1E17th}} \textsc{\huge{test}}
\end{document}


• with xelatex your test file makes this output Jul 10 '19 at 18:54
• I can't reproduce either. Jul 10 '19 at 19:03
• with luatex I get no e at all and the log Missing character: There is no ḗ (U+1E17) in font TeXGyrePagella/I:mode=node;s Jul 10 '19 at 19:04
• @egreg you get that ^^ ? Jul 10 '19 at 19:04
• Is your system up-to-date? Jul 10 '19 at 19:14

I can not reproduce your output with texlive 2019, I tried your test file with xelatex, lualatex and with minor changes the experimental harflatex with the following results.

xetex

harftex

luatex

• The only possible option for me is to use xelatex as it is the only typesetting engine compatible with reledmac (I didn't deem it necessary to specify that in the MWE). Also, I use TexPad for Mac and everything seems up to date. Jul 10 '19 at 19:49
• @Catoblepa it would have (helped if you'd specified xetex as you see the luatex output is completely different) also say which release, you must I think have older copies of the fonts. Jul 10 '19 at 19:56
• @Catoblepa reledmac works with pdflatex and lualatex as well as xelatex Jul 10 '19 at 20:15

The font does not support the U+1E17 character.

HarfBuzz (in XeTeX and HarfTeX), helpfully decompose it into e + combining macron + combining + combining acute (U+0304 and u+0301), which luckily is rendered acceptably by the font (at least the version included in TeX Live 2019).

You can achieve the same effect on other engines (well, LuaTeX with luaotfload) by doing the decomposition manually

\documentclass{article}
\usepackage{unicode-math}
\setmainfont{TeX Gyre Pagella}
\begin{document}
\textit{\huge{e\char"0304\char"0301th}} \textsc{\huge{test}}
\end{document}


Alternatively you can keep using TeX Gyre Pagella for smallcaps, and use a different font for the rest of the text:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Palatino}
[
SmallCapsFont={TeX Gyre Pagella},
SmallCapsFeatures={Letters=SmallCaps},
]
\begin{document}
\textit{\huge{\char"1E17th}} \textsc{\huge{test}}
\end{document}

• Thank you, @Khaled Hosny Jul 12 '19 at 2:19

Not all Unicode font families feature U+1E17; and, as you've discovered, even some fonts that do say they feature this glyph don't get it quite right.

If you can make do with EB Garamond -- another Garalde -- you should get the correctly rendered glyph in both upright and italic.

\documentclass{article}
\usepackage{fontspec}
\setmainfont{EB Garamond}%{TeX Gyre Pagella}
\begin{document}
\char"1E17th
\textit{\char"1E17 th}
\end{document}

• Thank you, @Mico, it would be a great fix if I had the freedom to use the font I wanted to. Jul 10 '19 at 18:52
• I have no problem with your original sample file using TeX Gyre Pagella. This is with a fully updated TeX Live 2019 installed via the MacTeX installer package. However, using Font Names will only work properly of the fonts can be found with Font Book so you may have to copy or create a symbolic link to the opentype fonts in your TeX Distribution. Jul 10 '19 at 19:58
• @HerbSchulz - Did you maybe mean to post your comment below the OP's query?
– Mico
Jul 11 '19 at 2:16
• @Mico : probably. Jul 11 '19 at 14:03