2

Is there a plain TeX way to to to enter the unicode U+1E2B character? Some fonts have this character, for example Libertine, and some don't. (I am working with Minion Pro, and it does not have it.) Is there a way to have it for any typeface?

\documentclass{standalone}
\usepackage{fontspec}

\begin{document} % U+1E2B ḫ \end{document}

enter image description here

blackened
  • 4,181
  • 1
    https://tex.stackexchange.com/questions/371759/breve-under-letter-is-not-in-italics-when-using-textit is related. – Marijn Feb 16 '24 at 15:15

1 Answers1

4

Minion Pro is well known to lack lots of glyphs.

But it has U+02D8 BREVE and you can define a workaround (note: copy-paste won't work).

\documentclass{article}
\usepackage{fontspec}
\usepackage{newunicodechar}

\setmainfont{Minion Pro} \newfontfamily{\test}{Libertinus Serif} % just to see that the correct character is produced

\NewDocumentCommand{\U}{m}{% \iffontchar\font"032E #1^^^^032e \else \makeunderbreve{#1}% \fi }

\newcommand{\makeunderbreve}[1]{% \leavevmode \vtop{\offinterlineskip \ialign{##\hfil\cr #1\cr \noalign{\kern0.15ex} \hidewidth^^^^02d8\kern10\fontdimen1\font\hidewidth\cr \noalign{\kern-1.2ex} }% }% }

\newunicodechar{ḫ}{\U{h}}

\setlength{\fboxsep}{0pt}% to show the bounding box

\begin{document}

% U+1E2B ḫ \U{h} \fbox{\U{h}}

{\test ḫ} % this can be copy-pasted (it's in Libertinus Serif)

\textit{aḫa} \textbf{aḫa} \textbf{\textit{aḫa}}

\textit{aha} \textbf{aha} \textbf{\textit{aha}}

\end{document}

enter image description here

If U+032E COMBINING BREVE BELOW exists in the current font, it's used, otherwise the breve is put below with an alignment.

egreg
  • 1,121,712