X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fgfxfont.c;h=7c71ca75177b2d27cc40ada5cb15b54513e5c64e;hb=e00b10147bcf64db3d6b052d911c9c2e76f98253;hp=acc8e349feb9b8be7e584f2da44976a1fc9b8284;hpb=1fed8f12887a57a1fdb9c790bb359e8fa9c05e26;p=swftools.git diff --git a/lib/gfxfont.c b/lib/gfxfont.c index acc8e34..7c71ca7 100644 --- a/lib/gfxfont.c +++ b/lib/gfxfont.c @@ -665,7 +665,19 @@ ttf_t* gfxfont_to_ttf(gfxfont_t*font) } } + /* make sure coordinates are always to the right of the origin */ + int xshift=0; + if(dest->xmin < 0) { + xshift = -dest->xmin; + for(s=0;spoints[s].x += xshift; + } + dest->xmin += xshift; + dest->xmax += xshift; + } + dest->bearing = dest->xmin; + dest->xmin=0; dest->advance = src->advance*scale; int u = font->glyphs[t].unicode;