Why can't I access alternate glyphs in Linux Libertine when using fontspec?

When I try to build Dario Taraborelli's CV example using fontspec font designations and Linux Libertine O, the ampersand glyph breaks. Here is the MWE:

%------------------------------------
% Dario Taraborelli
%
% URL: http://nitens.org/taraborelli/cvtex
% DISCLAIMER: This template is provided for free and without any guarantee
% that it will correctly compile on your system if you have a non-standard
% configuration.
%------------------------------------

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[10pt, a4paper]{article}
%\documentclass[10pt, a4paper]{scrartcl}

% DOCUMENT LAYOUT
\usepackage{geometry}
\geometry{a4paper, textwidth=5.5in, textheight=8.5in, marginparsep=7pt, marginparwidth=.6in}
\setlength\parindent{0in}

% FONTS
\usepackage[usenames,dvipsnames]{color}
\usepackage{xunicode}
\usepackage{xltxtra}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont [Ligatures={Common}, Numbers={OldStyle}, Variant=01]{Linux Libertine O}
\setmonofont[Scale=1]{Inconsolata}

% ---- CUSTOM COMMANDS
\chardef\&="E050
\newcommand{\html}[1]{\href{#1}{\scriptsize\textsc{[html]}}}
\newcommand{\pdf}[1]{\href{#1}{\scriptsize\textsc{[pdf]}}}
\newcommand{\doi}[1]{\href{#1}{\scriptsize\textsc{[doi]}}}
% ---- MARGIN YEARS
\usepackage{marginnote}
\newcommand{\amper{}}{\chardef\amper="E0BD }
\newcommand{\years}[1]{\marginnote{\scriptsize #1}}
\renewcommand*{\raggedleftmarginnote}{}
\setlength{\marginparsep}{7pt}
\reversemarginpar

\usepackage{sectsty}
\usepackage[normalem]{ulem}
\sectionfont{\mdseries\upshape\Large}
\subsectionfont{\mdseries\scshape\normalsize}
\subsubsectionfont{\mdseries\upshape\large}

% PDF SETUP
% ---- FILL IN HERE THE DOC TITLE AND AUTHOR
%% ---- FILL IN HERE THE TITLE AND AUTHOR
%   pdftitle={Albert Einstein - vita},
%   pdfauthor={My name},
%   pdfproducer={http://nitens.org/taraborelli/cvtex}
%]{hyperref}
% ---- FILL IN HERE THE TITLE AND AUTHOR
pdftitle={Albert Einstein - vita},
pdfauthor={My name},
pdfproducer={http://nitens.org/taraborelli/cvtex}
]{hyperref}

% DOCUMENT
\begin{document}

\section*{Grants, honors \& awards}
\noindent
\years{1921}Nobel Prize in Physics, Nobel Foundation

\section*{Publications \& talks}

\end{document}


On my system, the result looks like this:

Now, the obvious answer is that the font doesn't have the glyph, but it should be the same font! If I use \usepackage{libertineotf}, it works, but I would like to use Xelatex for this instead.

-
What happens if you comment out the instruction \chardef\&="E050, and simplify the \amper macro to \newcommand\amper{\&}? – Mico Oct 29 '12 at 7:53
@Mico: It works this way, but doesn't display the expected glyph. – Stephen Bosch Oct 29 '12 at 9:13
Also have a look at this answer her. You can load alternative glyphs by default in fontspec. tex.stackexchange.com/a/58185/11984 – Jörg Oct 29 '12 at 9:23

use it this way:

\documentclass{article}
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont [Ligatures={Common}, Numbers={OldStyle}, Variant=01,
Extension=.otf]{LinLibertine_R}
\setmonofont[Scale=1]{Inconsolata}

\chardef\&="E050
\begin{document}

\section*{Grants, honors \& awards}
Nobel Prize in Physics, Nobel Foundation

\section*{Publications \& talks}

\end{document}


and as Ulrike already pointed out, use package fontspec instead of the other two

-
Don't load xunicode before fontspec or xltxtra! – Ulrike Fischer Oct 29 '12 at 10:27

Your example is not a MWE. It contains lot of irrelevant stuff. This here works fine for me:

\documentclass{article}
\usepackage{fontspec}
\setmainfont[Ligatures={Common}, Numbers={OldStyle}, Variant=01]{Linux Libertine O}
\chardef\&="E050
\begin{document}
Grants, honors \& awards
^^^^e050, \char"E050
\end{document}


I don't understand why you don't want to use libertineotf (which is meant to be used with xelatex), but if it works with this package and not if you call the font yourself this probably means that you have more than one libertine version – libertineotf calls fonts by file names. Add \XeTeXtracingfonts=1 to your document and check the font pathes in the log file.

Btw: Don't load xunicode before fontspec. This will break the working of the package. In a modern system you don't need to load it at all, fontspec will do it.

-
I want to have a consistent interface to fonts and not rely on font-specific packages. – Stephen Bosch Oct 29 '12 at 9:08
Well then look in libertineotf how it loads the fonts and copy the commands. – Ulrike Fischer Oct 29 '12 at 10:27