X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fgfxfont.c;h=8650880cae8be8fac9fcb801b6be03fc2de2c508;hp=760db9ac56f38e645c1068c906068dbede00b851;hb=820250dd4bc31121dfdc6177b3ae40cc5418d72b;hpb=1c0b740ca41037e48a4dcb3d995b2fd6e32d9b3c diff --git a/lib/gfxfont.c b/lib/gfxfont.c index 760db9a..8650880 100644 --- a/lib/gfxfont.c +++ b/lib/gfxfont.c @@ -665,6 +665,20 @@ 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;