[XeTeX] CID-keyed font support?

Jiang Jiang gzjjgod at gmail.com
Mon Jul 28 20:47:44 CEST 2014


On Mon, Jul 28, 2014 at 6:28 PM, Khaled Hosny <khaledhosny at eglug.org> wrote:
> On Mon, Jul 28, 2014 at 05:45:38PM +0900, Akira Kakuto wrote:
>> Hi Khaled,
>>
>> >This is a development tree after all, so bugs are to be expected. Lets
>> >debug those issues first then decide what we want to do.
>>
>> OK, agreed. Thank you very much.
>
> The /rsrc warning seems harmless, but I'm still investigating what is
> causing it. The CMap issue should be fixed now.

It's because when xdvipdfmx is trying to load an non-CID OpenType
font, CIDFont_cache_find() will first attempt to load such font as a
Type2 font, which will trigger such a OS X resource fork access,
previously we had sfnt_open to replace that for XETEX:

-#ifdef XETEX
- sfont = sfnt_open(font->ft_face, SFNT_TYPE_TTC | SFNT_TYPE_TRUETYPE);
-#else
fp = DPXFOPEN(font->ident, DPX_RES_TYPE_TTFONT);
if (!fp) {
fp = DPXFOPEN(font->ident, DPX_RES_TYPE_DFONT);
@@ -553,7 +550,6 @@ CIDFont_type2_dofont (CIDFont *font)
} else {
sfont = sfnt_open(fp);
}
-#endif

The backtrace is as follow:

  * frame #0: 0x000000010009c87b
xdvipdfmx`qcheck_filetype(fqpn=0x000000010072f440,
type=DPX_RES_TYPE_DFONT) + 59 at dpxfile.c:1170
    frame #1: 0x000000010009c827
xdvipdfmx`dpx_find_dfont_file(filename=<unavailable>) + 151 at
dpxfile.c:764
    frame #2: 0x000000010009c065
xdvipdfmx`dpx_open_file(filename=<unavailable>, type=<unavailable>) +
229 at dpxfile.c:446
    frame #3: 0x0000000100098d6d
xdvipdfmx`CIDFont_type2_open(font=0x000000010072e980,
name=0x000000010072eb10, cmap_csi=0x0000000000000000,
opt=0x000000010072e950) + 93 at cidtype2.c:943
    frame #4: 0x00000001000928a3
xdvipdfmx`CIDFont_cache_find(map_name=0x000000010072eb10,
cmap_csi=0x0000000000000000, fmap_opt=0x000000010072ea48) + 1667 at
cid.c:633
    frame #5: 0x00000001000d37fc
xdvipdfmx`Type0Font_cache_find(map_name=0x000000010072eb10,
cmap_id=<unavailable>, fmap_opt=0x000000010072ea48) + 108 at
type0.c:421
    frame #6: 0x00000001000ab1af
xdvipdfmx`pdf_font_findresource(tex_name=0x000000010072ced0,
font_scale=<unavailable>, mrec=0x000000010072ea20) + 479 at
pdffont.c:659
    frame #7: 0x00000001000169b0
xdvipdfmx`pdf_dev_locate_font(font_name=0x000000010072ced0,
ptsize=1132462) + 592 at pdfdev.c:1504
    frame #8: 0x0000000100009001 xdvipdfmx`do_fnt [inlined]
dvi_locate_native_font(ps_name=<unavailable>, ptsize=1132462,
layout_dir=<unavailable>, extend=<unavailable>, slant=<unavailable>,
embolden=<unavailable>) + 314 at dvi.c:1062
    frame #9: 0x0000000100008ec7
xdvipdfmx`do_fnt(tex_id=<unavailable>) + 167 at dvi.c:1784
    frame #10: 0x00000001000065ec
xdvipdfmx`dvi_do_page(n=<unavailable>, paper_width=<unavailable>,
paper_height=<unavailable>, hmargin=<unavailable>,
vmargin=<unavailable>) + 140 at dvi.c:2243
    frame #11: 0x000000010000d1c2 xdvipdfmx`main [inlined]
do_dvi_pages + 881 at dvipdfmx.c:816
    frame #12: 0x000000010000ce51 xdvipdfmx`main(argc=<unavailable>,
argv=<unavailable>) + 2065 at dvipdfmx.c:1064

r34758 should fix this.

- Jiang



More information about the XeTeX mailing list