1

Here is the MWE:

\documentclass{standalone}
\usepackage[default]{lato}
\begin{document}
Hello World
\end{document}

When compiled with xelatex, it produces the following document:

Compiled document

Quite clearly, it is not a lato font.

FWIW, here are the relevant lines (at least, I think so :) ) from the logfile:

(/home/user/texlive/2017/texmf-dist/tex/latex/lato/lato.sty
Package: lato 2011/08/06 Lato

(/home/user/texlive/2017/texmf-dist/tex/latex/slantsc/slantsc.sty
Package: slantsc 2012/01/01 v2.11 Provide Slanted an Italic Small Caps

(/home/user/texlive/2017/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
)
LaTeX Info: Redefining \upshape on input line 35.
LaTeX Info: Redefining \slshape on input line 45.
LaTeX Info: Redefining \itshape on input line 55.
LaTeX Info: Redefining \scshape on input line 65.
)) (/tmp/1.aux)
\openout1 = `1.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for TU/lmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Try loading font information for TU+fla on input line 3.
LaTeX Font Info:    No file TUfla.fd. on input line 3.

LaTeX Font Warning: Font shape `TU/fla/m/n' undefined
(Font)              using `TU/lmr/m/n' instead on input line 3.

[1

] (/tmp/1.aux)

LaTeX Font Warning: Some font shapes were not available, defaults substituted.

What is happening here? Why is it substituting fonts when Lato is available? Has it something to do with font encodings? I dread that word! Or something about T1, OTF, TTF, etc. I do not understand these, either. Or sffamily, etc.? How do I correct this?

3

The package is not meant for xelatex. But you can load the font like this in xelatex:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Lato}

\begin{document}
Grüße an die Welt
\end{document}

enter image description here

| improve this answer | |
  • Perfect. And since it does not work as suggested by Andreas, will you please point me to some source that explains what is all this xelatex, T1, fontenc, etc. about? – deshmukh Oct 13 '17 at 7:10
  • Well as I'm doing fonts in latex for more than 20 years, my source is mostly in my head. I simply know how it works ;-). – Ulrike Fischer Oct 13 '17 at 9:30
0

Right, it's about fontencoding and T1. :-) That should work:

\documentclass{standalone}
\usepackage[default]{lato}
\usepackage[T1]{fontenc}
\begin{document}
Hello World
\end{document}
| improve this answer | |
  • T1-encoding is not suitable for xelatex. Try instead Hello World "Grüße an die Welt" and you will see why. – Ulrike Fischer Oct 13 '17 at 7:01

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.