| 1 | #Test deleting points from contour |
| 2 | |
| 3 | import fontforge |
| 4 | |
| 5 | cont = fontforge.contour() |
| 6 | cont.moveTo(0, 0).lineTo(10, 0).lineTo(20, 0).lineTo(30, 0) |
| 7 | |
| 8 | c = cont.dup() |
| 9 | del c[1] |
| 10 | assert len(c) == 3 |
| 11 | assert c[0].x == 0 |
| 12 | assert c[1].x == 20 |
| 13 | assert c[2].x == 30 |
| 14 | |
| 15 | c = cont.dup() |
| 16 | del c[1:3] |
| 17 | assert len(c) == 2 |
| 18 | assert c[0].x == 0 |
| 19 | assert c[1].x == 30 |