# “microtype Warning: Unknown slot number of character” with Lato font

LuaLaTeX from MacTeX 2017 (TeX Live 2017) is giving me a bunch of microtype warnings on this MWE using the Lato font:

\documentclass{article}

\usepackage{fontspec}
\usepackage{microtype}

\setmainfont{Lato}

\begin{document}

Foo

\end{document}


The output from lualatex mwe.tex has a bunch of warnings such as:

Package microtype Warning: Unknown slot number of character
(microtype)                \u A'
(microtype)                in font encoding TU' in inheritance list
(microtype)                microtype.cfg/375(protrusion)'.


I never got these warnings with MacTeX 2016. I have read many TeX.se answers, most notably the question where it is suggested that microtype 2.7 will fix this problem, but I have updated MacTeX, including microtype 2.7, and I am still getting these warnings.

How should I get rid of these warnings?

Thanks!

• I can confirm that I get the same with an up to date tl2017 – David Carlisle Jul 15 '17 at 20:55
• The Lato Font doesn't have the characters listed in the warnings, for instance \H u and \r u, just to mention two. This seems the source for the issue (I'm not saying it isn't an issue). – egreg Jul 15 '17 at 21:03
• @egreg I suspect the the issue is that the TU setup now detects that and so makes \r{u} use the trailing combining ring accent character rather than the declared slot, but not sure what microtype is supposed to do to detect that. – David Carlisle Jul 15 '17 at 21:10
• @DavidCarlisle The Lato font doesn't have the combining ring accent either (nor the other combining accents); this is possibly the problem. – egreg Jul 15 '17 at 21:14

As @egreg and @David have said, the Lato font doesn't include these characters, so you get the warnings because microtype loads the default inheritance list from microtype.cfg.

While David's solution surely rids you of the warnings, the proper(TM) way would be to declare a character inheritance list for the font. You can put the following in your preamble or in a file called mt-Lato.cfg, which would then be loaded automatically:

\DeclareCharacterInheritance
{ encoding = {TU,EU1,EU2},
family   = {Lato} }
{ A = {\A,\'A,\^A,\~A,\"A,\r A,\k A},
a = {\a,\'a,\^a,\~a,\"a,\r a,\k a},
C = {\'C,\c C},
c = {\'c,\c c},
D = {\DH},
d = {\dj},
E = {\E,\'E,\^E,\"E,\k E},
e = {\e,\'e,\^e,\"e,\k e},
I = {\I,\'I,\^I,\"I},
i = {\i,\'i,\^i,\"i,\i},
L = {\L},
l = {\l},
N = {\'N,\~N},
n = {\'n,\~n},
O = {\O,\O,\'O,\^O,\~O,\"O},
o = {\o,\o,\'o,\^o,\~o,\"o},
S = {\'S,\v S},
s = {\'s,\v s},
U = {\U,\'U,\^U,\"U},
u = {\u,\'u,\^u,\"u},
Y = {\'Y,\"Y},
y = {\'y,\"y},
Z = {\'Z,\.Z,\v Z},
z = {\'z,\.z,\v z}
}

• That does the trick, thank you much! Would I be correct in saying that I could have arrived at this command by copying the \DeclareCharacterInheritance from microtype.cfg that includes TU encoding, adding family = {Lato}, and then simply removing all of the characters not present in Lato? (To get rid of warnings, at least. I recognize that additional fonts might want some things added to their configuration, not just removed.) Also, are you the Robert that currently maintains microtype? – dsedivec Jul 16 '17 at 18:56
• @dsedivec That's exactly what I did, and yes. – Robert Jul 17 '17 at 0:05

If you literally just want to get rid of the warning you can do

\documentclass{article}

\usepackage{fontspec}
\usepackage{microtype}

\setmainfont{Lato}

\makeatletter
\def\MT@warn@unknown{}
\makeatother

\begin{document}

\r{u}

Foo

\end{document}


This however doesn't address the underlying issue that the font doesn't have these accents or pre-composed accented characters. However if your document doesn't use those characters that probably isn't a problem.

• Heh! Thanks. For a somewhat more broad impact I can also load microtype with verbose=silent, I guess. I think I was more concerned with fixing the underlying issue. I'm not real familiar with TeX development, and I didn't see any mention of bug report process or mailing lists in the microtype documentation. Maybe I should e-mail this to the author? – dsedivec Jul 15 '17 at 21:39
• @dsedivec probably you should report it yes although apart from just not warning in this case there isn't a lot microtype can do. \r{u} just makes a u` as the font doesn't have a ring accent, so given that the character can't be typeset at all microtype hasn't got a chance to fine-tune its setting. – David Carlisle Jul 15 '17 at 21:41