[swfmill] Bounding boxes for glyphs bug?
Huub Schaeks
hschaeks at hotmail.com
Tue Jun 19 04:16:00 EDT 2007
Hello Ralf
Sorry for not responding any earlier; I've been busy and lacked the energy
to dig into this. I seemed to have trouble building your patched swfmill but
today it turns out that I cannot even build the plain swfmill svn.
The autogen.sh script spits out a few warnings and error messages and that's
it.
I'm not familiar with building stuff from svn, so I might be making some
rather obvious mistakes here.
What version of which tools should I be using?
regards Huub
>From: Ralf Fuest <ralf-fuest at gmx.de>
>Reply-To: swfmill at osflash.org
>To: swfmill at osflash.org
>Subject: Re: [swfmill] Bounding boxes for glyphs bug?
>Date: Thu, 14 Jun 2007 21:56:33 +0200
>
>Hello Huub,
>I changed some things in SWFShapeMaker.cpp in my SVG patch. A quick test
>showed that the bottom values of 'o' and 'e' in Vera.ttf are almost
>equal with the patch applied. You can try to apply the patch and check
>if it works for you. Although I'm not sure if the bounding box
>calculation in my version is correct, because I haven't tested if the
>values it produces are accurate.
>
>You can download the patch at:
>http://osflash.org/pipermail/swfmill_osflash.org/2007-May/001274.html
>
>Ralf
>
> > Hello
> >
> > I used swfmill to generate a swf library containing just a few glyphs
>from a
> > font. Wanting to use swftools to build the final swf animiation I used
> > swfextract to build a font library swftools would understand. Defining
> > textfields containing just one glyph in swftools I found that some of
>those
> > glyphs would have some parts chopped of.
> >
> > Trying to fix this I uses swfmill swf2xml to look at the bounding boxes
>in
> > the swfmill output, I changed the values, used swfmill xml2swf and then
> > swfextract again to finally get a correct looking animation.
> >
> > Having used several tools, the source of the issue was obvious of
>course,
> > but looking at the xml after unsing swfmill swf2xml on a swf file made
>by
> > swfmill simple using plain old
> > /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf I found that for
> > instance the bottom of the 'o' was significantly lower then the bottom
>of
> > the 'e'. Which corresponded with the 'o' being chopped of at the bottom.
> >
> > Looking at the code in SWFShapeMaker.cpp I found that if a CurveTo is
> > include in the shape then only the second point is used to find the
>bounding
> > box. This does not seem to a problem since in sequences of CurveTo's it
> > seems that the first point of a CurveTo is almost equal to the second
>point
> > in the previous CurveTo. But the first CurveTo in any sequence does have
>a
> > first point which is never used to find the bounding box.
> >
> > I added the line
> > minmax( cx+(lastx*factorx), cy+(lasty*factory) );
> > to the end of SWFShapeMaker::CurveToR and found that the problem was
>gone,
> > looking at the xml again, the 'e', 'o' and 'u' had the same bottom as
>they
> > should (I included only a few glyphs).
> >
> > I'm guessing that it would be nice to have that extra minmax call
>included
> > only in the first CurveTo in a sequence, but I don't know enough about
> > TrueType files to be sure.
> >
> > Best Regards
> > Huub
>
>
>_______________________________________________
>swfmill mailing list
>swfmill at osflash.org
>http://osflash.org/mailman/listinfo/swfmill_osflash.org
_________________________________________________________________
Even lekker snel online vermaak? Ga dan naar www.msn.nl http://www.msn.nl
More information about the swfmill
mailing list