Using XeLaTeX and the fontspec package, I am experiencing problems using fonts whose name includes the space character. Here is a simple example:
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\begin{document}\end{document}
gives, upon xelatex
the error:
kpathsea: Invalid fontname `Times New Roman', contains ' '
I have used this font before and previously working examples ceased to work when I re-installed my operating system (Ubuntu 11.04) and TeXlive2011.
Best Answer
The error you are seeing usually arises when
fontspec
can't find the font at all. It is usually accompanied by the following more helpful error generated byfontspec
itself:Maybe your editing environment is hiding some of the console output from you.
Any font that is usable on your system in a regular application (e.g. Open Office) should be found by
fontspec
. So you should check to see if "Times New Roman" is actually available on your system after your OS update.