名前: 角藤 日時: 2002-06-20 22:31:02 IPアドレス: 203.165.2.*
>>9000 こちらで正常に動いている、tfmload.c の最後の方を 以下に示しました。 flags2 のあるところ (3 箇所) を比べてみて下さい: int tfmload P1C(register fontdesctype *, curfnt) { register shalfword i ; register integer li ; integer scaledsize ; shalfword id, nt, lf ; shalfword nw, hd ; shalfword bc, ec ; integer scaled[256] ; halfword chardat[256] ; halfword *index, *chartype ; int charcount = 0 ; tfmopen(curfnt) ; /* * Next, we read the font data from the tfm file, and store it in * our own arrays. */ id = tfm16() ; if (id == 9 || id == 11) { if (id == 9) curfnt->dir = id ; else curfnt->dir = 0 ; nt = tfm16() ; lf = tfm16() ; curfnt->chardesc = (chardesctype *)realloc(curfnt->chardesc, sizeof(chardesctype)*(94*MAXKU)) ; for (i=256; i<94*MAXKU; i++) { curfnt->chardesc[i].TFMwidth = 0 ; curfnt->chardesc[i].packptr = NULL ; curfnt->chardesc[i].pixelwidth = 0 ; curfnt->chardesc[i].flags = 0 ; } } else {curfnt->dir = 0 ; } hd = tfm16() ; bc = tfm16() ; ec = tfm16() ; nw = tfm16() ; li = tfm32() ; li = tfm32() ; li = tfm32() ; li = tfm16() ; li = tfm32() ; check_checksum (li, curfnt->checksum, curfnt->name); li = (integer)(alpha * (real)tfm32()) ; if (li > curfnt->designsize + fsizetol || li < curfnt->designsize - fsizetol) { (void)sprintf(errbuf,"Design size mismatch in %s", curfnt->name) ; error(errbuf) ; } for (i=2; i<hd; i++) li = tfm32() ; if (id == 9 || id == 11) { index = (halfword *)malloc(nt * sizeof(halfword)) ; chartype = (halfword *)malloc(nt * sizeof(halfword)) ; li = tfm16() ; li = tfm16() ; for (i=1; i<nt; i++) { li = tfm16() ; index[i] = ((li>>8)-0x21)*94 + (li&0xff)-0x21 ; chartype[i] = tfm16() ; } } for (i=0; i<256; i++) chardat[i] = 256 ; for (i=bc; i<=ec; i++) { chardat[i] = tfmbyte() ; li = tfm16() ; li |= tfmbyte() ; if (li || chardat[i]) charcount++ ; } scaledsize = curfnt->scaledsize ; for (i=0; i<nw; i++) scaled[i] = scalewidth(tfm32(), scaledsize) ; (void)fclose(tfmfile) ; if (id == 9 || id == 11) { for (i=0; i<94*MAXKU; i++) { li = scaled[chardat[0]] ; curfnt->chardesc[i].TFMwidth = li ; if (li >= 0) curfnt->chardesc[i].pixelwidth = ((integer)(conv*li+0.5)) ; else curfnt->chardesc[i].pixelwidth = -((integer)(conv*-li+0.5)) ; curfnt->chardesc[i].flags = (curfnt->resfont ? EXISTS : 0) ; curfnt->chardesc[i].flags2 = EXISTS ; } for (i=1; i<nt; i++) { li = scaled[chardat[chartype[i]]] ; curfnt->chardesc[index[i]].TFMwidth = li ; if (li >= 0) curfnt->chardesc[index[i]].pixelwidth = ((integer)(conv*li+0.5)) ; else curfnt->chardesc[index[i]].pixelwidth = -((integer)(conv*-li+0.5)) ; curfnt->chardesc[index[i]].flags = (curfnt->resfont ? EXISTS : 0) ; curfnt->chardesc[index[i]].flags2 = EXISTS ; } } else for (i=0; i<256; i++) if (chardat[i]!= 256) { li = scaled[chardat[i]] ; curfnt->chardesc[i].TFMwidth = li ; if (li >= 0) curfnt->chardesc[i].pixelwidth = ((integer)(conv*li+0.5)) ; else curfnt->chardesc[i].pixelwidth = -((integer)(conv*-li+0.5)) ; curfnt->chardesc[i].flags = (curfnt->resfont ? EXISTS : 0) ; curfnt->chardesc[i].flags2 = EXISTS ; } curfnt->loaded = 1 ; return charcount ; }
この書き込みへの返事: