|
From: JustFillBug <moz...@ya...> - 2008-12-05 07:29:00
|
On 2008-12-03, George Williams <gw...@si...> wrote: > On Sun, 2008-11-23 at 18:47, JustFillBug 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. > It does not, nor is it intended to. > > If you want to do this use the Find / Replace dialog. > Find/Replace does not work for what I want. I want to replace part of a glyph with another glyph without changing its shape. This is basically what the replaceWithReference does. The difference is that the part of the glyph might be a scaled up version of the reference contour. Therefore the reference will have a scale up transformation matrix. And I want to do this in python. I suppose I can use Font.find() to find the glyphs containing simliar contours and do replacing with reference myself. But find() does not support scaled lookup either. find() hardcoded the sv_reverse|sv_flips. Could you add a flag option to the find() to let user specify finding criteria like scale, rotation, flip. Event better if the return containing iterator of (glyph, matchedContourID) instead of glyphs only. |