Font parameter is ignored for playdate.graphics.drawTextInRect(text, rect, [leadingAdjustment, [truncationString, [alignment, [font]]]])

When using drawTextInRect, the font parameter is ignored when suppling the function with a Rect.

gfx.drawTextInRect(info.title, detailRect.x, detailRect.y, detailRect.width, detailRect.height, nil, nil, kTextAlignment.center, myFont)

Result: the correct myFont is used :white_check_mark:


gfx.drawTextInRect(info.title, detailRect, nil, nil, kTextAlignment.center, myFont)

Result: the system font is used :interrobang:

1 Like

+1. I found this too a few weeks ago and gave up using the rect parameter version of the call and just use the x,y,w,h one

Filed, will take a look as soon as we can. At a glance it looks like we're just not processing the arguments correctly, so I expect it'll be a quick fix.