width, height = gfx.getTextSize(names[pos], myFontInstance)
There is something I don't understand. Width and Height doesn't match what I expect.
I drew a rectagle with width and height from getTextSize to cover the text. You can see in the image that the output values are higher than the text size. Why the 'extra' red space?
I tested this with 'Roobert-24-Medium' font and also with "Asheville Ayu" one.
Thanks matt, your comment help me track the problem.
It ended up being a problem in my code that I still don't understand but it is fixed
I guess is scope related.
It worked after moving playdate.graphics.setFont(myFontInstance) inside the function that contains the getTextSize line mentioned in the first post. In other words, it is like setFont didn't set the new font globally. Maybe I am missing something.