I am defining fall backs for missing glyphs in a font and I am partly building on @egreg's answer to this question.
Here's a MWE (never mind that the actual replacement defined here makes little sense):
\documentclass{article}
\usepackage{microtype}
\usepackage{fontspec}
\usepackage{newunicodechar}
\newfontfamily\pagella{TeX Gyre Pagella}[
Ligatures={TeX}]
\newunicodechar{Ḍ}{%
\pagella{Ḍ}%
}
\DeclareCharacterInheritance
{ encoding = {EU1,EU2,TU},
family = {LatinModernRoman} }
{ D = {Ḍ,\pagella{Ḍ}}}
\begin{document}
Ḍ
\end{document}
This works insofar as Pagella is used to print Ḍ, but I am unable to tell microtype that it should also apply the font settings Latin Modern for this character. Although I use \DeclareCharacterInheritance, I still get the following error message:
Package microtype Warning: Unknown slot number of character
(microtype) `Ḍ (= \pagella {Ḍ})'
(microtype) in font encoding `TU' in inheritance list
(microtype) `mt-LatinModernRoman.cfg/105(protrusion)'.
(I tried different variations of \DeclareCharacterInheritance, but none of them worked).