Lots of font/text problems after updating to 1.2

I'm having lots of font/text problems after updating to 1.2, my fonts/text (that were working perfectly in 1.1) are now all messed-up, it seems that they are not getting updated with my screen with gfx.sprite.update() at least that what seem to be happening. I didn't see anything in the update notes that should have caused this problem. in another one of my programs my font is just sort of messed-up now.

Any help would be appreciated

Brian

Can you post some screenshots?

Would be cool if you had old screenshots to compare with.

I think playdate.drawFPS() is not working on win simulator might be because of this issue

Having problems with sim and Playdate hardware.

Start screen - looks fine
playdate-20210715-074859
After game starts text stays on screen?
playdate-20210715-074948
Also notice the messed-up font for the LCD score and other text is still there (getting erased as sprites pass over it)
playdate-20210715-075033

Jumper_Playdate_Lua.zip (20.8 MB)

I thought at first it was related to the background, but not I'm pretty sure it has to do with text drawing, etc.

Definitely related to fonts/text, notice how the 10 is messed-up and the 0 and the Game Over message only printed about 3 lines of pixels.

playdate-20210715-221104

What does this look like if you activate "highlight screen drawing"?

uggggh I really screwed up here. :sob: When I moved the code for dealing with newlines down to the lower-level code I goofed up the return value that tells which rows were updated (instead of [start,end], I did [start,length]). As a result, the sprite display list wasn't getting marked dirty in the right place, which kept the background image from redrawing when the text went away. And on the game over screen the text was drawing, but the display driver was pushing the wrong lines to the screen.

I expect we'll have a 1.2.2 out pretty soon. :confused: But there IS an easy workaround: Instead of using gfx.setFont(font) then gfx.drawText(...), you can have the font draw the text directly with font:drawText(...). The only difference between the two is gfx.drawText can do bold and italics with * and _ markdown-style formatting, and font:drawText can't.

That worked, thanks. really wasn't a big deal to fix.

BK