X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fgfxfont.c;h=7c71ca75177b2d27cc40ada5cb15b54513e5c64e;hp=acc8e349feb9b8be7e584f2da44976a1fc9b8284;hb=e00b10147bcf64db3d6b052d911c9c2e76f98253;hpb=5112bbb4b5727d38ed2a9d2b63d16867be841934 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;