伊藤直史さま@群馬大学よりいただいたパッチです。 VFlib-2.22-PL8 に当ててお使い下さい。 VFlib-2.22 では、TrueType フォントの「複合グリフ」形式のデータには 対応していません。しかし msgothic.ttc は「複合グリフ」を使っており、 VFlib では取り扱えません。 複合グリフの完全なサポートではなく、一 部分だけのサポートですが、 msgothic.ttc がとりあえず使えるようにな ります。 (角川) *** VF_TT.c.OLD Fri May 30 18:55:28 1997 --- VF_TT.c Fri May 30 20:20:21 1997 *************** *** 686,692 **** int i, j, UPE; short cp; FILE *fp; ! code_offset = jis2c(code); if ((code < 0x2122) || (0x7424 < code)){ return NULL; --- 686,694 ---- int i, j, UPE; short cp; FILE *fp; ! short flags, glyphIndex; ! unsigned long glyph_offset; ! code_offset = jis2c(code); if ((code < 0x2122) || (0x7424 < code)){ return NULL; *************** *** 700,705 **** --- 702,719 ---- fp = VFFM_FStream(fobj->Fd1); UPE = fobj->ReadHeader.unitsPerEm; ttfont.num_cts = TTread_short(fp); /* number of contours */ + if (ttfont.num_cts < 0) { + fseek(fp, 8, 1); /* ignore 8 bytes */ + flags = TTread_short(fp); + if (flags != 6) + return NULL; + glyphIndex = TTread_short(fp); + fseek(fp, fobj->ReadHeader.IndexBase + glyphIndex * 4L, 0); + glyph_offset = TTread_long(fp); + /* seek to glyph data */ + fseek(fp, fobj->ReadHeader.GlyphBase + glyph_offset, 0); + ttfont.num_cts = TTread_short(fp); /* number of contours */ + } if (ttfont.num_cts > fobj->ReadHeader.maxContours) return NULL; /* error check */ fseek(fp, 8, 1); /* ignore 8 bytes */