X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fgfxfont.c;h=8650880cae8be8fac9fcb801b6be03fc2de2c508;hb=b7121844bf21b1c022aaeb26cd4c98148ab1ed29;hp=acc8e349feb9b8be7e584f2da44976a1fc9b8284;hpb=1fed8f12887a57a1fdb9c790bb359e8fa9c05e26;p=swftools.git diff --git a/lib/gfxfont.c b/lib/gfxfont.c index acc8e34..8650880 100644 --- a/lib/gfxfont.c +++ b/lib/gfxfont.c @@ -666,6 +666,19 @@ ttf_t* gfxfont_to_ttf(gfxfont_t*font) } dest->bearing = dest->xmin; + /* 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->xmin=0; //TODO: might be necessary for some font engines? + dest->advance = src->advance*scale; int u = font->glyphs[t].unicode;