!colorcompare(&color, &chardata->chr[t].color) ||
charstorepos==127 ||
lastsize != chardata->chr[t].size ||
!colorcompare(&color, &chardata->chr[t].color) ||
charstorepos==127 ||
lastsize != chardata->chr[t].size ||
if(t<chardata->pos-1) nextx = chardata->chr[t+1].x;
if(t==chardata->pos-1 && chardata->next) nextx = chardata->next->chr[0].x;
int dx = nextx-chr->x;
if(t<chardata->pos-1) nextx = chardata->chr[t+1].x;
if(t==chardata->pos-1 && chardata->next) nextx = chardata->next->chr[0].x;
int dx = nextx-chr->x;
mtag = swf_InsertTag(mtag, ST_DEFINEFONT2);
swf_FontSetDefine2(mtag, iterator->swffont);
} else {
mtag = swf_InsertTag(mtag, ST_DEFINEFONT3);
swf_FontSetDefine2(mtag, iterator->swffont);
mtag = swf_InsertTag(mtag, ST_DEFINEFONT2);
swf_FontSetDefine2(mtag, iterator->swffont);
} else {
mtag = swf_InsertTag(mtag, ST_DEFINEFONT3);
swf_FontSetDefine2(mtag, iterator->swffont);
-
- swf_FontCreateAlignZones(iterator->swffont);
-
- if(iterator->swffont->alignzones) {
- mtag = swf_InsertTag(mtag, ST_DEFINEFONTALIGNZONES);
- swf_FontSetAlignZones(mtag, iterator->swffont);
- }
/* remove the removeobject2 tags between the last ST_SHOWFRAME
and the ST_END- they confuse the flash player */
/* remove the removeobject2 tags between the last ST_SHOWFRAME
and the ST_END- they confuse the flash player */
i->config_dumpfonts = atoi(value);
} else if(!strcmp(name, "animate")) {
i->config_animate = atoi(value);
i->config_dumpfonts = atoi(value);
} else if(!strcmp(name, "animate")) {
i->config_animate = atoi(value);
+ } else if(!strcmp(name, "linknameurl")) {
+ i->config_linknameurl = atoi(value);
+ } else if(!strcmp(name, "showimages")) {
+ i->config_showimages = atoi(value);
} else if(!strcmp(name, "disablelinks")) {
i->config_disablelinks = atoi(value);
} else if(!strcmp(name, "simpleviewer")) {
} else if(!strcmp(name, "disablelinks")) {
i->config_disablelinks = atoi(value);
} else if(!strcmp(name, "simpleviewer")) {
if(newsizex<sizex || newsizey<sizey) {
msg("<verbose> Scaling %dx%d image to %dx%d", sizex, sizey, newsizex, newsizey);
if(newsizex<sizex || newsizey<sizey) {
msg("<verbose> Scaling %dx%d image to %dx%d", sizex, sizey, newsizex, newsizey);
- newpic = swf_ImageScale(mem, sizex, sizey, newsizex, newsizey);
+ gfximage_t*ni = gfximage_rescale(img, newsizex, newsizey);
+ newpic = (RGBA*)ni->data;
+ free(ni);
SHAPE*shape;
swf_ShapeNew(&shape);
int fsid = swf_ShapeAddBitmapFillStyle(shape,&m,bitid,1);
SHAPE*shape;
swf_ShapeNew(&shape);
int fsid = swf_ShapeAddBitmapFillStyle(shape,&m,bitid,1);
+ int lsid = 0;
+ if(i->config_showimages) {
+ RGBA pink = {255,255,0,255};
+ lsid = swf_ShapeAddLineStyle(shape, 20, &pink);
+ }
swf_SetU16(i->tag, myshapeid);
SRECT r = gfxline_getSWFbbox(line);
r = swf_ClipRect(i->pagebbox, r);
swf_SetU16(i->tag, myshapeid);
SRECT r = gfxline_getSWFbbox(line);
r = swf_ClipRect(i->pagebbox, r);
swf_SetShapeStyles(i->tag,shape);
swf_ShapeCountBits(shape,NULL,NULL);
swf_SetShapeBits(i->tag,shape);
swf_SetShapeStyles(i->tag,shape);
swf_ShapeCountBits(shape,NULL,NULL);
swf_SetShapeBits(i->tag,shape);
- swf_ShapeSetAll(i->tag,shape,UNDEFINED_COORD,UNDEFINED_COORD,0,fsid,0);
+ swf_ShapeSetAll(i->tag,shape,UNDEFINED_COORD,UNDEFINED_COORD,lsid,fsid,0);
i->swflastx = i->swflasty = UNDEFINED_COORD;
drawgfxline(dev, line, 1);
swf_ShapeSetEnd(i->tag);
i->swflastx = i->swflasty = UNDEFINED_COORD;
drawgfxline(dev, line, 1);
swf_ShapeSetEnd(i->tag);
swffont->glyph2ascii = (U16*)rfx_calloc(sizeof(U16)*swffont->numchars);
swffont->glyph = (SWFGLYPH*)rfx_calloc(sizeof(SWFGLYPH)*swffont->numchars);
swffont->glyphnames = (char**)rfx_calloc(sizeof(char*)*swffont->numchars);
swffont->glyph2ascii = (U16*)rfx_calloc(sizeof(U16)*swffont->numchars);
swffont->glyph = (SWFGLYPH*)rfx_calloc(sizeof(SWFGLYPH)*swffont->numchars);
swffont->glyphnames = (char**)rfx_calloc(sizeof(char*)*swffont->numchars);
- swffont->glyph2ascii[t] = font->glyphs[t].unicode;
- if(swffont->glyph2ascii[t] == 0xffff || swffont->glyph2ascii[t] == 0x0000) {
+ int u = font->glyphs[t].unicode;
+ int s;
+ char twice=0;
+ for(s=0;s<font->num_glyphs;s++) {
+ if(swffont->glyph2ascii[s]==u)
+ twice=1;
+ }
+ if(u >= 0xe000 || u == 0x0000 || twice) {
/* flash 8 flashtype requires unique unicode IDs for each character.
We use the Unicode private user area to assign characters, hoping that
the font doesn't contain more than 2048 glyphs */
/* flash 8 flashtype requires unique unicode IDs for each character.
We use the Unicode private user area to assign characters, hoping that
the font doesn't contain more than 2048 glyphs */
c.x = line->sx * scale; c.y = -line->sy * scale;
//to.x = floor(line->x * scale); to.y = floor(-line->y * scale);
to.x = line->x * scale; to.y = -line->y * scale;
c.x = line->sx * scale; c.y = -line->sy * scale;
//to.x = floor(line->x * scale); to.y = floor(-line->y * scale);
to.x = line->x * scale; to.y = -line->y * scale;
l->swffont->layout->bounds[iii].xmax/20.0,
l->swffont->layout->bounds[iii].ymax/20.0
);
l->swffont->layout->bounds[iii].xmax/20.0,
l->swffont->layout->bounds[iii].ymax/20.0
);
msg("<warning> No character %d in font %s (%d chars)", glyph, FIXNULL((char*)i->swffont->name), i->swffont->numchars);
return;
}
msg("<warning> No character %d in font %s (%d chars)", glyph, FIXNULL((char*)i->swffont->name), i->swffont->numchars);
return;
}
setfontscale(dev, matrix->m00, matrix->m01, matrix->m10, matrix->m11, matrix->tx, matrix->ty, 0);
setfontscale(dev, matrix->m00, matrix->m01, matrix->m10, matrix->m11, matrix->tx, matrix->ty, 0);
} else {
i->chardata = charbuffer_append(i->chardata, i->swffont, glyph, x, y, i->current_font_size, *(RGBA*)color, &i->fontmatrix);
}
} else {
i->chardata = charbuffer_append(i->chardata, i->swffont, glyph, x, y, i->current_font_size, *(RGBA*)color, &i->fontmatrix);
}