X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fmodules%2Fswftext.c;h=1bb40d9db1fc1ddd6f19ba4fc9f64010f60ebb87;hb=cde153b0547e260367cc82ea7563ff8689cb61d8;hp=888f74a7a2b0f44c194ef87562aa79070397602f;hpb=a52eae660658ae99a325993a7d7bb373b03d6df0;p=swftools.git diff --git a/lib/modules/swftext.c b/lib/modules/swftext.c index 888f74a..1bb40d9 100644 --- a/lib/modules/swftext.c +++ b/lib/modules/swftext.c @@ -6,7 +6,7 @@ Part of the swftools package. Copyright (c) 2001 Rainer Böhme - Copyright (c) 2003,2004 Matthias Kramm + Copyright (c) 2003,2004,2005,2006,2007,2008,2009 Matthias Kramm This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -541,6 +541,7 @@ static void updateusage(void *self, int *chars, int *xpos, int nr, return; int t; + int firstpair=1; for(t=0;tlast!=c && !swf_ShapeIsEmpty(u->font->glyph[u->last].shape) && !swf_ShapeIsEmpty(u->font->glyph[c].shape)) { - swf_FontUsePair(u->font, u->last, c); + /* ignore the first pair of every word (caps subset hack). */ + if(!firstpair) + swf_FontUsePair(u->font, u->last, c); + firstpair = 0; + } else { + firstpair = 1; } u->lasty = y; /* FIXME: do we still need to divide advance by 20 for definefont3? */