4

I have following in my latex header:

\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Times New Roman}

This results in "font not found" error when compiled with xetex. I installed all packages related to times but the problem still persists.

Thanks for taking a look.

10
  • 5
    You need to install "Times New Roman" as a system font. The manual for your operating system should show you how to do that. – Thorsten Donig Feb 23 '14 at 17:08
  • 4
    If you don't actually need Times New Roman but rather a font which will look like it, you could specify the main font as e.g. TeXGyreTermes to use the TeX Gyre version. Times New Roman isn't free so TeX Live itself doesn't include it for any format (xelatex, pdflatex, latex...). What the relevant latex packages provide is not TNR but (typically) URW fonts which look like it. The same is true for e.g. Helvetica etc. – cfr Feb 23 '14 at 17:32
  • @ThorstenDonig And preferably delete all other instances of Times New Roman. Several instances of (different versions) of the same font may produce faults. – Toscho Feb 23 '14 at 18:45
  • @Toscho: If there would be any other instance of "Times New Roman", the reported error would not occur. – Thorsten Donig Feb 23 '14 at 19:13
  • 1
    Thank Thorsten, cfr: This fixed it. I installed msttcorefonts and this fixed the problem. I would give TexGyreTermes version try. – Sandeep Feb 23 '14 at 21:39
10
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Times New Roman}

These settings require you to have the font Times New Roman installed for your system. Since this is a proprietary font, it is not distributed with TeX Live at all.

If you simply need something which looks like TNR, try TeX Gyre Termes which is a clone of Times/Times New Roman. This font is distributed in both type1 and opentype formats with TeX Live and other current TeX distributions, or can be downloaded and installed for your operating system independently.

If you have a copy of Times New Roman, you can install it for your OS and use it. How to install a font depends on your operating system. On some systems, opening the font file will trigger an offer to install the font for you. For example, OS X should do this. Otherwise, the steps required are OS-dependent. OS X uses Font Book to manage fonts. (Or it did - I think it still does.) On a GNU/Linux system, you put the font in ~/.fonts or /usr/local/share/fonts and then update the fontconfig cache to make it available to your system. For a common, free font such as TeX Gyre Termes, you can almost certainly simply install it using your distro's package manager.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.