views:

395

answers:

5

Hi,

an earlier question led me to XeLaTex (it was about LaTeX and Unicode). So I've got now this document:

\documentclass[a4paper]{article}
\usepackage[cm-default]{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{Arial}
\begin{document}
গ a ä ͷ 
\end{document}

With the font "Arial" only the a and the ä are displayed, the other two characters are only a box each. If I remove the \setmainfont-command, only the a is displayed. If I change "Arial" to "Linux Libertine" I receive an error message:

Illegal fontname `Linux Libertine': contains ' '

This is irritating, because the WikiPedia-Example about XeLaTeX has a font-name containing spaces.

What do I have to do to make all the given chars appear in my pdf-document?

A: 

Apparently you need your font to support your Unicode characters. TeX Gyre Pagella, as suggested here, works for me for some Central European diacritic characters and Cyrillic.

oggy
This doesn't help, same error messages as with Linux Libertine: Illegal fontname `TeX Gyre Pagella': contains ' '
Julian
Strange, I get the same error with your example, but it does work with TeX Gyre Pagella. Are you sure you have the proper fonts installed?
oggy
+1  A: 

If the fonts are correctly installed, they should work as expected (at least they work for me). However, neither Arial nor Linux Libertine contain all four characters. Especially the first character is supported only by a tiny number of fonts (see this list). The following example uses Code2000 and displays all characters correctly:

\documentclass[a4paper]{article}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\setmainfont{Code2000}
\begin{document}
গ a ä ͷ 
\end{document}
Philipp
A: 

you probably won't be able to load TeX Gyre Pagella with XeTeX or XeLaTeX. Switch back to regular LaTeX and do this in your preamble:

\usepackage[T1]{fontenc}
\usepackage{tgpagella}
Mica
If the TeX Gyre fonts are installed in the system they can be loaded in fontspec without problem.
Will Robertson
not the case with MikTeX 2.8 on Windows XP.
Mica
Also, see the comment above: This doesn't help, same error messages as with Linux Libertine: Illegal fontname `TeX Gyre Pagella': contains ' ' – Julian yesterday.
Mica
A: 

Ah, I see; I should have actually tried out your example. The OpenType name of the font isn't Linux Libertine, it's Linux Libertine O. Alternatively, you can use the PostScript name:

\setmainfont{LinLibertineO}

Still, this font doesn't have all those four characters either. You might have a hard time finding one that does.

Will Robertson
A: 

sorry guys to answer so late, but I actually did what i wanted:

http://www.julianmoritz.de/dl/poster.pdf

regards!

Julian