On my mac running OSX 11.0.1 and TeX Live 2020, I'm trying to find the fontspec-name for the default font used by latex so that I can increase the font size in some locations of my document.
By using \showthe\font
in a latex document, I printed the default font used on my Mac:
\TU/lmr/m/n/10 .
How do I find the fontspec name for lmr
? grep lmr $(kpsewhich pdftex.map)
returns 244 lines of output. How do I gather the exact font name for lmr
? For e.g. from these three lines, I picked up LMRoman10-Regular
as the possible fontspect-name:
ts1-lmr10 LMRoman10-Regular " enclmts1 ReEncodeFont " <lm-ts1.enc <lmr10.pfb
ts1-lmr12 LMRoman12-Regular " enclmts1 ReEncodeFont " <lm-ts1.enc <lmr12.pfb
ts1-lmr17 LMRoman17-Regular " enclmts1 ReEncodeFont " <lm-ts1.enc <lmr17.pfb
However, compiling my document fails when I use any variant of the names from the second column:
\documentclass{article}
\usepackage{fontspec}
% Tried LMRoman10, LMRoman, LMRoman10-Regular but nothing works
\setmainfont[Ligatures=TeX,Scale=1.0]{LMRoman10}
\begin{document}
% This text should be in normal size
hello world
% Increase font size for this text
Print me in bigger size
\end{document}
\large
,\Large
or similar work? That said, yes, this is “Latin Modern”. If you want to access it viafontspec
you'll probably need to install it on your system regularly, i.e. as a True/Open Type Font.\setmainfont{Latin Modern Roman}
a try. Aside: You needn't know the name of the default font in order to execute{\large ...}
or{\Huge ...}
.\fontsize{3cm}{4cm}\selectfont
? why do you need to know th einternal names? Also latin modern is the default already in xelaetx so you do not needfontspec
or the\setmainfont
command.