[Tex/LaTex] Font change does not work

fonts

As the title says I wanted to change the font of my document with e.g.

\usepackage[T1]{fontenc}
\newcommand{\changefont}[3]{
\fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}
\changefont{phv}{b}{sl}

but it does not work. There is no change. The font stays the same. I tried different ones already.

Here is my code:

\documentclass{book}
\usepackage{geometry}
\geometry{left=4cm,right=3cm, top=2cm, bottom=2cm} 
\usepackage[pagestyles]{titlesec}
\titlespacing*{\chapter}{0pt}{-30pt}{20pt}
\titleformat{\chapter}[display]{\color{headercolor}\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}

\titleformat{\section}
{\color{headercolor}\normalfont\Large\bfseries}{\thesection}{1em}{}

\titleformat{\subsection}
{\color{headercolor}\normalfont\Large\bfseries}{\thesubsection}{1em}{}

\titleformat{\subsubsection}
{\color{headercolor}\normalfont\large\bfseries}{\thesubsubsection}{1em}{}

\titleformat{\paragraph}
{\color{headercolor}\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}

\usepackage[T1]{fontenc}
\newcommand{\changefont}[3]{
\fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}
\changefont{phv}{b}{sl}

\usepackage[ngerman]{babel}
\usepackage{mathptmx}
\usepackage{helvet}
\usepackage{wallpaper}
\usepackage{color}
\usepackage[final]{pdfpages} 
%,bookmarksopenlevel={1}
%\usepackage[hidelinks,bookmarks=true,bookmarksopen=true,bookmarksnumbered=true,colorlinks=true,linkcolor=black,]{hyperref}
\usepackage[hidelinks,bookmarksopen=false,
hypertexnames=TRUE,pdfpagelabels=true]{hyperref}[2011/02/05]%colorlinks,linkcolor=black,
\hypersetup{ 
  pdftitle={},
%  pdfauthor={},
  pdfsubject={satistics book}, 
  pdfkeywords={}, 
  }

\usepackage{xcolor,bookmark}
\usepackage{scrextend}
\usepackage{titlepic}
\usepackage{shorttoc}
\usepackage{courier}
\usepackage{type1cm}         
\usepackage{zref-abspage}
\usepackage{makeidx}        
\usepackage{graphicx}        
\usepackage{multicol}        
\usepackage[bottom]{footmisc}
\usepackage{tocstyle}
\usetocstyle{allwithdot} 
%\usepackage{thmbox}
\usepackage{shadethm}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{marginnote}
%\usetocstyle{KOMAlike}
\usepackage{wrapfig}
\usepackage{paralist}
\usepackage{amssymb}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{ulem}
\usepackage{fancyhdr}
%\usepackage{sectsty}
\usepackage{booktabs}
\makeindex           
\listfiles

\newmdenv[backgroundcolor=textbeispiel,linecolor=blue,roundcorner=10pt,outerlinewidth=1pt,skipbelow=2pt, skipabove=6pt]{myframedenv}%innerlinecolor=green,innerlinewidth=1pt,middlelinewidth=2pt,middlelinecolor=yellow

\newtheoremstyle{mystyle}
  {}{}{}{}%
  {\bfseries}{:}{.5em}{}%

\newtheoremstyle{mystyle2}
  {}{}{}{}%
  {\bfseries}{}{.5em}{}%

\theoremstyle{mystyle}

\newmdtheoremenv[hidealllines=true,backgroundcolor=shadethmcolor,skipabove=\topsep,
skipbelow=\topsep]{beispiel}{Beispiel}

\newmdtheoremenv[hidealllines=true,
backgroundcolor=shadethmcolor2,skipabove=0pt,
skipbelow=0pt]{formel}{Formel}


\theoremstyle{mystyle2}

\newmdtheoremenv[hidealllines=true,
backgroundcolor=aufgaben,skipabove=0pt,
skipbelow=0pt]{aufgabe}{Aufgabe}


\newmdtheoremenv[hidealllines=true,
backgroundcolor=loesung,skipabove=0pt,
skipbelow=0pt]{loesung}{L\"osung}

\definecolor{dunkelgruen}{rgb}{0.8,0.87843,0.8}
\definecolor{hellgruen}{rgb}{0.90196,0.941176,0.90196}
\definecolor{aufgaben}{rgb}{0.9333,0.93333,0.933333}
\definecolor{headercolor}{rgb}{0.6941,0.6745,0.4863}

\newpagestyle{mystyle}{
\headrule \sethead[\thepage][][\color{red} \chaptertitlename\ \thechapter. \chaptertitle]
{\color{red} \thesection\ \sectiontitle}{}{\thepage}}

\setlength{\headheight}{24pt}%

\begin{document}
\frontmatter

\setlength{\marginparwidth}{3cm}
\marginparsep = 0.4cm
\pagestyle{plain}
\pagenumbering{Roman}

\makeatletter
\let\stdl@part\l@part
\renewcommand*{\l@part}[2]{%
  \stdl@part{\textcolor{headercolor}{#1}}{\textcolor{headercolor}{#2}}}
\let\stdl@chapter\l@chapter
\renewcommand*{\l@chapter}[2]{%
  \stdl@chapter{\textcolor{headercolor}{#1}}{\textcolor{headercolor}{#2}}}
\makeatother

\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\shorttableofcontents{Inhalts\"ubersicht}{1}
\bookmark[page=15,rellevel=1,keeplevel,view={XYZ},color=red]{Inhalts\"ubersicht}
\bookmark[page=17,rellevel=1,keeplevel,view={XYZ},color=red]{Inhaltsverzeichnis}
\tableofcontents
\clearpage
\pagenumbering{arabic}  
%

%\pagestyle{mystyle}
\mainmatter%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{fancy}
\fancyhf{}
%\fancyhead[L]{\parbox{0.7\textwidth}{\textbf{ \textcolor{headercolor}\leftmark\textcolor{headercolor}{\rightmark}}}}
%\fancyhead[L]{ \textcolor{headercolor}{\rightmark}}%\thesection%\textcolor{headercolor}\text{ }\leftmark \text{ }


\fancyhead[L]{\hspace{2mm}\textcolor{headercolor}{\leftmark}\text{ }\textcolor{headercolor}{\rightmark}\hfill\textcolor{headercolor}{\thepage}\hspace{4mm}}
\renewcommand{\headrule}{\vspace{-\headheight}\textcolor{headercolor}{\vrule height \headheight width 2pt\relax\rule{\textwidth-8pt}{2pt}\vrule height \headheight width 2pt\relax}}

%\include{part1} 
%\include{chapter1}
%\include{chapter2}
%\include{part2}
%\include{chapter3}
%\include{chapter4}
%\include{chapter5}
%\include{chapter6}
\backmatter

\appendix 

\include{appendix}

\listoffigures
\newpage
\listoftables
\backmatter%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\include{glossary}
%\include{solutions}
\cleardoublepage
\phantomsection
\addcontentsline{toc}{part}{Index}
\printindex

\cleardoublepage
\phantomsection
\addcontentsline{toc}{part}{the author}
%\includepdf{author}
%\includepdf{back}
\end{document}

I have given you so much code, because I do not know where my mistake is?

Best Answer

If you want to typeset everything in Helvetica boldface slanted, then

\renewcommand{\rmdefault}{phv}
\renewcommand{\sfdefault}{phv}
\renewcommand{\mddefault}{b}
\renewcommand{\bfdefault}{b} % Helvetica has no bx series
\renewcommand{\updefault}{sl}

in your preamble will do. I don't think it's a good idea.