I'm trying to use Cambria in an article; I'm using Windows (XP, but I have the font installed), MiKTeX 2.8 and WinEdt 6.0. (Yes, I know Cambria is not available on all machines, but it's not a concern this time, it's a document for only a few people).
I have
\usepackage{fontspec}
\setmainfont{Cambria}
in my article, but receive the following error.
("C:\Program Files\MiKTeX 2.8\tex\xelatex\fontspec\fontspec.sty"
("C:\Program Files\MiKTeX 2.8\tex\latex\ifxetex\ifxetex.sty")
!
********************************************
* XeTeX is required to compile this document.
* Sorry!
********************************************.
\RequireXeTeX ...********************************}
\endgroup \fi
l.18 \RequireXeTeX
?
I've also tried to load the font without fontspec
as seen at https://tex.stackexchange.com/a/10714
\font\x="Cambria" at 12 pt \x hello
but receive a different error:
Running miktex-makemf.exe...
miktex-makemf: The Cambria source file could not be found.
Running hbf2gf.exe...
hbf2gf (CJK ver. 4.8.0)
Couldn't find `Cambr.cfg'
miktex-maketfm: No creation rule for font Cambria.
! Font \x=Cambria at 12.0pt not loadable: Metric (TFM) file not found.
l.9 \font\x="Cambria" at 12 pt
Best Answer
Based on the error message:
using
XeLaTeX
should remedy the problem.