I am just starting to use LuaLaTeX. Mainly because I want to use a ttf
font for a presentation. My MWE looks like
\documentclass{article}
\usepackage{fontspec}
\setmainfont[]{HelveticaNeue/HelveticaNeueLTCom-Th.ttf}
\begin{document}
Test
\end{document}
I have a folder called HelveticaNeue
in the same folder as the MWE file. The folder consists of many versions of the famous font Helvetica Neue
. The content looks like
HelveticaNeueLTCom-Bd.ttf
HelveticaNeueLTCom-BdCn.ttf
HelveticaNeueLTCom-BdCnO.ttf
HelveticaNeueLTCom-BdEx.ttf
HelveticaNeueLTCom-BdExO.ttf
HelveticaNeueLTCom-BdIt.ttf
HelveticaNeueLTCom-BdOu.ttf
HelveticaNeueLTCom-Blk.ttf
HelveticaNeueLTCom-BlkCn.ttf
HelveticaNeueLTCom-BlkCnO.ttf
HelveticaNeueLTCom-BlkEx.ttf
HelveticaNeueLTCom-BlkExO.ttf
HelveticaNeueLTCom-BlkIt.ttf
HelveticaNeueLTCom-Cn.ttf
HelveticaNeueLTCom-CnO.ttf
HelveticaNeueLTCom-Ex.ttf
HelveticaNeueLTCom-ExO.ttf
HelveticaNeueLTCom-Hv.ttf
HelveticaNeueLTCom-HvCn.ttf
HelveticaNeueLTCom-HvCnO.ttf
HelveticaNeueLTCom-HvEx.ttf
HelveticaNeueLTCom-HvExO.ttf
HelveticaNeueLTCom-HvIt.ttf
HelveticaNeueLTCom-It.ttf
HelveticaNeueLTCom-Lt.ttf
HelveticaNeueLTCom-LtCn.ttf
HelveticaNeueLTCom-LtCnO.ttf
HelveticaNeueLTCom-LtEx.ttf
HelveticaNeueLTCom-LtExO.ttf
HelveticaNeueLTCom-LtIt.ttf
HelveticaNeueLTCom-Md.ttf
HelveticaNeueLTCom-MdCn.ttf
HelveticaNeueLTCom-MdCnO.ttf
HelveticaNeueLTCom-MdEx.ttf
HelveticaNeueLTCom-MdExO.ttf
HelveticaNeueLTCom-MdIt.ttf
HelveticaNeueLTCom-Roman.ttf
HelveticaNeueLTCom-Th.ttf
HelveticaNeueLTCom-ThCn.ttf
HelveticaNeueLTCom-ThCnO.ttf
HelveticaNeueLTCom-ThEx.ttf
HelveticaNeueLTCom-ThExO.ttf
HelveticaNeueLTCom-ThIt.ttf
HelveticaNeueLTCom-UltLt.ttf
HelveticaNeueLTCom-UltLtCn.ttf
HelveticaNeueLTCom-UltLtCnO.ttf
HelveticaNeueLTCom-UltLtEx.ttf
HelveticaNeueLTCom-UltLtExO.ttf
HelveticaNeueLTCom-UltLtIt.ttf
HelveticaNeueLTCom-XBlkCn.ttf
HelveticaNeueLTCom-XBlkCnO.ttf
I compile the file using (Windows 7, LuaTeX version 0.76.0-2013062820, rev 4627) lualatex filename
. I receive an error;
I added a screenshot because the error does not exist in the log file.
An additional question would be how to use the different font features like small caps, italic, bold and so on. I have seen that you can define it like here:
\setmainfont[
BoldFont = Fontname-Bold,
ItalicFont = Fontname-Italic,
BoldItalicFont = Fontname-BoldItalic
]{Fontname}
but I did not find small caps in the ttf
font files.
Update
Following Herbert's advice, I added all the ttf
font files into my Windows font folder (now I can use them in Word and so on). This look like
Then I changed the MWE accordingly:
\documentclass{article}
\usepackage{fontspec}
%\setmainfont[]{HelveticaNeue/HelveticaNeueLTCom-Th.ttf}
\setmainfont[]{Helvetica Neue LT Com 23}
\begin{document}
Test
\end{document}
and receive this error message:
Following Mico's advice (placing the ttf
file in the same folder as the MWE file) works. I do not understand why and I wonder how to use bold, small caps and so on. Do I have to define all manually?
2nd Update
After double clicking on a font file I saw the "real" name. Using this name works with system fonts;
\setmainfont[]{HelveticaNeueLT Com 35 Th}
Best Answer
put the font files into your system font directory and then use
The document has the fonts included:
Maybe that your version of Helvetica has another name, then change it in the example.
Here is the info from your
HelveticaNeueLTCom-Lt.ttf
:Here is a setting for your fonts:
with the output:
for a small caps font use: