I am unable to change the font from the default font, e.g. when I comment in any of the font packages in the following code:
\documentclass[a4paper]{article}
% \usepackage{mathptmx}
% \usepackage{tgbonum}
% \usepackage{tgtermes}
\begin{document}
Testing Font.
TESTING FONT.
\end{document}
I am using Sublime Text editor and compiling with the following script commands:
"linux" :
{
"script_commands":
[
"lualatex -shell-escape -synctex=1 -interaction=nonstopmode",
"bibtex",
"lualatex -shell-escape -synctex=1 -interaction=nonstopmode",
"lualatex -shell-escape -synctex=1 -interaction=nonstopmode",
"makeindex $file_base_name.nlo -s nomencl.ist -o $file_base_name.nls",
"lualatex -shell-escape -synctex=1 -interaction=nonstopmode"
]
}
Interestingly, if I compile with the in-built "PdfLaTeX" command in Sublime, I can successfully change the font. I am fairly new to LaTeX, so I may be missing something really obvious here. Any help would be much appreciated!
\usepackage[OT1]{fontenc}before your font package to use 8bit encodings with LuaLaTeX - but if you have the font that you want (for example Times New Roman or a variant of that) installed on your system then it is preferable to use the font the 'modern' way, i.e.,\usepackage{fontenc}and\setmainfont{Times New Roman}. – Marijn Jun 16 '20 at 18:38\usepackage[T1]{fontenc}also works (and works better than OT1) for these packages. – Marijn Jun 16 '20 at 18:55