|
From: JustFillBug <moz...@ya...> - 2008-11-24 04:58:02
|
On 2008-11-24, JustFillBug <moz...@ya...> wrote:
>
> Hi,
> I want to know does the replaceWithReference() try to scale to the
> targetting contour's bounding box? From my test, it seems not.
>
> When matching a reference to a contour, once 1:1 translate don't
> match, it could try to scale the reference according to the target
> contour's bounding box and then test for matching.
>
> The code in SPMatchesF() of search.c is too complex for me to
> change. Maybe somehow set s->tryrotate, s->tryscale and s->tryflips
> inside FVBReplaceOutlineWithReference() before calling _DoFindAll()?
>
I tried to ask transformation in FVBReplaceOutlineWithReference() by
adding:
sv->tryreverse = true;
sv->tryflips = true;
sv->tryrotate = true;
sv->tryscale = true;
fontforge does find the transformed contour but the replaced reference
is using a wrong transformation matrix. It seems the inverse matrix is
used here. When it should scale up, the actual result is a scaled down
reference.
|