I want to override the look of the letter I in mathsf's font as it looks like a vertical bar and the letter l. By default, it looks like the following:
My goal is to have look like that:
How can I change this single letter in mathsf's font only?
I have looked at How do I change the font of a letter and Changing one letter changes that letter throughout a paper but they didn't help me very much. I even used Detexify but it didn't help either.
Edit:
With the help of @David Carlisle's answer, I came up with a semi-solution by declaring a new command called \I and assigned it the following:
\newcommand{\I}{{\fontfamily{lcmss}\selectfont\ensuremath{\mathrm{I}}}}
So that $\I$, \I gives:




\DeclareSymbolFontand then you can use\DeclareMathSymbol(see https://tex.stackexchange.com/a/2972/117050 for a rough idea). – Skillmon Jan 09 '20 at 21:14arevmath? It's a package that defines an sans-serif math alphabet with unambiguous letters. Maybe you want to ditchsfmathand usearevmathinstead. Or do you need a very specific font? – Skillmon Jan 09 '20 at 21:25