Login
Community
DARK THEME

drawText draws different size text after first draw

// The first time the text is large and thin. After that, it's smaller and very bold.

init = function() drawn = 0 end

update = function() if keyboard.release.SPACE then drawn = 0 end end

draw = function() if not drawn then screen.clear() screen.drawText("Hello", 0, 0, 40, 40 ) drawn = 1 end

end

On discord:

FeniX — 03/27/2021

To fix issue of font not being loaded I started adding drawText with empty text at the beginning of the game.

Gilles — 03/27/2021

this is the best workaround, until the engine improves...

Got it. Thanks!

update

I tried that workaround, I couldn't get it to work.

But putting screen.setFont() in init does seem to work, and it keeps the original larger thinner font.

BTW what is the default font when started?

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community