printf("%c",code);
}
if (jobs&FEDTJ_MODIFY)
- f->glyph[glyph].advance = adv;
+ f->glyph[glyph].advance = adv*20; //?
} else {
if (jobs&FEDTJ_PRINT) {
printf("?");
glyph = font->ascii2glyph[s[0]];
if(glyph>=0) {
g = swf_CountUBits(glyph,g);
- a = swf_CountBits((((U32)font->glyph[glyph].advance)*scale)/100,a);
+ a = swf_CountBits(((((U32)font->glyph[glyph].advance)*scale)/20)/100,a);
}
s++;
}
g = font->ascii2glyph[s[i]];
if(g>=0) {
swf_SetBits(t,g,gbits);
- swf_SetBits(t,(((U32)font->glyph[g].advance)*scale)/100,abits);
+ swf_SetBits(t,((((U32)font->glyph[g].advance)*scale)/20)/100,abits);
l++;
if(l==0x7f)
break;
if(*s < font->maxascii)
g = font->ascii2glyph[*s];
if(g>=0)
- res += font->glyph[g].advance;
+ res += font->glyph[g].advance/20;
s++;
}
if (scale) res = (res*scale)/100;
{
int g = font->ascii2glyph[s];
if(g>=0) {
- if(font->glyph[g].advance*textscale/64 > xmax) {
- xmax = font->glyph[g].advance*textscale/64;
+ if((font->glyph[g].advance*textscale/20)/64 > xmax) {
+ xmax = (font->glyph[g].advance*textscale/20)/64;
}
c++;
}
}
swf_SetU8(t,1);
swf_SetBits(t, g, gbits);
- swf_SetBits(t, font->glyph[g].advance, abits);
- lastx = x*xmax+font->glyph[g].advance;
+ swf_SetBits(t, font->glyph[g].advance/20, abits);
+ lastx = x*xmax+(font->glyph[g].advance/20);
swf_ResetWriteBits(t);
}
}
rn.ymin = (rn.ymin * scale)/100;
rn.ymax = (rn.ymax * scale)/100;
swf_ExpandRect2(&r, &rn);
- pos += (font->glyph[g].advance*scale*20)/100;
+ pos += (font->glyph[g].advance*scale)/100;
}
}
c++;
bbox = swf_GetShapeBoundingBox(shape2);
swf_Shape2Free(shape2);
f->layout->bounds[t] = bbox;
- /* FIXME */
- //width = (bbox.xmax - bbox.xmin)/20;
- width = (bbox.xmax)/20;
+
+ width = (bbox.xmax);
/* The following is a heuristic- it may be that extractfont_DefineText
has already found out some widths for individual characters (from the way
l = l->next;
}
swf_Shape2Free(shape2);
- advance += font->glyph[g].advance;
+ advance += font->glyph[g].advance/20.0;
}
}