If I use the Libertine fonts from within XeLaTeX I can specify the use of proportional numbers/figures by including it as an option when I set the main font like so:
\setmainfont[Numbers={Lining,Proportional}]{Linux Libertine O}
However, I'm also interested in being able to using proportional numbers when using pdfLaTeX. Below is a MWE that shows one way to do this. My "solution" seems awfully ugly though. Is there a better way to accomplish this?
\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage{libertine}
\begin{document}
% this seems necessary to get proportional numbers in Libertine
% when using pdflatex. Comment / uncomment to see the difference
\usefont{T1}{fxlf}{m}{n}\selectfont
I would like the following numbers to be proportional so that 11,
doesn't take up as much space as 17. See what I mean?
\end{document}