[XeTeX] ERROR Invalid glyph index (gid 2448)

Khaled Hosny khaledhosny at eglug.org
Wed Oct 27 02:03:46 CEST 2010


On Tue, Oct 26, 2010 at 06:57:00PM +0200, Pander wrote:
> On Tue, October 26, 2010 16:22, Pander wrote:
> > Hi all,
> >
> > I'm trying to pin down the following error in XeLaTeX with fontspec:
> >
> >
> > ** ERROR ** Invalid glyph index (gid 2448)
> >
> > Output file removed.
> >
> >
> > Is it possible to have more information printed to command line and log
> > file for where this error originates?
> 
> It would be nice to also print the name of the font so the searching is
> easier.

Try --output-driver="xdvipdfmx -v" (or -vv, -vvv) to get more verbose
output.

> Looking the glyph id up with fontforge was not possible. I ended up
> somewhere in Bengali glyphs... Perhaps this glyph id is not the same as
> the id on fontforge?
> 
> Meanwhile I have managed to pin it down to FreeSerifBoldItalic. According
> to the output of ttx on FreeSerif regular, bold, italic and bold italic,
> all four support these ligatures:
> 
>         <LigatureSubst index="0" Format="1">
>           <LigatureSet glyph="f">
>             <Ligature components="f,l" glyph="ffl"/>
>             <Ligature components="f,i" glyph="ffi"/>
>             <Ligature components="l" glyph="fl"/>
>             <Ligature components="i" glyph="fi"/>
>             <Ligature components="f" glyph="ff"/>
>           </LigatureSet>
>         </LigatureSubst>
> 
> However, bold italic does not. This can be verified with:
> 
> \documentclass{article}
> \usepackage{xltxtra}
> \begin{document}
> \fontspec{FreeSerif}\addfontfeatures{Ligatures=Common}
> ff ffi ffl fi fl IJ ij\\
> {\bfseries ff ffi ffl fi fl IJ ij}\\
> {\bfseries\itshape
> %ff ffi ffl fi fl
> IJ ij}\\
> {\itshape ff ffi ffl fi fl IJ ij}
> \end{document}
> 
> The line with the % is cause the troubles.

Just make sure you have only one version of the font that xetex can find
(for example, you might have a distribution supplied version and texlive
supplied one). Lack of ligatures in the font should not be a problem in
itself and is unlikely to cause such issue (unless the font is seriously
broken to reference non-existent glyph ids, but even though I think it
would have been caught early on by ICU or something).

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer


More information about the XeTeX mailing list