# How to use Times Roman (Nimbus Roman) with fontspec under Linux and LuaLaTeX

Times Roman under Linux is usually Nimbus Roman. If I use the times package, Nimbus Roman will be embedded successfully, as a Type 1 font.

Now I want to use the fontspec package to load it. This a minimal example.

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Times Roman}

\begin{document}
test
\end{document}


fontspec says it cannot find the font TimesRoman. I have also tried

\setmainfont{Nimbus Roman}
\setmainfont{Nimbus Roman No 9 L}
\setmainfont{NimbusRomNo9L}
\setmainfont{NimbusRomNo9L-Regu}


but none of them can load it successfully.

Any hint will be greatly appreciated.

-
Welcome to TeX.sx! Please add a complete minimal working example (MWE) that illustrates your problem or shows what you have done untill now. Do you have a concrete error message? Which one? –  Kurt Sep 28 '12 at 12:46
Afaik luaotfload (used by fontspec to load system fonts) doesn't support type1 fonts. So if you want to use them you will have to load them in the normal way through a tfm-file. Use \setmainfont together with otf or ttf fonts. –  Ulrike Fischer Sep 28 '12 at 13:11
Which operating system, and which TeX distribution, do you use? Macs and PCs use slightly different (and differently-named) versions of Times. –  Mico Sep 28 '12 at 14:48
@Kurt I've added a minimal example. –  Pink Sep 29 '12 at 5:37
@Mico I'm using Debian squeeze and TexLive 2011. –  Pink Sep 29 '12 at 5:38

You can use the TeX Gyre Termes font, which is an extended version of Nimbus Roman No9 L available as Type 1 and OpenType. It is already installed in TeX Live, so using it with LuaLaTeX should be as simple as

\documentclass{article}
\usepackage{fontspec}
\setmainfont{TeX Gyre Termes}

\begin{document}
The quick brown fox jumps over the sleazy dog
\end{document}


### Nimbus Roman No9 L:

(The font samples are from the LaTeX Font Catalogue.)

-
It's a clear and simple answer. Thanks. –  Pink Sep 30 '12 at 4:55

With

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Times Roman}
\begin{document}
foo
\end{document}


I get

voss@shania:~/Test> pdffonts test.pdf
name                          type              encoding         emb sub uni object ID
----------------------------- ----------------- ---------------- --- --- --- ---------
YDJOHC+Times-Roman-Identity-H CID Type 0C       Identity-H       yes yes yes      5  0


and when running fc-list | grep Times I get a lot of fonts in my Linux system. And with LuaLaTeX my Times Roman installed in ~./font is used . From the log:

[...]
/home/voss/.texlive2012/texmf-var/l
uatex-cache/generic/fonts/otf/temp-times-0.lua)(save: /home/voss/.texlive2012/t
exmf-var/luatex-cache/generic/fonts/otf/temp-times-0.lua)
[...]

-
So you mean you have copied Times Roman from a Windows or OS X machine? I wonder if I can use Nimbus Roman shipped with the system. –  Pink Sep 29 '12 at 5:46
XeTeX uses fontconfig and LuaTeX its own list for searching fonts as shown above. –  Herbert Sep 29 '12 at 6:47

To sum up,

• Times Roman on Linux is Nimbus Roman
• Only type1 format of Nimbus Roman is shipped with the system
• fontspec does not support type1 font
• Mixing fontspec and type1 font usage is possible but difficult

So my problem can be solved if I can get a ttf or otf format of Times Roman.

Herbert seems to be using Times New Roman from Windows. This way is easy if you have access to a Windows PC or a Mac.

Another way is to convert type1 format of Nimbus Roman to ttf or otf format. There are some online font converter sites, and the conversion is very fast. After conversion, I can use fontspec to load Nimbus Roman directly. For those who need it,

• Nimbus Roman No9 L Regular is /usr/share/fonts/type1/gsfonts/n021003l.pfb
• Nimbus Roman No9 L Medium is /usr/share/fonts/type1/gsfonts/n021004l.pfb
• Nimbus Roman No9 L Regular Italic is /usr/share/fonts/type1/gsfonts/n021023l.pfb
• Nimbus Roman No9 L Medium Italc is /usr/share/fonts/type1/gsfonts/n021024l.pfb

But in fact I don't like this way, because it makes font management complicated. Now there are two versions of Nimbus Roman in my system.

Is there some better way to solve the problem?

(Maybe I can request the Linux distribution or TexLive to ship a ttf or otf version of Nimbus Roman?)

-
search for a ttf version of times in the net, you'll find a lot of download addresses –  Herbert Sep 29 '12 at 11:14