Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I get three diacritical points in ' ї ' (U+0457) symbol using XeLaTeX and Gentium font, instead of two. This may be an issue only with Gentium, as other fonts work well.

\documentclass[12pt,a4paper]{article} 
\usepackage{polyglossia}
\newfontfamily\cyrillicfont[Script=Cyrillic]{Gentium}
\setdefaultlanguage{ukrainian}

\begin{document}
 ї      %   three diacritical points - wrong symbol
 \"\i   %   right symbol
 \ Ї    %   right capital symbol (U+0407)
\end{document}
share|improve this question

4 Answers 4

up vote 8 down vote accepted

The character U+0457 doesn't exist in Gentium, so \"i is used, which is obviously wrong.

You can use newunicodechar to test if the character exists:

\documentclass[12pt,a4paper]{article}
\usepackage{polyglossia}
\newfontfamily\cyrillicfont[Script=Cyrillic]{Gentium}
\setdefaultlanguage{ukrainian}

\usepackage{newunicodechar}
\newunicodechar{ї}{\iffontchar\font`її\else\"\i\fi}

\begin{document}
ї      %   right symbol
\"{\i} %   right symbol
Ї      %   right capital symbol (U+0407)
\end{document}

enter image description here

share|improve this answer
    
U+0457 exists in Gentium Plus. But it’s still useful to know how to test for it. –  Thérèse Aug 4 '13 at 19:20

Elaborating on egreg’s answer, what happens is that HarfBuzz (the OpenType layout engine used by XeTeX) tries its best to render any given charter, and since Gentium does not support U+0457 it tries to decompose it into its canonically equivalent decomposed form; U+0457 + U+0308 since both are supported by the font. However, the font does not correctly handle combining U+0457 with diacritical marks (it is a soft dotted character, so it should lose its dot when combined with combining marks), and so this is considered a font bug. See this HarfBuzz mailing list thread for more discussion on this.

share|improve this answer
    
I was asking myself which component was responsible of the substitution. This feature of HarfBuzz seems very interesting. –  egreg Aug 5 '13 at 15:10

Gentium Basic has more weights but a smaller character set than Gentium, and Gentium Plus expands on Gentium to offer almost complete support for Latin, Cyrillic, and Greek. See the Gentium FAQ if you want more details. For your purposes, simply change \newfontfamily\cyrillicfont[Script=Cyrillic]{Gentium} to \newfontfamily\cyrillicfont[Script=Cyrillic]{Gentium Plus}.

share|improve this answer

Gentium has no smarts in it. Instead we recommend using Gentium Plus that has the full range of smarts found in SIL's other Roman fonts (Charis, Andika, Doulos).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.