[XeTeX] char ß with pdflatex and xelatex

Will Robertson wspr81 at gmail.com
Mon Nov 9 01:15:52 CET 2009


On 2009-11-09 02:39:50 +1030, "M. Niedermair" 
<m_g_n at gmx.de> said:

> 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.

Here's a smaller minimal example that sort of explains what's happening:

\documentclass{article}
\usepackage{ifxetex}
\ifxetex
  \usepackage{fontspec,xunicode}
\else
  \usepackage[utf8]{inputenc}
\fi
\begin{document}
\ifxetex
  \fontspec{Linux Libertine O} ß \ss
\fi\par
\usefont{T1}{fxl}{m}{n}\selectfont [ß = \char"DF] [\ss\ = \char"FF]\par
\usefont{T1}{fxl}{m}{sc}\selectfont [ß = \char"DF] [\ss\ = \char"FF]
\end{document}

The basic problem is trying to mix unicode input and a T1 font. The 
unicode eszett is "DF but in T1 it is located at "FF. This T1 font 
appears to have both.

In XeTeX, typing ß gives you "DF, but in pdfLaTeX typing ß with the 
inputenc package gives you \ss, which explains the behaviour you're 
seeing.

Can you instead use the OpenType version of Linux Libertine for XeTeX 
support? Then you should get consistent results.

Hope this helps,
Will




More information about the XeTeX mailing list