When I draw text in PyGUI using Courier New, it comes
out too far down by about half the height of the lower
The problem only seems to affect this particular font;
all the other fonts I've tried are positioned correctly.
This is the code I'm using to get the baseline of the
text positioned at (x, y):
h = ns_font.defaultLineHeightForFont()
d = -ns_font.descender()
ns_point = NSPoint(x, y - h + d)
Am I doing anything wrong here? I've checked the values
that Cocoa is getting for defaultLineHeightForFont and
descender, and they seem to be correct, but the text comes
out in the wrong place when using that font.
Get latest updates about Open Source Projects, Conferences and News.