General[SOLVED] fontspec and xelatex

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
waster
Posts: 2
Joined: Sun Nov 23, 2008 3:24 pm

[SOLVED] fontspec and xelatex

Post by waster »

Hello.

I'm using MiKTeX 2.7 and included xelatex for pdf generation.

Here is the simple tex document:

Code: Select all

\documentclass[10pt]{article}

\begin{document}
   {\fontfamily{pcr}\fontseries{m}\fontshape{n}\selectfont Test}
\end{document}

While using xelatex I get a normal pdf document with Courier font "Test"

But when enabling fontspec (\usepackage{fontspec}) font is not changing.
I seems that \fontfamily\fontseries{m}\fontshape{n} etc are ignored. I did not find any related information in fontspec manual. But I saw messages in the forums that these directives should work while using fontspec.

So Is it possible to use them or not? :roll:

Regards
Last edited by waster on Sun Nov 23, 2008 3:48 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

waster
Posts: 2
Joined: Sun Nov 23, 2008 3:24 pm

[SOLVED] fontspec and xelatex

Post by waster »

Found solution. Have to add \fontencoding{T1}.
Topic can be closed.
Post Reply