I'd like to change the format for \subsection{} without using special packages. On report.cls we find its definition
\newcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\large\bfseries}}
But I'd like to use different fonts for the counter and for the title.
For example, for the \section{} command I'm using
{\fontsectionnumber{\color{black!50}\thesection.}\hspace{.5em}{\fontsection\MakeUppercase{#1}}}
How to do the same for \subsection?
Edit: here is the adapted code for \section{}.
\newcommand\section{\global\@topnum\z@
\@afterindenttrue
\secdef\@section\@ssection}
\def\@section[#1]#2{\ifnum \c@secnumdepth >\z@
\if@mainmatter
\refstepcounter{section}%
\typeout{\thesection}%
\addcontentsline{toc}{section}%
{\protect{\color{black!30} %
{\fontsectionnumbertoc\numberline{\thesection.}}} {\normalfont #1} \hspace{1em} %
{\fontheadernumber\thepage}\hfil}%
\else
\addcontentsline{toc}{section}{#1}%
\fi
\else
\addcontentsline{toc}{section}{#1}%
\fi
\sectionmark{#1}%
\addtocontents{lof}{\protect\addvspace{10\p@}}%
\addtocontents{lot}{\protect\addvspace{10\p@}}%
% \if@twocolumn
% \@topnewpage[\@makechapterhead{#2}]%
% \else
\@makesectionhead{#2}%
\@afterheading
}
\def\@makesectionhead#1{%
\vskip 5mm
{\parindent \z@ \raggedright
\ifnum \c@secnumdepth >\m@ne
%\if@mainmatter
{\fontsectionnumber{\color{black!50}\thesection.}\hspace{.5em}{\fontsection\MakeUppercase{#1}}}
%\newline\nobreak
% \vskip 0\p@
%\fi
\fi
\interlinepenalty\@M
% \large\MakeUppercase{#1} \par\nobreak
\vskip 2mm %2.3ex \@plus.2ex
}}


\fontsectionnumberand\fontsection? – Werner Jan 29 at 18:42\def\fontsectionnumber{\fontsize{9}{16}\usefont{LY1}{SyntaxStd-TLF}{a}{n}} \def\fontsection{\fontsize{9}{16}\usefont{LY1}{SyntaxStd-TLF}{m}{n}}– Sigur Jan 29 at 18:44\@startsectioncontains the definition of the headers. If you want to provide your own definition you have to use\secdeffor\subsection, too. – Marco Daniel Mar 17 at 9:31