xelatex produces off-by-one error in listings package

Bug #1521047 reported by Bob Plantz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
texlive-base (Ubuntu)
New
Undecided
Unassigned

Bug Description

The following LaTeX code produces good PDF with pdflatex, but the \lstinline adds one to each character (e.g., "abc" -> "bcd") with the \listingsfont from the listings package.

\documentclass{article}
\usepackage{bera}
\usepackage{listings}
\usepackage{ifxetex}
\ifxetex
   \usepackage{fontspec}\newfontface\listingsfont[Path]{fvmr8a.pfb}
   \newfontface\listingsboldfont[Path]{fvmb8a.pfb}
\else
   \edef\oldtt{\ttdefault}\usepackage[scaled]{beramono}\usepackage[T1]{fontenc}
   \renewcommand*\ttdefault{\oldtt}\newcommand{\listingsfont}{\fontfamily{fvm}\selectfont}
   \renewcommand*\ttdefault{\oldtt}\newcommand{\listingsboldfont}{\fontfamily{fvm}\selectfont}
\fi
\lstset{basicstyle=\listingsfont}
\begin{document}
An example that uses the listingfont to render ``int hms 0123'': \lstinline?int hms 0123?

Now for a program not using the listingfont:
\begin{lstlisting}[language=C]
#include <stdio.h>

int main(void)
{
    printf("Hello world.\n");
    return 0;
}
\end{lstlisting}
\end{document}

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: texlive-latex-recommended 2015.20150625-1ubuntu1
ProcVersionSignature: Ubuntu 4.2.0-19.23-generic 4.2.6
Uname: Linux 4.2.0-19-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
CurrentDesktop: Unity
Date: Sun Nov 29 20:04:29 2015
InstallationDate: Installed on 2015-04-24 (220 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_US
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: texlive-base
UpgradeStatus: Upgraded to wily on 2015-10-23 (37 days ago)

Revision history for this message
Bob Plantz (plantz-g) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.