I use ltxdoc and want to have a different font for the macro code. Inspired by
Change macrocode environment colour when documenting package with ltxdoc
I tried the suggestion given there
\AtBeginEnvironment{macrocode}{Xx\huge\bfseries Yy}
Now the Yy is in huge/bold, but the rest of the macros is not. Any hint to what I should do?

\MacroFontto be whatever font you want, I think. – David Carlisle Jan 25 '18 at 21:35