[XeTeX] ERROR Invalid glyph index (gid 2448)

Pander pander at users.sourceforge.net
Wed Oct 27 16:14:27 CEST 2010


On Wed, October 27, 2010 02:03, Khaled Hosny wrote:
> 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).

Ubuntu Maverick installation provided me /again/ with ttf-freefonts and
that was the cause of the ambiguous situation. After doing a sudo rm -f
/usr/share/fonts/truetype/freefont/* all is sane again.

It inspired me to report these:
https://bugs.launchpad.net/ubuntu/+source/ttf-freefont/+bug/667242
https://bugs.launchpad.net/ubuntu/+source/ttf-freefont/+bug/667240

Feel free to login to in on launchpad and select "Yes, it affects me" ;)

While you are at it, little bit (un)related, also vote for:
https://bugs.launchpad.net/ubuntu/+source/fontforge/+bug/627537

Thanks,

Pander

> Regards,
>  Khaled
>
> --
>  Khaled Hosny
>  Arabic localiser and member of Arabeyes.org team
>  Free font developer
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>   http://tug.org/mailman/listinfo/xetex
>




More information about the XeTeX mailing list