Skip to content

Commit cc6aa90

Browse files
committed
now calculating baseline more accurately
1 parent 7fc045c commit cc6aa90

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

plotdevice/gfx/typography.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,7 @@ def baseline(self):
476476
main = self._main
477477
if not main.store.length():
478478
return 0
479-
txtFont, _ = main.store.attribute_atIndex_effectiveRange_("NSFont", main._glyphs.location, None)
480-
return main._from_px(main.layout.defaultLineHeightForFont_(txtFont))
481-
479+
return main._from_px(main.layout.locationForGlyphAtIndex_(0).y)
482480

483481
class TextFrame(object):
484482
def __init__(self):

0 commit comments

Comments
 (0)