loki@moncam.uucp (Never Kid A Kidder) (05/10/90)
I cannot believe that this is a bug, but I've tried it manually and it goes wrong, and the more I look at the code, the more it seems wrong. The flex routines mentioned in the Black Book creates the OtherSubrs that ends up in a font's Private dictionary. OtherSubrs #1 goes like this (as defined on page 95, I hope they don't mind me reproducing this tiny bit, but I don't see how I can explain the problem unless I do...): currentpoint grestore gsave currentpoint newpath moveto As shewn on page 77, it is used at the onset of a piece of flex to generate the the points on the stack that FlxProc will use to determine whether or not the segment will be curved or rendered as a straight line. Now the act of doing a currentpoint grestore after the previous rmoveto will place the first point on the stack, and then destroy the new point, so when we execute gsave currentpoint *this* currentpoint will in fact be the *original* point, so that all the rmoveto's will work relative to the *original* point and *not* to eachother. If this code becomes currentpoint currentpoint grestore gsave newpath moveto it seems to work fine. So what, if anything, is the matter? I created a Type One font to test both versions, and the weird thing is that they *both* seem to work fine, but only during a show or charpath; if I bung the code in manually, only my version works. My guess is that there some sneaky `special case' being used by the type-one-engine (which seems to live in a world of its own) such that it remembers the last point independently of gsaves and grestores. Any ideas???