[XeTeX] char ß with pdflatex and xelatex

Ulrike Fischer news3 at nililand.de
Mon Nov 9 10:31:33 CET 2009


Am Sun, 08 Nov 2009 17:09:50 +0100 schrieb M. Niedermair:

> Hi,
> 
> I am working on a new package version for the libertine font.
> Now I have found a problem.
> 
> If I use pdflatex I get other Glyphs for the german ß than when I use 
> xelatex.
> pdflatex and xelatex both use the type 1 version of the font.
> 
> I suppose, it is a problem with the input-encoding.
> 
> Does anyone have a tipp for me?

The problem is that the font encoding (T1) differs at various
positions from unicode. So the input chars has to be remapped. This
mapping is done with pdflatex with inputenc:

   inputenc              fontenc, eg. T1enc.def
ß---------------> \ss ----------------> Position in T1 encoding

As with xetex you can't use inputenc, this now fails. The ß is not
the only char affected (but for germans the most obvious):

\documentclass{book}
\usepackage[T1]{fontenc}
\begin{document}
€, ƒ, Š, Œ, ½, § %and more
\end{document}

So if you want to use a LaTeX encoded (e.g. T1) font you should use
commands like \ss with xelatex for non-ascii input or activate the
chars: 

\documentclass{book}
\usepackage[T1]{fontenc}
\catcode`\ß=13
\defß{\ss}
\begin{document}
ß
\end{document}


-- 
Ulrike Fischer 



More information about the XeTeX mailing list