Skip to content

Commit

Permalink
pass through the align argument in textBoxCharacterBounds
Browse files Browse the repository at this point in the history
fixing #539
  • Loading branch information
typemytype committed Aug 4, 2023
1 parent 73a78be commit f805ad7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drawBot/drawBotDrawingTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1809,7 +1809,7 @@ def textBoxBaselines(self, txt, box, align=None):
if not isinstance(txt, (str, FormattedString)):
raise TypeError("expected 'str' or 'FormattedString', got '%s'" % type(txt).__name__)
path, (x, y) = self._dummyContext._getPathForFrameSetter(box)
attrString = self._dummyContext.attributedString(txt)
attrString = self._dummyContext.attributedString(txt, align=align)
setter = CoreText.CTFramesetterCreateWithAttributedString(attrString)
box = CoreText.CTFramesetterCreateFrame(setter, (0, 0), path, None)
ctLines = CoreText.CTFrameGetLines(box)
Expand Down

0 comments on commit f805ad7

Please sign in to comment.