[Tex/LaTex] Parameter to the acronym environment changes the font of the acronym column

acronymsfonts

If I add a parameter to the acronym environment in order to set the width of the acronym column, the font of the text in the acronym column automatically changes. How can I prevent (or at least control) that? Below is a MWE with a parameter [PdL] loaded:

\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
\usepackage[babel]{csquotes}

\usepackage{acronym}

\begin{document}
\begin{acronym}[PdL]
    \acro{PD}{Democratic Party (\textit{Partito Democratico})}
    \acro{PdL}{The People of Freedom (\textit{Il Popolo della Libertà})}
\end{acronym}
\end{document}

Parameter loaded

And below is the output of the same example, but without the parameter [PdL] loaded:

No parameter loaded

Best Answer

It seems to be a precise choice by the package author. If no optional argument to acronym is specified, the list is typeset as a plain description environment. Otherwise the optional argument sets the label width and \bflabel is used to typeset the acronym.

Of course \bflabel can be redefined in the preamble; the default definition is

\def\bflabel#1{{\textbf{\textsf{#1}}\hfill}}

However the implementation is not well done, as the width is set using

\settowidth{\labelwidth}{\textbf{\textsf{#1}}}

anyway, instead of the correct

\settowidth{\labelwidth}{\bflabel{#1}}

A "more correct" implementation that uses \bflabel also without an optional argument is here:

\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
\usepackage[babel]{csquotes}

\usepackage{acronym}
\makeatletter
\renewenvironment{AC@deflist}[1]%
  {\ifAC@nolist
   \else
     \raggedright
   \begin{list}{}{\settowidth{\labelwidth}{\bflabel{#1}}%
                  \setlength{\leftmargin}{\labelwidth}%
                  \addtolength{\leftmargin}{\labelsep}%
                  \let\makelabel\bflabel}%
   \fi}
  {\ifAC@nolist
   \else
     \end{list}%
   \fi}
\renewenvironment{acronym}[1][1]
  {%
   \providecommand*{\acro}{\AC@acro}%
   \providecommand*{\acroplural}{\AC@acroplural}%
   \long\def\acroextra##1{##1}%
   \def\@tempa{1}\def\@tempb{#1}%
   \ifx\@tempa\@tempb
     \global\expandafter\let\csname ac@des@mark\endcsname\AC@used
     \ifAC@nolist
     \else
       \begin{description}\let\makelabel\bflabel
     \fi
   \else
     \begin{AC@deflist}{#1}%
   \fi
  }
  {%
   \ifx\AC@populated\AC@used
   \else
     \ifAC@nolist
      \else
        \item[]\relax%
     \fi
   \fi
   \expandafter\ifx\csname ac@des@mark\endcsname\AC@used
     \ifAC@nolist
     \else
       \end{description}%
      \fi
   \else
      \end{AC@deflist}%
   \fi}
\makeatother

% Provide here a new definition for \bflabel if desired
%\def\bflabel#1{{\textbf{\textsf{#1}}\hfill}}


\begin{document}
\begin{acronym}[PdL]
    \acro{PD}{Democratic Party (\textit{Partito Democratico})}
    \acro{PdL}{The People of Freedom (\textit{Il Popolo della Libertà})}
\end{acronym}
\end{document}