[XeTeX] Fwd: [tex-live] XeTeX or xdvipdfmx Broken on Mac

Jiang Jiang gzjjgod at gmail.com
Tue Apr 28 19:34:58 CEST 2015

On Mon, Apr 27, 2015 at 8:14 AM, Jiang Jiang <gzjjgod at gmail.com> wrote:
> Hi Simon,
> On Mon, Apr 27, 2015 at 5:57 AM, Simon Cozens <simon at simon-cozens.org> wrote:
>> On 26/04/2015 23:18, Zdenek Wagner wrote:
>>> I pushed a fix in r37053, both ITF Devanagari and Kohinoor Devanagari
>>> works for me now.
>> I'm still seeing problems with Kohinoor Devanagari, even after the two
>> recent commits.
>> The problem I'm getting is that I'm looking for Kohinoor Devangari
>> Light, which is index 4 in the cabinet.
>> At cidtype0.c:746, offset is 924, so cidtype0 calls cff_open(stream,
>> 924, 4).
>> However, after reading the index of the TTC with "idx =
>> cff_get_index(cff)", (cff.c:105) idx->count is 1. This can't be right,
>> as there are definitely 4 fonts in the cabinet. We try to access index
>> n=4, and that's higher than idx->count so dvipdfmx blows up.
>> What I guess is happening is that, having gone to the right offset, you
>> are now looking at a font (Kohinoor Devangari Light) within the cabinet.
>> From the point of view of that font, there are no subfonts, so index 4
>> is meaningless, and perhaps instead you should be calling
>> cff_open(stream, offset, 1). (This is only a guess.)
>> There is something else which looks suspicious as well - in
>> CIDFont_type0_dofont we now have the code:
>>   if (sfont->type == SFNT_TYPE_TTC)
>>     offset = ttc_read_offset(sfont, CIDFont_get_opt_index(font));
>>   if ((sfont->type != SFNT_TYPE_TTC && sfont->type !=
>>       sfnt_read_table_directory(sfont, offset) < 0)
>>     ERROR("Not a CFF/OpenType font (1)?");
>>   offset = sfnt_find_table_pos(sfont, "CFF ");
>> So offset is being read by ttc_read_offset for TTC fonts, and then it is
>> being unconditionally reassigned by snft_find_table_pos. That might be
>> right, but it's different to how the font is being loaded in
>> CIDFont_type0_open.
> I think you are right, I have only managed to get the font with index
> = 0 working, rest of them is still broken, I noticed that yesterday
> but it was too late to continue, please stay tuned as I will
> investigate further.

I just pushed a fix (r37097) that's supposed to fix the issue for
fonts like Kohinoor Devanagari Light and HanziPen TC, which according
to my limited testing seems to work. Please give it another try and
let me know if you notice any regressions.

- Jiang

More information about the XeTeX mailing list