[XeTeX] Using Concrete (and other) fonts with XeLaTeX
Ulrike Fischer
news3 at nililand.de
Thu Apr 9 18:25:55 CEST 2009
Am Thu, 09 Apr 2009 09:05:09 +0200 schrieb Václav Šmilauer:
> Hello,
>
> I recently switched to xelatex and I am not able to find out how to used
> Concrete font for text and Euler for math. Searching google and reading
> docs gave no answer either. In regular LaTeX I would
> \usepackage{concrete}. In XeLaTeX, I tried
>
> \usepackage{euler,fontspec,xunicode,concrete}
>
> but I get
>
> LaTeX Font Warning: Font shape `EU1/ccr/m/n' undefined
> (Font) using `EU1/lmr/m/n' instead on input line 5.
>
> and the result is typeset in computer modern.
>
> I was trying to use \setmainfont, but as far as I can tell it works only
> with ttf/otf/ps1 fonts that are installed, not with .tfm. (Or am I just
> not able to get the font name for Concrete I should pass to \setmainfont)?
If you want to use concrete like with pdflatex you should simply not
load fontspec:
\documentclass{report}
\usepackage[T1]{fontenc}
\usepackage{concrete}
\begin{document}
abc
$\pi$
\end{document}
And you should not use non-ascii chars in your input, they can fail.
Use command like \"a.
If you want to use also system fonts loaded with fontspec, you will
have to switch to T1-encoding everytime you want to use concrete and
back to EU1 for the system fonts.
\documentclass{report}
\usepackage[T1]{fontenc}
\usepackage{concrete}
\usepackage{fontspec}
\setsansfont{Arial}
\begin{document}
\fontencoding{T1}\selectfont abc \"a
\fontencoding{EU1}\sffamily abc
$\pi$
\end{document}
If you have the type1-Version of the concrete fonts it could be
possible to load them with fontspec, but in generally there are
problems with accents etc.
>
> I have the same issue with \usepackage{palatino} (Adobe Palatino), where
> I use \setmainfont{URW Palladio L} (URW "Palatino").
On windows I can use
\documentclass{report}
\usepackage{fontspec}
\setmainfont{Palatino Linotype}
\begin{document}
abc
\end{document}
--
Ulrike Fischer
More information about the XeTeX
mailing list