[XeTeX] possible bug in xdvipdfmx

Ralf Stubner ralf.stubner at physik.uni-erlangen.de
Sun Jun 18 13:24:17 CEST 2006


Jonathan Kew <jonathan_kew at sil.org> writes:

> I've checked-in a modification to xdvipdfmx that is supposed to fix  
> this, so that it doesn't create multiple PDF resources for the same  
> TT font at different sizes any more.
>
> I'd consider this an experimental modification, but it seems to work  
> well in simple tests, at least. Feel free to check out the latest rev  
> and give it a try.

Thanks. This seems to solve both the multiple embedding and the 'copy &
paste' issue. Actually I had also looked into this yesterday afternoon,
but starting from the other side, ie, I wondered why OT-TT and OT-PS
fonts are treated differently, as one can see when calling xdvipdfmx
with option '-v'. OT-TT fonts are opened several times, but thanks to
your chages only one resource is created in the PDF file. OT-PS are
opened only once, though. Looking for the reason for this I started in
pdffont.c and came to: 

,----[ cid.c, line 588ff ]
| /*
|  * Case 1: CSI not available (Identity CMap)
|  *         Font is TrueType --> continue
|  *         Font is CIDFont  --> break
|  * Case 2: CSI matched      --> break
|  */
| if (!opt->csi) {
|   if (font->subtype == CIDFONT_TYPE2)
|     continue;
|   else
|     break;
| }
`----

When I simply change this 'continue' into 'break', OT-TT and OT-PS fonts
are treated on the same footing. And I haven't seen any problems due to
this. I expect, however, that there is a reason to treat CIDFontType0
and CIDFontType2 differently, so that my 'hack' would produce errors
under certain circumstances.

cheerio
ralf



More information about the XeTeX mailing list