Using Gentium Plus glyphs in XeLaTex

charactersgreekunicodexetex

I am trying to type PUA characters (such as omicron with perispomeni) using the Gentium Plus font on macOS.

I have tried setting Gentium Plus as the font for Greek using babel and fontspec but it doesn't seem to work. I only get a blank square as a replacement character. I'm assuming LaTeX isn't recognizing the character and therefore can't call for the correct glyph but don't know how to correct that.

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[12pt]{article}

\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont[Mapping=tex-text]{Times New Roman}
\newfontfamily\greekfont{Gentium Plus}
\usepackage[greek.ancient,english,spanish]{babel}

\begin{document}
υσσκι κατὰ σκιρ�ν
\end{document}

Best Answer

Font Book tells you the glyph number, in this case 3232, so you can use \XeTeXglyph3232

However, you might use the combination

U+03BF GREEK SMALL LETTER OMICRON
U+0342 COMBINING GREEK PERISPOMENI

as shown in the second line of the example code below.

\documentclass[12pt]{article}

\usepackage{fontspec}
\usepackage[greek.ancient,english,spanish]{babel}

\setmainfont{Times New Roman}
\newfontfamily\greekfont{GentiumPlus}[
  Extension=.ttf,
  UprightFont=*-R,
  ItalicFont=*-I,
]

\begin{document}

\greekfont

υσσκι κατὰ σκιρ\XeTeXglyph3232 ν

υσσκι κατὰ σκιρο͂ν

\end{document}

Note that xltxtra and xunicode are no longer recommended: to the contrary, it's now recommended not to load them. I loaded Gentium Plus by file name, because the system font seems not to be seen on my machine.

enter image description here