Skip to content

Commit

Permalink
[glyph] Add outputImpliedClosingLine to draw()
Browse files Browse the repository at this point in the history
This is in line with what `ufoLib` does.

Fixes fonttools/fonttools#3694
  • Loading branch information
behdad committed Nov 21, 2024
1 parent 7412016 commit 53f11a5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ufoLib2/objects/glyph.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,12 @@ def move(self, delta: tuple[float, float]) -> None:
# Pen methods
# -----------

def draw(self, pen: AbstractPen) -> None:
def draw(self, pen: AbstractPen, outputImpliedClosingLine: bool = False) -> None:
"""Draws glyph into given pen."""
# TODO: Document pen interface more or link to somewhere.
pointPen = PointToSegmentPen(pen)
pointPen = PointToSegmentPen(
pen, outputImpliedClosingLine=outputImpliedClosingLine
)
self.drawPoints(pointPen)

def drawPoints(self, pointPen: AbstractPointPen) -> None:
Expand Down

0 comments on commit 53f11a5

Please sign in to comment.