XeTeXSpecial Characters not printed with Gentium Font

Information and discussion about XeTeX, an alternative for pdfTeX based on e-Tex
Post Reply
rapante-rapante
Posts: 2
Joined: Sat Nov 12, 2011 7:22 pm

Special Characters not printed with Gentium Font

Post by rapante-rapante »

Hi there,

I'm fairly new to {Xe|La}TeX, basically I use it only indirectly via emacs' org-mode. The problem is that UTF-8 input such as arrows (→, right arrow, [Compose]+i on Ubuntu/Gnome) doesn't show up in the result, whereas

Code: Select all

\rightarrow
does. At the same time, no problems occur with IPA characters (ʔ, ŋ, etc.).

What could be the problem?

I'm attaching a MWE that, while not made with org-mode, shows the same symptoms and may be due to the same cause.

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{Gentium}
\begin{document}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont{Gentium}

ng: ŋ \\
glottalStop: ʔ \\
rightarrow: → \\
tex rightarrow: $\rightarrow$ \\

\end{document}
Last edited by rapante-rapante on Sun Nov 13, 2011 1:20 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10358
Joined: Mon Mar 10, 2008 9:44 pm

Re: Special Characters not printed with Gentium Font

Post by Stefan Kottwitz »

Obviously the Gentium font doesn not support that character. If you would remove the Gentium lines, the right arrow symbol would appear.

Stefan
LaTeX.org admin
rapante-rapante
Posts: 2
Joined: Sat Nov 12, 2011 7:22 pm

Special Characters not printed with Gentium Font

Post by rapante-rapante »

Thank you!
I simply assumed that Gentium would support anything outside [a-zA-z0-9], since that's what is purported. Switching to Linux Libertine O yields the desired result plus the surprise of two different rightarrows. For reference's sake:

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage{fontspec}
\usepackage{xltxtra}
\setromanfont[Mapping=tex-text]{Linux Libertine O}
\begin{document}

ng: ŋ \\
glottalStop: ʔ \\
rightarrow: → \\
tex rightarrow: $\rightarrow$ \\

\end{document}
Cheers!
Post Reply