I am using a template for a CV letter which does not include the "sharp S" in its font. Instead it compiles every possible way to encode "ß" into "ss". I would like to import the symbol from a different font. I know that there are similar questions on the forum but they are all about very specific cases and as an unexperienced LaTeX user, it is hard for me to make the analogy to my case.
I am using TeXnicCenter on a Windows PC with xelatex.exe as a pdf compiler with a MiKTex distribution and the following packages :
\usepackage{fontspec} % For loading fonts
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin} % Main document font
\usepackage{xunicode,xltxtra,url,parskip} % Formatting packages
\usepackage[usenames,dvipsnames]{xcolor} % Required for specifying custom colors
\usepackage[big]{layaureo} % Margin formatting of the A4 page, an alternative to layaureo can be \usepackage{fullpage}
% To reduce the height of the top margin uncomment: \addtolength{\voffset}{-1.3cm}
\usepackage{hyperref} % Required for adding links and customizing them
\definecolor{linkcolour}{rgb}{0,0.2,0.6} % Link color
\hypersetup{colorlinks,breaklinks,urlcolor=linkcolour,linkcolor=linkcolour} % Set link colors throughout the document
\usepackage{titlesec} % Used to customize the \section command
\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule] % Text formatting of sections
\titlespacing{\section}{0pt}{3pt}{3pt} % Spacing around sections
In the document I use :
\font\fb=''[cmr10]'' % Change the font of the \LaTeX command under the skills section
\ss
->\begin{fontxy}ß\end{fontxy}
. If this is acceptable. Since the ß is pretty rare, I think, this is okay. Maybe you should asign catcode 2 to the ß to not use them accidentally.\font\fb
and you shouldn't use cmr10 with xelatex. Beside this: both fontin and cmr10 have an ß. Correct the font setup of your document instead of trying to find bad work arounds.cmr10
you have to use the 8-bit character mapping, which makes it impossible to input UTF-8, i.e.ß
is not possible but has to be replaced with\ss
. For math inxetex
there is unfortunately no other option currently, because Unicode math font loading is broken (so nounicode-math
). You might want to use LuaTeX instead.