14 Commits

Author SHA1 Message Date
Tal Leming
f84f2c50ba Merge recent trunk changes.
git-svn-id: http://svn.robofab.com/branches/ufo3k@261 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-09-10 17:30:28 +00:00
Erik van Blokland
6bc884b229 One or two tweaks. Plus this detects curves with zero bcps - "false curves", and they are now treated as straights. Finally, endPath closed the path, now it remains open.
git-svn-id: http://svn.robofab.com/trunk@245 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-05-24 09:28:15 +00:00
Erik van Blokland
4b3e2a050e Fix to FlattenPen. Iteration started on 0, rather than the first step. Also in _curveToOne the currentPt was not updated properly.
git-svn-id: http://svn.robofab.com/trunk@244 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-05-24 08:55:37 +00:00
Tal Leming
2d545e8734 Found another minor optimization point.
git-svn-id: http://svn.robofab.com/trunk@230 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-02-16 13:59:21 +00:00
Erik van Blokland
2ae7c0e8e5 FLPointContourPen as an alternative to FLPointPen. FLPointContourPen ignores the components. In some situations adding a component to a fl glyphs makes FontLab crash.
git-svn-id: http://svn.robofab.com/trunk@196 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2009-04-14 13:38:44 +00:00
Erik van Blokland
65b2d92a9f MarginPen now has a isHorizontal flag when initialising. Default set to True, the calculations will be horizontal. When False, the measurements will be vertical.
Scripts using MarginPen should continue to work without changes.

git-svn-id: http://svn.robofab.com/trunk@94 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-09-20 09:32:33 +00:00
Erik van Blokland
339ce1c71c Test for glyph and font in the test.
git-svn-id: http://svn.robofab.com/trunk@93 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-07-28 23:23:45 +00:00
Erik van Blokland
04e27a3cca MarginPen now pays attention to the transformation set for components.
git-svn-id: http://svn.robofab.com/trunk@92 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-07-28 23:21:29 +00:00
Erik van Blokland
dc76c06826 Add method getAll() which returns a sorted list of unique slice values.
git-svn-id: http://svn.robofab.com/trunk@89 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-05-30 17:52:38 +00:00
Erik van Blokland
689472553a Handle components. Handle self overlapping bezier segments with any number of intersections.
git-svn-id: http://svn.robofab.com/trunk@88 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-05-30 09:47:54 +00:00
Erik van Blokland
2093fcbad2 Removed print statements.
git-svn-id: http://svn.robofab.com/trunk@87 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-05-30 08:18:23 +00:00
Erik van Blokland
ac33952df5 Pen to calculate the horizontal margins of a glyph at any given height by intersecting the shape with a horizontal line. Results can be obtained for the whole glyph with pen.getMargins() or for each individual contour with pen.getCounterMargins().
git-svn-id: http://svn.robofab.com/trunk@86 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-05-30 07:49:39 +00:00
Erik van Blokland
3950975a77 AngledMarginPen calculates the left and right side-bearings of a glyph, relative to slanted margins. The angle is taken from font.info.italicAngle. Curves are approximated. This also contains 5 convenience functions to set and get individual margins and to center the glyph.
The approximation can be improved upon, perhaps taking the size of the bezier into account and so on. Also the italic offset, as it was used in RoboFog is missing, and could perhaps be taken into account.

git-svn-id: http://svn.robofab.com/trunk@85 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-05-27 09:00:58 +00:00
Just van Rossum
feb0046176 Moved Data, Lib and install.py one level down the tree
git-svn-id: http://svn.robofab.com/trunk@67 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2008-03-11 09:18:32 +00:00