diff --git a/systems/draw.lua b/systems/draw.lua index 01b8f15..74e3225 100644 --- a/systems/draw.lua +++ b/systems/draw.lua @@ -40,7 +40,13 @@ drawSystem( "drawText", { position = T.XyPair, drawAsText = { text = T.str, style = Maybe(T.str), font = Maybe(T.FontData) } }, function(e) - local font = e.drawAsText.font or gfx.getFont() -- e.drawAsText.font or AshevilleSans14Bold + local font + if e.drawAsText.font then + font = e.drawAsText.font + gfx.setFont(font) + else + font = gfx.getFont() + end local textHeight = font:getHeight() local textWidth = font:getWidth(e.drawAsText.text)