# Problems for use differents fonts in a document with XeTeX

I'm working a document using the scrartclclass with the following options and packages:

\documentclass[10pt,letterpaper,DIV=14,titlepage=false,twocolumn=on]{scrartcl}
%\usepackage[DIV=14]{typearea}
\usepackage[spanish,activeacute,mexico]{babel}
\usepackage[english=british,french=quotes,german=quotes,spanish=mexican]{csquotes}
\usepackage{ucs}
\usepackage{hyperref}
\hypersetup{
bookmarks=true,         % show bookmarks bar?
unicode=true,           % non-Latin characters in Acrobat’s bookmarks
pdftoolbar=true,        % show Acrobat’s toolbar?
pdffitwindow=false,     % window fit to page when opened
%pdfstartview={FitH},   % fits the width of the page to the window
pdftitle={Document},    % title
pdfauthor={Me},     % author
pdfsubject={Fortation},   % subject of the document
pdfcreator={Listopad},   % creator of the document
pdfproducer={Balerdi}, % producer of the document
%pdfkeywords={keyword1} {key2} {key3}, % list of keywords
pdfnewwindow=true,      % links in new window
citecolor=green,        % color of links to bibliography
filecolor=red,      % color of file links
urlcolor=blue,           % color of external links
anchorcolor=magenta, % color for anchor texto
filecolor=cyan, % color for urls which open local files
runcolor=violet, % color for run links (launch annotations)
}
\usepackage{url}
\usepackage{fontspec} %
\defaultfontfeatures{Mapping=tex-text}
\usepackage{xunicode}
\usepackage{xltxtra}
\setmainfont{Constantia}
\setsansfont{Corbel}
\setmonofont{Consolas}

\renewcommand{\familydefault}{\sfdefault}
\pagestyle{plain}

\usepackage[usenames,dvipsnames,x11names,table]{xcolor}
\usepackage[per-mode=symbol]{siunitx}
\sisetup{
%output-decimal-marker = {,},
detect-weight= true,
range-units = brackets,
list-final-separator = { \translate{and} },
list-pair-separator = { \translate{and} },
range-phrase = { \translate{to (numerical range)} },
}
\usepackage{array}
\usepackage{makeidx}
\usepackage{graphicx}
%\usepackage[grid=true,gridcolor=cyan,subgridcolor=orange,gridunit=pt]{eso-pic}% dibuja la reticula de las paginas

\usepackage{scrpage2}

\usepackage[stable,bottom]{footmisc}
\raggedbottom
\clubpenalty=10000
\widowpenalty=10000
%\setlength{\parskip}{3pt plus 2pt minus 2pt}

\parskip0.4\baselineskip

\begin{document}

\end{document}


This works fine compiling with XeLaTeXmy problem is how to use correctly in the same document those three fonts, because I can only load Cobel, all the document appears with Corbel, but not with Cosntantia and Consolas.

I use this preamble and works fine every time I want to compose a document with this class (remember that the KOMA Script classes can use by default serif and sans serif fonts for headers and other stuff) with only one typeface, sucha as Myriad, but I don't know why it doesn't work when I add another font as \setmainfont.

• You've set the default font family to sans serif. So the settings of the serif font will have no effect unless you explicitly change to serif. If you remove the line setting the entire document to sans, you will get the normal behaviour. (So if that's a mix of serif with sans for headers etc., that's what you'll then get.) That is, remove \renewcommand{\familydefault}{\sfdefault} if you want to use all three fonts. – cfr Apr 28 '14 at 21:38
• Yeah, thanks, I was in a hurry and there was long time ago I didn't use XeLaTeX so I forgot to remove or comment that line. – Aradnix Apr 29 '14 at 1:11

\renewcommand{\familydefault}{\sfdefault}

This sets the default font family to sans serif. So the settings of the serif font have no effect unless you explicitly request serif using something like \rmfamily or \textrm{}.